diff --git a/Directory.Build.props b/Directory.Build.props index eeaaba8d1..49b2ba257 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -12,6 +12,7 @@ 5.6.1 direct $(NoWarn);NETSDK1215 + $(MSBuildThisFileDirectory)kiota-patch-generated-code.ps1 diff --git a/kiota-patch-generated-code.ps1 b/kiota-patch-generated-code.ps1 new file mode 100644 index 000000000..d9488612d --- /dev/null +++ b/kiota-patch-generated-code.ps1 @@ -0,0 +1,28 @@ +<# + Patches C# code generated by kiota. + Workaround for bug at https://github.com/microsoft/kiota/issues/3944#issuecomment-2597201229. +#> +param ( + # Path to directory where kiota generated C# code. + [Parameter(Mandatory=$true)] + [string]$kiotaOutputDir +) + +$osLineBreak = [System.Environment]::NewLine +$files = Get-ChildItem -Path $kiotaOutputDir -Recurse -Include *.cs + +foreach ($file in $files) +{ + $content = Get-Content $file -Raw + + # add #nullable enable, suppress warning CS8625: Cannot convert null literal to non-nullable reference type. + $content = ($content -replace '// ', "// $osLineBreak#nullable enable$osLineBreak#pragma warning disable CS8625") + + # remove conditionals + $content = ($content -replace "(?s)#if NETSTANDARD2_1_OR_GREATER .*?$osLineBreak#nullable enable$osLineBreak(?.*?)$osLineBreak#nullable restore$osLineBreak#else$osLineBreak(?.*?)$osLineBreak#endif", "`$1") + + # insert new line between member and next summary + $content = ($content -replace "}$osLineBreak(?\s+/// )", "}$osLineBreak$osLineBreak`$1") + + Set-Content -Path $file -Value $content +} diff --git a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Api/ApiRequestBuilder.cs b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Api/ApiRequestBuilder.cs index 379bfbdbb..d2897abe0 100644 --- a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Api/ApiRequestBuilder.cs +++ b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Api/ApiRequestBuilder.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions; @@ -23,21 +25,25 @@ public partial class ApiRequestBuilder : BaseRequestBuilder { get => new global::OpenApiKiotaClientExample.GeneratedCode.Api.Operations.OperationsRequestBuilder(PathParameters, RequestAdapter); } + /// The people property public global::OpenApiKiotaClientExample.GeneratedCode.Api.People.PeopleRequestBuilder People { get => new global::OpenApiKiotaClientExample.GeneratedCode.Api.People.PeopleRequestBuilder(PathParameters, RequestAdapter); } + /// The tags property public global::OpenApiKiotaClientExample.GeneratedCode.Api.Tags.TagsRequestBuilder Tags { get => new global::OpenApiKiotaClientExample.GeneratedCode.Api.Tags.TagsRequestBuilder(PathParameters, RequestAdapter); } + /// The todoItems property public global::OpenApiKiotaClientExample.GeneratedCode.Api.TodoItems.TodoItemsRequestBuilder TodoItems { get => new global::OpenApiKiotaClientExample.GeneratedCode.Api.TodoItems.TodoItemsRequestBuilder(PathParameters, RequestAdapter); } + /// /// Instantiates a new and sets the default values. /// @@ -46,6 +52,7 @@ public partial class ApiRequestBuilder : BaseRequestBuilder public ApiRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/api", pathParameters) { } + /// /// Instantiates a new and sets the default values. /// @@ -57,3 +64,4 @@ public ApiRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(r } } #pragma warning restore CS0618 + diff --git a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Api/Operations/OperationsRequestBuilder.cs b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Api/Operations/OperationsRequestBuilder.cs index 89a52a9b2..52dbf4980 100644 --- a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Api/Operations/OperationsRequestBuilder.cs +++ b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Api/Operations/OperationsRequestBuilder.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -25,6 +27,7 @@ public partial class OperationsRequestBuilder : BaseRequestBuilder public OperationsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/api/operations", pathParameters) { } + /// /// Instantiates a new and sets the default values. /// @@ -33,6 +36,7 @@ public OperationsRequestBuilder(Dictionary pathParameters, IRequ public OperationsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/api/operations", rawUrl) { } + /// /// Performs multiple mutations in a linear and atomic manner. /// @@ -45,15 +49,8 @@ public OperationsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : /// When receiving a 404 status code /// When receiving a 409 status code /// When receiving a 422 status code -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public async Task PostAsync(global::OpenApiKiotaClientExample.GeneratedCode.Models.OperationsRequestDocument body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { -#nullable restore -#else - public async Task PostAsync(global::OpenApiKiotaClientExample.GeneratedCode.Models.OperationsRequestDocument body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) - { -#endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> @@ -66,21 +63,15 @@ public OperationsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : }; return await RequestAdapter.SendAsync(requestInfo, global::OpenApiKiotaClientExample.GeneratedCode.Models.OperationsResponseDocument.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } + /// /// Performs multiple mutations in a linear and atomic manner. /// /// A /// 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(global::OpenApiKiotaClientExample.GeneratedCode.Models.OperationsRequestDocument body, Action>? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToPostRequestInformation(global::OpenApiKiotaClientExample.GeneratedCode.Models.OperationsRequestDocument body, Action> requestConfiguration = default) - { -#endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); @@ -88,6 +79,7 @@ public RequestInformation ToPostRequestInformation(global::OpenApiKiotaClientExa requestInfo.SetContentFromParsable(RequestAdapter, "application/vnd.api+json;ext=atomic", body); return requestInfo; } + /// /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. /// @@ -100,3 +92,4 @@ public RequestInformation ToPostRequestInformation(global::OpenApiKiotaClientExa } } #pragma warning restore CS0618 + diff --git a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Api/People/Item/AssignedTodoItems/AssignedTodoItemsRequestBuilder.cs b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Api/People/Item/AssignedTodoItems/AssignedTodoItemsRequestBuilder.cs index 4805f1d70..256634808 100644 --- a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Api/People/Item/AssignedTodoItems/AssignedTodoItemsRequestBuilder.cs +++ b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Api/People/Item/AssignedTodoItems/AssignedTodoItemsRequestBuilder.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -25,6 +27,7 @@ public partial class AssignedTodoItemsRequestBuilder : BaseRequestBuilder public AssignedTodoItemsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/api/people/{id}/assignedTodoItems{?query*}", pathParameters) { } + /// /// Instantiates a new and sets the default values. /// @@ -33,6 +36,7 @@ public AssignedTodoItemsRequestBuilder(Dictionary pathParameters public AssignedTodoItemsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/api/people/{id}/assignedTodoItems{?query*}", rawUrl) { } + /// /// Retrieves the related todoItems of an individual person's assignedTodoItems relationship. /// @@ -41,15 +45,8 @@ public AssignedTodoItemsRequestBuilder(string rawUrl, IRequestAdapter requestAda /// Configuration for the request such as headers, query parameters, and middleware options. /// When receiving a 400 status code /// When receiving a 404 status code -#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> { @@ -58,60 +55,43 @@ public AssignedTodoItemsRequestBuilder(string rawUrl, IRequestAdapter requestAda }; return await RequestAdapter.SendAsync(requestInfo, global::OpenApiKiotaClientExample.GeneratedCode.Models.TodoItemCollectionResponseDocument.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// /// 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 HeadAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { -#nullable restore -#else - public async Task HeadAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) - { -#endif var requestInfo = ToHeadRequestInformation(requestConfiguration); await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); } + /// /// Retrieves the related todoItems of an individual person's assignedTodoItems relationship. /// /// A /// 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(Method.GET, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/vnd.api+json"); return requestInfo; } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// /// A /// 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 ToHeadRequestInformation(Action>? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToHeadRequestInformation(Action> requestConfiguration = default) - { -#endif var requestInfo = new RequestInformation(Method.HEAD, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); return requestInfo; } + /// /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. /// @@ -121,6 +101,7 @@ public RequestInformation ToHeadRequestInformation(Action /// Retrieves the related todoItems of an individual person's assignedTodoItems relationship. /// @@ -128,16 +109,10 @@ public RequestInformation ToHeadRequestInformation(ActionFor syntax, see the documentation for the [`include`](https://www.jsonapi.net/usage/reading/including-relationships.html)/[`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// @@ -145,16 +120,10 @@ public partial class AssignedTodoItemsRequestBuilderGetQueryParameters public partial class AssignedTodoItemsRequestBuilderHeadQueryParameters { /// For syntax, see the documentation for the [`include`](https://www.jsonapi.net/usage/reading/including-relationships.html)/[`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } } } #pragma warning restore CS0618 + diff --git a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Api/People/Item/OwnedTodoItems/OwnedTodoItemsRequestBuilder.cs b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Api/People/Item/OwnedTodoItems/OwnedTodoItemsRequestBuilder.cs index 121078f0c..32bf672e7 100644 --- a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Api/People/Item/OwnedTodoItems/OwnedTodoItemsRequestBuilder.cs +++ b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Api/People/Item/OwnedTodoItems/OwnedTodoItemsRequestBuilder.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -25,6 +27,7 @@ public partial class OwnedTodoItemsRequestBuilder : BaseRequestBuilder public OwnedTodoItemsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/api/people/{id}/ownedTodoItems{?query*}", pathParameters) { } + /// /// Instantiates a new and sets the default values. /// @@ -33,6 +36,7 @@ public OwnedTodoItemsRequestBuilder(Dictionary pathParameters, I public OwnedTodoItemsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/api/people/{id}/ownedTodoItems{?query*}", rawUrl) { } + /// /// Retrieves the related todoItems of an individual person's ownedTodoItems relationship. /// @@ -41,15 +45,8 @@ public OwnedTodoItemsRequestBuilder(string rawUrl, IRequestAdapter requestAdapte /// Configuration for the request such as headers, query parameters, and middleware options. /// When receiving a 400 status code /// When receiving a 404 status code -#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> { @@ -58,60 +55,43 @@ public OwnedTodoItemsRequestBuilder(string rawUrl, IRequestAdapter requestAdapte }; return await RequestAdapter.SendAsync(requestInfo, global::OpenApiKiotaClientExample.GeneratedCode.Models.TodoItemCollectionResponseDocument.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// /// 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 HeadAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { -#nullable restore -#else - public async Task HeadAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) - { -#endif var requestInfo = ToHeadRequestInformation(requestConfiguration); await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); } + /// /// Retrieves the related todoItems of an individual person's ownedTodoItems relationship. /// /// A /// 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(Method.GET, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/vnd.api+json"); return requestInfo; } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// /// A /// 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 ToHeadRequestInformation(Action>? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToHeadRequestInformation(Action> requestConfiguration = default) - { -#endif var requestInfo = new RequestInformation(Method.HEAD, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); return requestInfo; } + /// /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. /// @@ -121,6 +101,7 @@ public RequestInformation ToHeadRequestInformation(Action /// Retrieves the related todoItems of an individual person's ownedTodoItems relationship. /// @@ -128,16 +109,10 @@ public RequestInformation ToHeadRequestInformation(ActionFor syntax, see the documentation for the [`include`](https://www.jsonapi.net/usage/reading/including-relationships.html)/[`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// @@ -145,16 +120,10 @@ public partial class OwnedTodoItemsRequestBuilderGetQueryParameters public partial class OwnedTodoItemsRequestBuilderHeadQueryParameters { /// For syntax, see the documentation for the [`include`](https://www.jsonapi.net/usage/reading/including-relationships.html)/[`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } } } #pragma warning restore CS0618 + diff --git a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Api/People/Item/PeopleItemRequestBuilder.cs b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Api/People/Item/PeopleItemRequestBuilder.cs index 7348a0339..6b62743a3 100644 --- a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Api/People/Item/PeopleItemRequestBuilder.cs +++ b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Api/People/Item/PeopleItemRequestBuilder.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -25,16 +27,19 @@ public partial class PeopleItemRequestBuilder : BaseRequestBuilder { get => new global::OpenApiKiotaClientExample.GeneratedCode.Api.People.Item.AssignedTodoItems.AssignedTodoItemsRequestBuilder(PathParameters, RequestAdapter); } + /// The ownedTodoItems property public global::OpenApiKiotaClientExample.GeneratedCode.Api.People.Item.OwnedTodoItems.OwnedTodoItemsRequestBuilder OwnedTodoItems { get => new global::OpenApiKiotaClientExample.GeneratedCode.Api.People.Item.OwnedTodoItems.OwnedTodoItemsRequestBuilder(PathParameters, RequestAdapter); } + /// The relationships property public global::OpenApiKiotaClientExample.GeneratedCode.Api.People.Item.Relationships.RelationshipsRequestBuilder Relationships { get => new global::OpenApiKiotaClientExample.GeneratedCode.Api.People.Item.Relationships.RelationshipsRequestBuilder(PathParameters, RequestAdapter); } + /// /// Instantiates a new and sets the default values. /// @@ -43,6 +48,7 @@ public partial class PeopleItemRequestBuilder : BaseRequestBuilder public PeopleItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/api/people/{id}{?query*}", pathParameters) { } + /// /// Instantiates a new and sets the default values. /// @@ -51,21 +57,15 @@ public PeopleItemRequestBuilder(Dictionary pathParameters, IRequ public PeopleItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/api/people/{id}{?query*}", rawUrl) { } + /// /// Deletes an existing person by its identifier. /// /// Cancellation token to use when cancelling requests /// Configuration for the request such as headers, query parameters, and middleware options. /// When receiving a 404 status code -#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> { @@ -73,6 +73,7 @@ public async Task DeleteAsync(Action /// Retrieves an individual person by its identifier. /// @@ -81,15 +82,8 @@ public async Task DeleteAsync(ActionConfiguration for the request such as headers, query parameters, and middleware options. /// When receiving a 400 status code /// When receiving a 404 status code -#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> { @@ -98,23 +92,18 @@ public async Task DeleteAsync(Action(requestInfo, global::OpenApiKiotaClientExample.GeneratedCode.Models.PersonPrimaryResponseDocument.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// /// 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 HeadAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { -#nullable restore -#else - public async Task HeadAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) - { -#endif var requestInfo = ToHeadRequestInformation(requestConfiguration); await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); } + /// /// Updates an existing person. /// @@ -126,15 +115,8 @@ public async Task HeadAsync(ActionWhen receiving a 404 status code /// When receiving a 409 status code /// When receiving a 422 status code -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public async Task PatchAsync(global::OpenApiKiotaClientExample.GeneratedCode.Models.UpdatePersonRequestDocument body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { -#nullable restore -#else - public async Task PatchAsync(global::OpenApiKiotaClientExample.GeneratedCode.Models.UpdatePersonRequestDocument body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) - { -#endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> @@ -146,77 +128,53 @@ public async Task HeadAsync(Action(requestInfo, global::OpenApiKiotaClientExample.GeneratedCode.Models.PersonPrimaryResponseDocument.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } + /// /// Deletes an existing person by its identifier. /// /// A /// 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(Method.DELETE, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/vnd.api+json"); return requestInfo; } + /// /// Retrieves an individual person by its identifier. /// /// A /// 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(Method.GET, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/vnd.api+json"); return requestInfo; } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// /// A /// 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 ToHeadRequestInformation(Action>? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToHeadRequestInformation(Action> requestConfiguration = default) - { -#endif var requestInfo = new RequestInformation(Method.HEAD, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); return requestInfo; } + /// /// Updates an existing person. /// /// A /// 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(global::OpenApiKiotaClientExample.GeneratedCode.Models.UpdatePersonRequestDocument body, Action>? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToPatchRequestInformation(global::OpenApiKiotaClientExample.GeneratedCode.Models.UpdatePersonRequestDocument body, Action> requestConfiguration = default) - { -#endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); @@ -224,6 +182,7 @@ public RequestInformation ToPatchRequestInformation(global::OpenApiKiotaClientEx requestInfo.SetContentFromParsable(RequestAdapter, "application/vnd.api+json", body); return requestInfo; } + /// /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. /// @@ -233,6 +192,7 @@ public RequestInformation ToPatchRequestInformation(global::OpenApiKiotaClientEx { return new global::OpenApiKiotaClientExample.GeneratedCode.Api.People.Item.PeopleItemRequestBuilder(rawUrl, RequestAdapter); } + /// /// Retrieves an individual person by its identifier. /// @@ -240,16 +200,10 @@ public RequestInformation ToPatchRequestInformation(global::OpenApiKiotaClientEx public partial class PeopleItemRequestBuilderGetQueryParameters { /// For syntax, see the documentation for the [`include`](https://www.jsonapi.net/usage/reading/including-relationships.html)/[`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// @@ -257,16 +211,10 @@ public partial class PeopleItemRequestBuilderGetQueryParameters public partial class PeopleItemRequestBuilderHeadQueryParameters { /// For syntax, see the documentation for the [`include`](https://www.jsonapi.net/usage/reading/including-relationships.html)/[`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } + /// /// Updates an existing person. /// @@ -274,16 +222,10 @@ public partial class PeopleItemRequestBuilderHeadQueryParameters public partial class PeopleItemRequestBuilderPatchQueryParameters { /// For syntax, see the documentation for the [`include`](https://www.jsonapi.net/usage/reading/including-relationships.html)/[`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } } } #pragma warning restore CS0618 + diff --git a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Api/People/Item/Relationships/AssignedTodoItems/AssignedTodoItemsRequestBuilder.cs b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Api/People/Item/Relationships/AssignedTodoItems/AssignedTodoItemsRequestBuilder.cs index a41ec8fb1..55314870e 100644 --- a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Api/People/Item/Relationships/AssignedTodoItems/AssignedTodoItemsRequestBuilder.cs +++ b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Api/People/Item/Relationships/AssignedTodoItems/AssignedTodoItemsRequestBuilder.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -25,6 +27,7 @@ public partial class AssignedTodoItemsRequestBuilder : BaseRequestBuilder public AssignedTodoItemsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/api/people/{id}/relationships/assignedTodoItems{?query*}", pathParameters) { } + /// /// Instantiates a new and sets the default values. /// @@ -33,6 +36,7 @@ public AssignedTodoItemsRequestBuilder(Dictionary pathParameters public AssignedTodoItemsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/api/people/{id}/relationships/assignedTodoItems{?query*}", rawUrl) { } + /// /// Removes existing todoItems from the assignedTodoItems relationship of an individual person. /// @@ -42,15 +46,8 @@ public AssignedTodoItemsRequestBuilder(string rawUrl, IRequestAdapter requestAda /// When receiving a 400 status code /// When receiving a 404 status code /// When receiving a 409 status code -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public async Task DeleteAsync(global::OpenApiKiotaClientExample.GeneratedCode.Models.ToManyTodoItemInRequest body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { -#nullable restore -#else - public async Task DeleteAsync(global::OpenApiKiotaClientExample.GeneratedCode.Models.ToManyTodoItemInRequest body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) - { -#endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = ToDeleteRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> @@ -61,6 +58,7 @@ public async Task DeleteAsync(global::OpenApiKiotaClientExample.GeneratedCode.Mo }; await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); } + /// /// Retrieves the related todoItem identities of an individual person's assignedTodoItems relationship. /// @@ -69,15 +67,8 @@ public async Task DeleteAsync(global::OpenApiKiotaClientExample.GeneratedCode.Mo /// Configuration for the request such as headers, query parameters, and middleware options. /// When receiving a 400 status code /// When receiving a 404 status code -#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> { @@ -86,23 +77,18 @@ public async Task DeleteAsync(global::OpenApiKiotaClientExample.GeneratedCode.Mo }; return await RequestAdapter.SendAsync(requestInfo, global::OpenApiKiotaClientExample.GeneratedCode.Models.TodoItemIdentifierCollectionResponseDocument.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// /// 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 HeadAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { -#nullable restore -#else - public async Task HeadAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) - { -#endif var requestInfo = ToHeadRequestInformation(requestConfiguration); await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); } + /// /// Assigns existing todoItems to the assignedTodoItems relationship of an individual person. /// @@ -112,15 +98,8 @@ public async Task HeadAsync(ActionWhen receiving a 400 status code /// When receiving a 404 status code /// When receiving a 409 status code -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public async Task PatchAsync(global::OpenApiKiotaClientExample.GeneratedCode.Models.ToManyTodoItemInRequest body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { -#nullable restore -#else - public async Task PatchAsync(global::OpenApiKiotaClientExample.GeneratedCode.Models.ToManyTodoItemInRequest body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) - { -#endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> @@ -131,6 +110,7 @@ public async Task PatchAsync(global::OpenApiKiotaClientExample.GeneratedCode.Mod }; await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); } + /// /// Adds existing todoItems to the assignedTodoItems relationship of an individual person. /// @@ -140,15 +120,8 @@ public async Task PatchAsync(global::OpenApiKiotaClientExample.GeneratedCode.Mod /// When receiving a 400 status code /// When receiving a 404 status code /// When receiving a 409 status code -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public async Task PostAsync(global::OpenApiKiotaClientExample.GeneratedCode.Models.ToManyTodoItemInRequest body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { -#nullable restore -#else - public async Task PostAsync(global::OpenApiKiotaClientExample.GeneratedCode.Models.ToManyTodoItemInRequest body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) - { -#endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> @@ -159,21 +132,15 @@ public async Task PostAsync(global::OpenApiKiotaClientExample.GeneratedCode.Mode }; await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); } + /// /// Removes existing todoItems from the assignedTodoItems relationship of an individual person. /// /// A /// 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 ToDeleteRequestInformation(global::OpenApiKiotaClientExample.GeneratedCode.Models.ToManyTodoItemInRequest body, Action>? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToDeleteRequestInformation(global::OpenApiKiotaClientExample.GeneratedCode.Models.ToManyTodoItemInRequest body, Action> requestConfiguration = default) - { -#endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); @@ -181,58 +148,40 @@ public RequestInformation ToDeleteRequestInformation(global::OpenApiKiotaClientE requestInfo.SetContentFromParsable(RequestAdapter, "application/vnd.api+json", body); return requestInfo; } + /// /// Retrieves the related todoItem identities of an individual person's assignedTodoItems relationship. /// /// A /// 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(Method.GET, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/vnd.api+json"); return requestInfo; } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// /// A /// 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 ToHeadRequestInformation(Action>? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToHeadRequestInformation(Action> requestConfiguration = default) - { -#endif var requestInfo = new RequestInformation(Method.HEAD, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); return requestInfo; } + /// /// Assigns existing todoItems to the assignedTodoItems relationship of an individual person. /// /// A /// 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(global::OpenApiKiotaClientExample.GeneratedCode.Models.ToManyTodoItemInRequest body, Action>? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToPatchRequestInformation(global::OpenApiKiotaClientExample.GeneratedCode.Models.ToManyTodoItemInRequest body, Action> requestConfiguration = default) - { -#endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); @@ -240,21 +189,15 @@ public RequestInformation ToPatchRequestInformation(global::OpenApiKiotaClientEx requestInfo.SetContentFromParsable(RequestAdapter, "application/vnd.api+json", body); return requestInfo; } + /// /// Adds existing todoItems to the assignedTodoItems relationship of an individual person. /// /// A /// 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(global::OpenApiKiotaClientExample.GeneratedCode.Models.ToManyTodoItemInRequest body, Action>? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToPostRequestInformation(global::OpenApiKiotaClientExample.GeneratedCode.Models.ToManyTodoItemInRequest body, Action> requestConfiguration = default) - { -#endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); @@ -262,6 +205,7 @@ public RequestInformation ToPostRequestInformation(global::OpenApiKiotaClientExa requestInfo.SetContentFromParsable(RequestAdapter, "application/vnd.api+json", body); return requestInfo; } + /// /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. /// @@ -271,6 +215,7 @@ public RequestInformation ToPostRequestInformation(global::OpenApiKiotaClientExa { return new global::OpenApiKiotaClientExample.GeneratedCode.Api.People.Item.Relationships.AssignedTodoItems.AssignedTodoItemsRequestBuilder(rawUrl, RequestAdapter); } + /// /// Retrieves the related todoItem identities of an individual person's assignedTodoItems relationship. /// @@ -278,16 +223,10 @@ public RequestInformation ToPostRequestInformation(global::OpenApiKiotaClientExa public partial class AssignedTodoItemsRequestBuilderGetQueryParameters { /// For syntax, see the documentation for the [`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// @@ -295,16 +234,10 @@ public partial class AssignedTodoItemsRequestBuilderGetQueryParameters public partial class AssignedTodoItemsRequestBuilderHeadQueryParameters { /// For syntax, see the documentation for the [`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } } } #pragma warning restore CS0618 + diff --git a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Api/People/Item/Relationships/OwnedTodoItems/OwnedTodoItemsRequestBuilder.cs b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Api/People/Item/Relationships/OwnedTodoItems/OwnedTodoItemsRequestBuilder.cs index 6325765d7..09988dfdf 100644 --- a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Api/People/Item/Relationships/OwnedTodoItems/OwnedTodoItemsRequestBuilder.cs +++ b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Api/People/Item/Relationships/OwnedTodoItems/OwnedTodoItemsRequestBuilder.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -25,6 +27,7 @@ public partial class OwnedTodoItemsRequestBuilder : BaseRequestBuilder public OwnedTodoItemsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/api/people/{id}/relationships/ownedTodoItems{?query*}", pathParameters) { } + /// /// Instantiates a new and sets the default values. /// @@ -33,6 +36,7 @@ public OwnedTodoItemsRequestBuilder(Dictionary pathParameters, I public OwnedTodoItemsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/api/people/{id}/relationships/ownedTodoItems{?query*}", rawUrl) { } + /// /// Removes existing todoItems from the ownedTodoItems relationship of an individual person. /// @@ -42,15 +46,8 @@ public OwnedTodoItemsRequestBuilder(string rawUrl, IRequestAdapter requestAdapte /// When receiving a 400 status code /// When receiving a 404 status code /// When receiving a 409 status code -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public async Task DeleteAsync(global::OpenApiKiotaClientExample.GeneratedCode.Models.ToManyTodoItemInRequest body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { -#nullable restore -#else - public async Task DeleteAsync(global::OpenApiKiotaClientExample.GeneratedCode.Models.ToManyTodoItemInRequest body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) - { -#endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = ToDeleteRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> @@ -61,6 +58,7 @@ public async Task DeleteAsync(global::OpenApiKiotaClientExample.GeneratedCode.Mo }; await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); } + /// /// Retrieves the related todoItem identities of an individual person's ownedTodoItems relationship. /// @@ -69,15 +67,8 @@ public async Task DeleteAsync(global::OpenApiKiotaClientExample.GeneratedCode.Mo /// Configuration for the request such as headers, query parameters, and middleware options. /// When receiving a 400 status code /// When receiving a 404 status code -#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> { @@ -86,23 +77,18 @@ public async Task DeleteAsync(global::OpenApiKiotaClientExample.GeneratedCode.Mo }; return await RequestAdapter.SendAsync(requestInfo, global::OpenApiKiotaClientExample.GeneratedCode.Models.TodoItemIdentifierCollectionResponseDocument.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// /// 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 HeadAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { -#nullable restore -#else - public async Task HeadAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) - { -#endif var requestInfo = ToHeadRequestInformation(requestConfiguration); await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); } + /// /// Assigns existing todoItems to the ownedTodoItems relationship of an individual person. /// @@ -112,15 +98,8 @@ public async Task HeadAsync(ActionWhen receiving a 400 status code /// When receiving a 404 status code /// When receiving a 409 status code -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public async Task PatchAsync(global::OpenApiKiotaClientExample.GeneratedCode.Models.ToManyTodoItemInRequest body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { -#nullable restore -#else - public async Task PatchAsync(global::OpenApiKiotaClientExample.GeneratedCode.Models.ToManyTodoItemInRequest body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) - { -#endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> @@ -131,6 +110,7 @@ public async Task PatchAsync(global::OpenApiKiotaClientExample.GeneratedCode.Mod }; await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); } + /// /// Adds existing todoItems to the ownedTodoItems relationship of an individual person. /// @@ -140,15 +120,8 @@ public async Task PatchAsync(global::OpenApiKiotaClientExample.GeneratedCode.Mod /// When receiving a 400 status code /// When receiving a 404 status code /// When receiving a 409 status code -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public async Task PostAsync(global::OpenApiKiotaClientExample.GeneratedCode.Models.ToManyTodoItemInRequest body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { -#nullable restore -#else - public async Task PostAsync(global::OpenApiKiotaClientExample.GeneratedCode.Models.ToManyTodoItemInRequest body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) - { -#endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> @@ -159,21 +132,15 @@ public async Task PostAsync(global::OpenApiKiotaClientExample.GeneratedCode.Mode }; await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); } + /// /// Removes existing todoItems from the ownedTodoItems relationship of an individual person. /// /// A /// 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 ToDeleteRequestInformation(global::OpenApiKiotaClientExample.GeneratedCode.Models.ToManyTodoItemInRequest body, Action>? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToDeleteRequestInformation(global::OpenApiKiotaClientExample.GeneratedCode.Models.ToManyTodoItemInRequest body, Action> requestConfiguration = default) - { -#endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); @@ -181,58 +148,40 @@ public RequestInformation ToDeleteRequestInformation(global::OpenApiKiotaClientE requestInfo.SetContentFromParsable(RequestAdapter, "application/vnd.api+json", body); return requestInfo; } + /// /// Retrieves the related todoItem identities of an individual person's ownedTodoItems relationship. /// /// A /// 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(Method.GET, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/vnd.api+json"); return requestInfo; } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// /// A /// 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 ToHeadRequestInformation(Action>? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToHeadRequestInformation(Action> requestConfiguration = default) - { -#endif var requestInfo = new RequestInformation(Method.HEAD, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); return requestInfo; } + /// /// Assigns existing todoItems to the ownedTodoItems relationship of an individual person. /// /// A /// 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(global::OpenApiKiotaClientExample.GeneratedCode.Models.ToManyTodoItemInRequest body, Action>? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToPatchRequestInformation(global::OpenApiKiotaClientExample.GeneratedCode.Models.ToManyTodoItemInRequest body, Action> requestConfiguration = default) - { -#endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); @@ -240,21 +189,15 @@ public RequestInformation ToPatchRequestInformation(global::OpenApiKiotaClientEx requestInfo.SetContentFromParsable(RequestAdapter, "application/vnd.api+json", body); return requestInfo; } + /// /// Adds existing todoItems to the ownedTodoItems relationship of an individual person. /// /// A /// 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(global::OpenApiKiotaClientExample.GeneratedCode.Models.ToManyTodoItemInRequest body, Action>? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToPostRequestInformation(global::OpenApiKiotaClientExample.GeneratedCode.Models.ToManyTodoItemInRequest body, Action> requestConfiguration = default) - { -#endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); @@ -262,6 +205,7 @@ public RequestInformation ToPostRequestInformation(global::OpenApiKiotaClientExa requestInfo.SetContentFromParsable(RequestAdapter, "application/vnd.api+json", body); return requestInfo; } + /// /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. /// @@ -271,6 +215,7 @@ public RequestInformation ToPostRequestInformation(global::OpenApiKiotaClientExa { return new global::OpenApiKiotaClientExample.GeneratedCode.Api.People.Item.Relationships.OwnedTodoItems.OwnedTodoItemsRequestBuilder(rawUrl, RequestAdapter); } + /// /// Retrieves the related todoItem identities of an individual person's ownedTodoItems relationship. /// @@ -278,16 +223,10 @@ public RequestInformation ToPostRequestInformation(global::OpenApiKiotaClientExa public partial class OwnedTodoItemsRequestBuilderGetQueryParameters { /// For syntax, see the documentation for the [`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// @@ -295,16 +234,10 @@ public partial class OwnedTodoItemsRequestBuilderGetQueryParameters public partial class OwnedTodoItemsRequestBuilderHeadQueryParameters { /// For syntax, see the documentation for the [`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } } } #pragma warning restore CS0618 + diff --git a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Api/People/Item/Relationships/RelationshipsRequestBuilder.cs b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Api/People/Item/Relationships/RelationshipsRequestBuilder.cs index eadbc34e7..057fc3b3a 100644 --- a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Api/People/Item/Relationships/RelationshipsRequestBuilder.cs +++ b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Api/People/Item/Relationships/RelationshipsRequestBuilder.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions; @@ -21,11 +23,13 @@ public partial class RelationshipsRequestBuilder : BaseRequestBuilder { get => new global::OpenApiKiotaClientExample.GeneratedCode.Api.People.Item.Relationships.AssignedTodoItems.AssignedTodoItemsRequestBuilder(PathParameters, RequestAdapter); } + /// The ownedTodoItems property public global::OpenApiKiotaClientExample.GeneratedCode.Api.People.Item.Relationships.OwnedTodoItems.OwnedTodoItemsRequestBuilder OwnedTodoItems { get => new global::OpenApiKiotaClientExample.GeneratedCode.Api.People.Item.Relationships.OwnedTodoItems.OwnedTodoItemsRequestBuilder(PathParameters, RequestAdapter); } + /// /// Instantiates a new and sets the default values. /// @@ -34,6 +38,7 @@ public partial class RelationshipsRequestBuilder : BaseRequestBuilder public RelationshipsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/api/people/{id}/relationships", pathParameters) { } + /// /// Instantiates a new and sets the default values. /// @@ -45,3 +50,4 @@ public RelationshipsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter } } #pragma warning restore CS0618 + diff --git a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Api/People/PeopleRequestBuilder.cs b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Api/People/PeopleRequestBuilder.cs index 71d7b6d2d..00198dc00 100644 --- a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Api/People/PeopleRequestBuilder.cs +++ b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Api/People/PeopleRequestBuilder.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -30,6 +32,7 @@ public partial class PeopleRequestBuilder : BaseRequestBuilder return new global::OpenApiKiotaClientExample.GeneratedCode.Api.People.Item.PeopleItemRequestBuilder(urlTplParams, RequestAdapter); } } + /// /// Instantiates a new and sets the default values. /// @@ -38,6 +41,7 @@ public partial class PeopleRequestBuilder : BaseRequestBuilder public PeopleRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/api/people{?query*}", pathParameters) { } + /// /// Instantiates a new and sets the default values. /// @@ -46,6 +50,7 @@ public PeopleRequestBuilder(Dictionary pathParameters, IRequestA public PeopleRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/api/people{?query*}", rawUrl) { } + /// /// Retrieves a collection of people. /// @@ -53,15 +58,8 @@ public PeopleRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas /// Cancellation token to use when cancelling requests /// Configuration for the request such as headers, query parameters, and middleware options. /// When receiving a 400 status code -#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> { @@ -69,23 +67,18 @@ public PeopleRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas }; return await RequestAdapter.SendAsync(requestInfo, global::OpenApiKiotaClientExample.GeneratedCode.Models.PersonCollectionResponseDocument.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// /// 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 HeadAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { -#nullable restore -#else - public async Task HeadAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) - { -#endif var requestInfo = ToHeadRequestInformation(requestConfiguration); await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); } + /// /// Creates a new person. /// @@ -98,15 +91,8 @@ public async Task HeadAsync(ActionWhen receiving a 404 status code /// When receiving a 409 status code /// When receiving a 422 status code -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public async Task PostAsync(global::OpenApiKiotaClientExample.GeneratedCode.Models.CreatePersonRequestDocument body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { -#nullable restore -#else - public async Task PostAsync(global::OpenApiKiotaClientExample.GeneratedCode.Models.CreatePersonRequestDocument body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) - { -#endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> @@ -119,58 +105,40 @@ public async Task HeadAsync(Action(requestInfo, global::OpenApiKiotaClientExample.GeneratedCode.Models.PersonPrimaryResponseDocument.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } + /// /// Retrieves a collection of people. /// /// A /// 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(Method.GET, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/vnd.api+json"); return requestInfo; } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// /// A /// 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 ToHeadRequestInformation(Action>? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToHeadRequestInformation(Action> requestConfiguration = default) - { -#endif var requestInfo = new RequestInformation(Method.HEAD, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); return requestInfo; } + /// /// Creates a new person. /// /// A /// 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(global::OpenApiKiotaClientExample.GeneratedCode.Models.CreatePersonRequestDocument body, Action>? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToPostRequestInformation(global::OpenApiKiotaClientExample.GeneratedCode.Models.CreatePersonRequestDocument body, Action> requestConfiguration = default) - { -#endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); @@ -178,6 +146,7 @@ public RequestInformation ToPostRequestInformation(global::OpenApiKiotaClientExa requestInfo.SetContentFromParsable(RequestAdapter, "application/vnd.api+json", body); return requestInfo; } + /// /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. /// @@ -187,6 +156,7 @@ public RequestInformation ToPostRequestInformation(global::OpenApiKiotaClientExa { return new global::OpenApiKiotaClientExample.GeneratedCode.Api.People.PeopleRequestBuilder(rawUrl, RequestAdapter); } + /// /// Retrieves a collection of people. /// @@ -194,16 +164,10 @@ public RequestInformation ToPostRequestInformation(global::OpenApiKiotaClientExa public partial class PeopleRequestBuilderGetQueryParameters { /// For syntax, see the documentation for the [`include`](https://www.jsonapi.net/usage/reading/including-relationships.html)/[`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// @@ -211,16 +175,10 @@ public partial class PeopleRequestBuilderGetQueryParameters public partial class PeopleRequestBuilderHeadQueryParameters { /// For syntax, see the documentation for the [`include`](https://www.jsonapi.net/usage/reading/including-relationships.html)/[`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } + /// /// Creates a new person. /// @@ -228,16 +186,10 @@ public partial class PeopleRequestBuilderHeadQueryParameters public partial class PeopleRequestBuilderPostQueryParameters { /// For syntax, see the documentation for the [`include`](https://www.jsonapi.net/usage/reading/including-relationships.html)/[`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } } } #pragma warning restore CS0618 + diff --git a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Api/Tags/Item/Relationships/RelationshipsRequestBuilder.cs b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Api/Tags/Item/Relationships/RelationshipsRequestBuilder.cs index 859c1bdbc..52a7577dc 100644 --- a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Api/Tags/Item/Relationships/RelationshipsRequestBuilder.cs +++ b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Api/Tags/Item/Relationships/RelationshipsRequestBuilder.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions; @@ -20,6 +22,7 @@ public partial class RelationshipsRequestBuilder : BaseRequestBuilder { get => new global::OpenApiKiotaClientExample.GeneratedCode.Api.Tags.Item.Relationships.TodoItems.TodoItemsRequestBuilder(PathParameters, RequestAdapter); } + /// /// Instantiates a new and sets the default values. /// @@ -28,6 +31,7 @@ public partial class RelationshipsRequestBuilder : BaseRequestBuilder public RelationshipsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/api/tags/{id}/relationships", pathParameters) { } + /// /// Instantiates a new and sets the default values. /// @@ -39,3 +43,4 @@ public RelationshipsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter } } #pragma warning restore CS0618 + diff --git a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Api/Tags/Item/Relationships/TodoItems/TodoItemsRequestBuilder.cs b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Api/Tags/Item/Relationships/TodoItems/TodoItemsRequestBuilder.cs index 3aa92b713..972561201 100644 --- a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Api/Tags/Item/Relationships/TodoItems/TodoItemsRequestBuilder.cs +++ b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Api/Tags/Item/Relationships/TodoItems/TodoItemsRequestBuilder.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -25,6 +27,7 @@ public partial class TodoItemsRequestBuilder : BaseRequestBuilder public TodoItemsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/api/tags/{id}/relationships/todoItems{?query*}", pathParameters) { } + /// /// Instantiates a new and sets the default values. /// @@ -33,6 +36,7 @@ public TodoItemsRequestBuilder(Dictionary pathParameters, IReque public TodoItemsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/api/tags/{id}/relationships/todoItems{?query*}", rawUrl) { } + /// /// Removes existing todoItems from the todoItems relationship of an individual tag. /// @@ -42,15 +46,8 @@ public TodoItemsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : /// When receiving a 400 status code /// When receiving a 404 status code /// When receiving a 409 status code -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public async Task DeleteAsync(global::OpenApiKiotaClientExample.GeneratedCode.Models.ToManyTodoItemInRequest body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { -#nullable restore -#else - public async Task DeleteAsync(global::OpenApiKiotaClientExample.GeneratedCode.Models.ToManyTodoItemInRequest body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) - { -#endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = ToDeleteRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> @@ -61,6 +58,7 @@ public async Task DeleteAsync(global::OpenApiKiotaClientExample.GeneratedCode.Mo }; await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); } + /// /// Retrieves the related todoItem identities of an individual tag's todoItems relationship. /// @@ -69,15 +67,8 @@ public async Task DeleteAsync(global::OpenApiKiotaClientExample.GeneratedCode.Mo /// Configuration for the request such as headers, query parameters, and middleware options. /// When receiving a 400 status code /// When receiving a 404 status code -#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> { @@ -86,23 +77,18 @@ public async Task DeleteAsync(global::OpenApiKiotaClientExample.GeneratedCode.Mo }; return await RequestAdapter.SendAsync(requestInfo, global::OpenApiKiotaClientExample.GeneratedCode.Models.TodoItemIdentifierCollectionResponseDocument.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// /// 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 HeadAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { -#nullable restore -#else - public async Task HeadAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) - { -#endif var requestInfo = ToHeadRequestInformation(requestConfiguration); await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); } + /// /// Assigns existing todoItems to the todoItems relationship of an individual tag. /// @@ -112,15 +98,8 @@ public async Task HeadAsync(ActionWhen receiving a 400 status code /// When receiving a 404 status code /// When receiving a 409 status code -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public async Task PatchAsync(global::OpenApiKiotaClientExample.GeneratedCode.Models.ToManyTodoItemInRequest body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { -#nullable restore -#else - public async Task PatchAsync(global::OpenApiKiotaClientExample.GeneratedCode.Models.ToManyTodoItemInRequest body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) - { -#endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> @@ -131,6 +110,7 @@ public async Task PatchAsync(global::OpenApiKiotaClientExample.GeneratedCode.Mod }; await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); } + /// /// Adds existing todoItems to the todoItems relationship of an individual tag. /// @@ -140,15 +120,8 @@ public async Task PatchAsync(global::OpenApiKiotaClientExample.GeneratedCode.Mod /// When receiving a 400 status code /// When receiving a 404 status code /// When receiving a 409 status code -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public async Task PostAsync(global::OpenApiKiotaClientExample.GeneratedCode.Models.ToManyTodoItemInRequest body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { -#nullable restore -#else - public async Task PostAsync(global::OpenApiKiotaClientExample.GeneratedCode.Models.ToManyTodoItemInRequest body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) - { -#endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> @@ -159,21 +132,15 @@ public async Task PostAsync(global::OpenApiKiotaClientExample.GeneratedCode.Mode }; await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); } + /// /// Removes existing todoItems from the todoItems relationship of an individual tag. /// /// A /// 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 ToDeleteRequestInformation(global::OpenApiKiotaClientExample.GeneratedCode.Models.ToManyTodoItemInRequest body, Action>? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToDeleteRequestInformation(global::OpenApiKiotaClientExample.GeneratedCode.Models.ToManyTodoItemInRequest body, Action> requestConfiguration = default) - { -#endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); @@ -181,58 +148,40 @@ public RequestInformation ToDeleteRequestInformation(global::OpenApiKiotaClientE requestInfo.SetContentFromParsable(RequestAdapter, "application/vnd.api+json", body); return requestInfo; } + /// /// Retrieves the related todoItem identities of an individual tag's todoItems relationship. /// /// A /// 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(Method.GET, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/vnd.api+json"); return requestInfo; } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// /// A /// 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 ToHeadRequestInformation(Action>? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToHeadRequestInformation(Action> requestConfiguration = default) - { -#endif var requestInfo = new RequestInformation(Method.HEAD, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); return requestInfo; } + /// /// Assigns existing todoItems to the todoItems relationship of an individual tag. /// /// A /// 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(global::OpenApiKiotaClientExample.GeneratedCode.Models.ToManyTodoItemInRequest body, Action>? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToPatchRequestInformation(global::OpenApiKiotaClientExample.GeneratedCode.Models.ToManyTodoItemInRequest body, Action> requestConfiguration = default) - { -#endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); @@ -240,21 +189,15 @@ public RequestInformation ToPatchRequestInformation(global::OpenApiKiotaClientEx requestInfo.SetContentFromParsable(RequestAdapter, "application/vnd.api+json", body); return requestInfo; } + /// /// Adds existing todoItems to the todoItems relationship of an individual tag. /// /// A /// 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(global::OpenApiKiotaClientExample.GeneratedCode.Models.ToManyTodoItemInRequest body, Action>? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToPostRequestInformation(global::OpenApiKiotaClientExample.GeneratedCode.Models.ToManyTodoItemInRequest body, Action> requestConfiguration = default) - { -#endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); @@ -262,6 +205,7 @@ public RequestInformation ToPostRequestInformation(global::OpenApiKiotaClientExa requestInfo.SetContentFromParsable(RequestAdapter, "application/vnd.api+json", body); return requestInfo; } + /// /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. /// @@ -271,6 +215,7 @@ public RequestInformation ToPostRequestInformation(global::OpenApiKiotaClientExa { return new global::OpenApiKiotaClientExample.GeneratedCode.Api.Tags.Item.Relationships.TodoItems.TodoItemsRequestBuilder(rawUrl, RequestAdapter); } + /// /// Retrieves the related todoItem identities of an individual tag's todoItems relationship. /// @@ -278,16 +223,10 @@ public RequestInformation ToPostRequestInformation(global::OpenApiKiotaClientExa public partial class TodoItemsRequestBuilderGetQueryParameters { /// For syntax, see the documentation for the [`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// @@ -295,16 +234,10 @@ public partial class TodoItemsRequestBuilderGetQueryParameters public partial class TodoItemsRequestBuilderHeadQueryParameters { /// For syntax, see the documentation for the [`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } } } #pragma warning restore CS0618 + diff --git a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Api/Tags/Item/TagsItemRequestBuilder.cs b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Api/Tags/Item/TagsItemRequestBuilder.cs index 6bba9a4b6..489d04da9 100644 --- a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Api/Tags/Item/TagsItemRequestBuilder.cs +++ b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Api/Tags/Item/TagsItemRequestBuilder.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -24,11 +26,13 @@ public partial class TagsItemRequestBuilder : BaseRequestBuilder { get => new global::OpenApiKiotaClientExample.GeneratedCode.Api.Tags.Item.Relationships.RelationshipsRequestBuilder(PathParameters, RequestAdapter); } + /// The todoItems property public global::OpenApiKiotaClientExample.GeneratedCode.Api.Tags.Item.TodoItems.TodoItemsRequestBuilder TodoItems { get => new global::OpenApiKiotaClientExample.GeneratedCode.Api.Tags.Item.TodoItems.TodoItemsRequestBuilder(PathParameters, RequestAdapter); } + /// /// Instantiates a new and sets the default values. /// @@ -37,6 +41,7 @@ public partial class TagsItemRequestBuilder : BaseRequestBuilder public TagsItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/api/tags/{id}{?query*}", pathParameters) { } + /// /// Instantiates a new and sets the default values. /// @@ -45,21 +50,15 @@ public TagsItemRequestBuilder(Dictionary pathParameters, IReques public TagsItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/api/tags/{id}{?query*}", rawUrl) { } + /// /// Deletes an existing tag by its identifier. /// /// Cancellation token to use when cancelling requests /// Configuration for the request such as headers, query parameters, and middleware options. /// When receiving a 404 status code -#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> { @@ -67,6 +66,7 @@ public async Task DeleteAsync(Action /// Retrieves an individual tag by its identifier. /// @@ -75,15 +75,8 @@ public async Task DeleteAsync(ActionConfiguration for the request such as headers, query parameters, and middleware options. /// When receiving a 400 status code /// When receiving a 404 status code -#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> { @@ -92,23 +85,18 @@ public async Task DeleteAsync(Action(requestInfo, global::OpenApiKiotaClientExample.GeneratedCode.Models.TagPrimaryResponseDocument.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// /// 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 HeadAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { -#nullable restore -#else - public async Task HeadAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) - { -#endif var requestInfo = ToHeadRequestInformation(requestConfiguration); await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); } + /// /// Updates an existing tag. /// @@ -120,15 +108,8 @@ public async Task HeadAsync(ActionWhen receiving a 404 status code /// When receiving a 409 status code /// When receiving a 422 status code -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public async Task PatchAsync(global::OpenApiKiotaClientExample.GeneratedCode.Models.UpdateTagRequestDocument body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { -#nullable restore -#else - public async Task PatchAsync(global::OpenApiKiotaClientExample.GeneratedCode.Models.UpdateTagRequestDocument body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) - { -#endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> @@ -140,77 +121,53 @@ public async Task HeadAsync(Action(requestInfo, global::OpenApiKiotaClientExample.GeneratedCode.Models.TagPrimaryResponseDocument.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } + /// /// Deletes an existing tag by its identifier. /// /// A /// 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(Method.DELETE, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/vnd.api+json"); return requestInfo; } + /// /// Retrieves an individual tag by its identifier. /// /// A /// 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(Method.GET, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/vnd.api+json"); return requestInfo; } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// /// A /// 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 ToHeadRequestInformation(Action>? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToHeadRequestInformation(Action> requestConfiguration = default) - { -#endif var requestInfo = new RequestInformation(Method.HEAD, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); return requestInfo; } + /// /// Updates an existing tag. /// /// A /// 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(global::OpenApiKiotaClientExample.GeneratedCode.Models.UpdateTagRequestDocument body, Action>? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToPatchRequestInformation(global::OpenApiKiotaClientExample.GeneratedCode.Models.UpdateTagRequestDocument body, Action> requestConfiguration = default) - { -#endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); @@ -218,6 +175,7 @@ public RequestInformation ToPatchRequestInformation(global::OpenApiKiotaClientEx requestInfo.SetContentFromParsable(RequestAdapter, "application/vnd.api+json", body); return requestInfo; } + /// /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. /// @@ -227,6 +185,7 @@ public RequestInformation ToPatchRequestInformation(global::OpenApiKiotaClientEx { return new global::OpenApiKiotaClientExample.GeneratedCode.Api.Tags.Item.TagsItemRequestBuilder(rawUrl, RequestAdapter); } + /// /// Retrieves an individual tag by its identifier. /// @@ -234,16 +193,10 @@ public RequestInformation ToPatchRequestInformation(global::OpenApiKiotaClientEx public partial class TagsItemRequestBuilderGetQueryParameters { /// For syntax, see the documentation for the [`include`](https://www.jsonapi.net/usage/reading/including-relationships.html)/[`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// @@ -251,16 +204,10 @@ public partial class TagsItemRequestBuilderGetQueryParameters public partial class TagsItemRequestBuilderHeadQueryParameters { /// For syntax, see the documentation for the [`include`](https://www.jsonapi.net/usage/reading/including-relationships.html)/[`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } + /// /// Updates an existing tag. /// @@ -268,16 +215,10 @@ public partial class TagsItemRequestBuilderHeadQueryParameters public partial class TagsItemRequestBuilderPatchQueryParameters { /// For syntax, see the documentation for the [`include`](https://www.jsonapi.net/usage/reading/including-relationships.html)/[`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } } } #pragma warning restore CS0618 + diff --git a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Api/Tags/Item/TodoItems/TodoItemsRequestBuilder.cs b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Api/Tags/Item/TodoItems/TodoItemsRequestBuilder.cs index bf4536f03..192652b0b 100644 --- a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Api/Tags/Item/TodoItems/TodoItemsRequestBuilder.cs +++ b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Api/Tags/Item/TodoItems/TodoItemsRequestBuilder.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -25,6 +27,7 @@ public partial class TodoItemsRequestBuilder : BaseRequestBuilder public TodoItemsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/api/tags/{id}/todoItems{?query*}", pathParameters) { } + /// /// Instantiates a new and sets the default values. /// @@ -33,6 +36,7 @@ public TodoItemsRequestBuilder(Dictionary pathParameters, IReque public TodoItemsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/api/tags/{id}/todoItems{?query*}", rawUrl) { } + /// /// Retrieves the related todoItems of an individual tag's todoItems relationship. /// @@ -41,15 +45,8 @@ public TodoItemsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : /// Configuration for the request such as headers, query parameters, and middleware options. /// When receiving a 400 status code /// When receiving a 404 status code -#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> { @@ -58,60 +55,43 @@ public TodoItemsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : }; return await RequestAdapter.SendAsync(requestInfo, global::OpenApiKiotaClientExample.GeneratedCode.Models.TodoItemCollectionResponseDocument.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// /// 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 HeadAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { -#nullable restore -#else - public async Task HeadAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) - { -#endif var requestInfo = ToHeadRequestInformation(requestConfiguration); await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); } + /// /// Retrieves the related todoItems of an individual tag's todoItems relationship. /// /// A /// 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(Method.GET, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/vnd.api+json"); return requestInfo; } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// /// A /// 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 ToHeadRequestInformation(Action>? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToHeadRequestInformation(Action> requestConfiguration = default) - { -#endif var requestInfo = new RequestInformation(Method.HEAD, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); return requestInfo; } + /// /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. /// @@ -121,6 +101,7 @@ public RequestInformation ToHeadRequestInformation(Action /// Retrieves the related todoItems of an individual tag's todoItems relationship. /// @@ -128,16 +109,10 @@ public RequestInformation ToHeadRequestInformation(ActionFor syntax, see the documentation for the [`include`](https://www.jsonapi.net/usage/reading/including-relationships.html)/[`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// @@ -145,16 +120,10 @@ public partial class TodoItemsRequestBuilderGetQueryParameters public partial class TodoItemsRequestBuilderHeadQueryParameters { /// For syntax, see the documentation for the [`include`](https://www.jsonapi.net/usage/reading/including-relationships.html)/[`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } } } #pragma warning restore CS0618 + diff --git a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Api/Tags/TagsRequestBuilder.cs b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Api/Tags/TagsRequestBuilder.cs index 929ea0967..2ebee596c 100644 --- a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Api/Tags/TagsRequestBuilder.cs +++ b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Api/Tags/TagsRequestBuilder.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -30,6 +32,7 @@ public partial class TagsRequestBuilder : BaseRequestBuilder return new global::OpenApiKiotaClientExample.GeneratedCode.Api.Tags.Item.TagsItemRequestBuilder(urlTplParams, RequestAdapter); } } + /// /// Instantiates a new and sets the default values. /// @@ -38,6 +41,7 @@ public partial class TagsRequestBuilder : BaseRequestBuilder public TagsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/api/tags{?query*}", pathParameters) { } + /// /// Instantiates a new and sets the default values. /// @@ -46,6 +50,7 @@ public TagsRequestBuilder(Dictionary pathParameters, IRequestAda public TagsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/api/tags{?query*}", rawUrl) { } + /// /// Retrieves a collection of tags. /// @@ -53,15 +58,8 @@ public TagsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base( /// Cancellation token to use when cancelling requests /// Configuration for the request such as headers, query parameters, and middleware options. /// When receiving a 400 status code -#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> { @@ -69,23 +67,18 @@ public TagsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base( }; return await RequestAdapter.SendAsync(requestInfo, global::OpenApiKiotaClientExample.GeneratedCode.Models.TagCollectionResponseDocument.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// /// 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 HeadAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { -#nullable restore -#else - public async Task HeadAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) - { -#endif var requestInfo = ToHeadRequestInformation(requestConfiguration); await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); } + /// /// Creates a new tag. /// @@ -98,15 +91,8 @@ public async Task HeadAsync(ActionWhen receiving a 404 status code /// When receiving a 409 status code /// When receiving a 422 status code -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public async Task PostAsync(global::OpenApiKiotaClientExample.GeneratedCode.Models.CreateTagRequestDocument body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { -#nullable restore -#else - public async Task PostAsync(global::OpenApiKiotaClientExample.GeneratedCode.Models.CreateTagRequestDocument body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) - { -#endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> @@ -119,58 +105,40 @@ public async Task HeadAsync(Action(requestInfo, global::OpenApiKiotaClientExample.GeneratedCode.Models.TagPrimaryResponseDocument.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } + /// /// Retrieves a collection of tags. /// /// A /// 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(Method.GET, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/vnd.api+json"); return requestInfo; } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// /// A /// 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 ToHeadRequestInformation(Action>? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToHeadRequestInformation(Action> requestConfiguration = default) - { -#endif var requestInfo = new RequestInformation(Method.HEAD, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); return requestInfo; } + /// /// Creates a new tag. /// /// A /// 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(global::OpenApiKiotaClientExample.GeneratedCode.Models.CreateTagRequestDocument body, Action>? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToPostRequestInformation(global::OpenApiKiotaClientExample.GeneratedCode.Models.CreateTagRequestDocument body, Action> requestConfiguration = default) - { -#endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); @@ -178,6 +146,7 @@ public RequestInformation ToPostRequestInformation(global::OpenApiKiotaClientExa requestInfo.SetContentFromParsable(RequestAdapter, "application/vnd.api+json", body); return requestInfo; } + /// /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. /// @@ -187,6 +156,7 @@ public RequestInformation ToPostRequestInformation(global::OpenApiKiotaClientExa { return new global::OpenApiKiotaClientExample.GeneratedCode.Api.Tags.TagsRequestBuilder(rawUrl, RequestAdapter); } + /// /// Retrieves a collection of tags. /// @@ -194,16 +164,10 @@ public RequestInformation ToPostRequestInformation(global::OpenApiKiotaClientExa public partial class TagsRequestBuilderGetQueryParameters { /// For syntax, see the documentation for the [`include`](https://www.jsonapi.net/usage/reading/including-relationships.html)/[`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// @@ -211,16 +175,10 @@ public partial class TagsRequestBuilderGetQueryParameters public partial class TagsRequestBuilderHeadQueryParameters { /// For syntax, see the documentation for the [`include`](https://www.jsonapi.net/usage/reading/including-relationships.html)/[`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } + /// /// Creates a new tag. /// @@ -228,16 +186,10 @@ public partial class TagsRequestBuilderHeadQueryParameters public partial class TagsRequestBuilderPostQueryParameters { /// For syntax, see the documentation for the [`include`](https://www.jsonapi.net/usage/reading/including-relationships.html)/[`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } } } #pragma warning restore CS0618 + diff --git a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Api/TodoItems/Item/Assignee/AssigneeRequestBuilder.cs b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Api/TodoItems/Item/Assignee/AssigneeRequestBuilder.cs index dd7103b4f..26e3f2173 100644 --- a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Api/TodoItems/Item/Assignee/AssigneeRequestBuilder.cs +++ b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Api/TodoItems/Item/Assignee/AssigneeRequestBuilder.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -25,6 +27,7 @@ public partial class AssigneeRequestBuilder : BaseRequestBuilder public AssigneeRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/api/todoItems/{id}/assignee{?query*}", pathParameters) { } + /// /// Instantiates a new and sets the default values. /// @@ -33,6 +36,7 @@ public AssigneeRequestBuilder(Dictionary pathParameters, IReques public AssigneeRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/api/todoItems/{id}/assignee{?query*}", rawUrl) { } + /// /// Retrieves the related person of an individual todoItem's assignee relationship. /// @@ -41,15 +45,8 @@ public AssigneeRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b /// Configuration for the request such as headers, query parameters, and middleware options. /// When receiving a 400 status code /// When receiving a 404 status code -#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> { @@ -58,60 +55,43 @@ public AssigneeRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b }; return await RequestAdapter.SendAsync(requestInfo, global::OpenApiKiotaClientExample.GeneratedCode.Models.NullablePersonSecondaryResponseDocument.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// /// 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 HeadAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { -#nullable restore -#else - public async Task HeadAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) - { -#endif var requestInfo = ToHeadRequestInformation(requestConfiguration); await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); } + /// /// Retrieves the related person of an individual todoItem's assignee relationship. /// /// A /// 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(Method.GET, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/vnd.api+json"); return requestInfo; } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// /// A /// 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 ToHeadRequestInformation(Action>? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToHeadRequestInformation(Action> requestConfiguration = default) - { -#endif var requestInfo = new RequestInformation(Method.HEAD, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); return requestInfo; } + /// /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. /// @@ -121,6 +101,7 @@ public RequestInformation ToHeadRequestInformation(Action /// Retrieves the related person of an individual todoItem's assignee relationship. /// @@ -128,16 +109,10 @@ public RequestInformation ToHeadRequestInformation(ActionFor syntax, see the documentation for the [`include`](https://www.jsonapi.net/usage/reading/including-relationships.html)/[`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// @@ -145,16 +120,10 @@ public partial class AssigneeRequestBuilderGetQueryParameters public partial class AssigneeRequestBuilderHeadQueryParameters { /// For syntax, see the documentation for the [`include`](https://www.jsonapi.net/usage/reading/including-relationships.html)/[`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } } } #pragma warning restore CS0618 + diff --git a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Api/TodoItems/Item/Owner/OwnerRequestBuilder.cs b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Api/TodoItems/Item/Owner/OwnerRequestBuilder.cs index 546f762cd..c50054073 100644 --- a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Api/TodoItems/Item/Owner/OwnerRequestBuilder.cs +++ b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Api/TodoItems/Item/Owner/OwnerRequestBuilder.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -25,6 +27,7 @@ public partial class OwnerRequestBuilder : BaseRequestBuilder public OwnerRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/api/todoItems/{id}/owner{?query*}", pathParameters) { } + /// /// Instantiates a new and sets the default values. /// @@ -33,6 +36,7 @@ public OwnerRequestBuilder(Dictionary pathParameters, IRequestAd public OwnerRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/api/todoItems/{id}/owner{?query*}", rawUrl) { } + /// /// Retrieves the related person of an individual todoItem's owner relationship. /// @@ -41,15 +45,8 @@ public OwnerRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base /// Configuration for the request such as headers, query parameters, and middleware options. /// When receiving a 400 status code /// When receiving a 404 status code -#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> { @@ -58,60 +55,43 @@ public OwnerRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base }; return await RequestAdapter.SendAsync(requestInfo, global::OpenApiKiotaClientExample.GeneratedCode.Models.PersonSecondaryResponseDocument.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// /// 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 HeadAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { -#nullable restore -#else - public async Task HeadAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) - { -#endif var requestInfo = ToHeadRequestInformation(requestConfiguration); await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); } + /// /// Retrieves the related person of an individual todoItem's owner relationship. /// /// A /// 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(Method.GET, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/vnd.api+json"); return requestInfo; } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// /// A /// 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 ToHeadRequestInformation(Action>? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToHeadRequestInformation(Action> requestConfiguration = default) - { -#endif var requestInfo = new RequestInformation(Method.HEAD, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); return requestInfo; } + /// /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. /// @@ -121,6 +101,7 @@ public RequestInformation ToHeadRequestInformation(Action /// Retrieves the related person of an individual todoItem's owner relationship. /// @@ -128,16 +109,10 @@ public RequestInformation ToHeadRequestInformation(ActionFor syntax, see the documentation for the [`include`](https://www.jsonapi.net/usage/reading/including-relationships.html)/[`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// @@ -145,16 +120,10 @@ public partial class OwnerRequestBuilderGetQueryParameters public partial class OwnerRequestBuilderHeadQueryParameters { /// For syntax, see the documentation for the [`include`](https://www.jsonapi.net/usage/reading/including-relationships.html)/[`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } } } #pragma warning restore CS0618 + diff --git a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Api/TodoItems/Item/Relationships/Assignee/AssigneeRequestBuilder.cs b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Api/TodoItems/Item/Relationships/Assignee/AssigneeRequestBuilder.cs index b449cbee2..aa31f39d9 100644 --- a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Api/TodoItems/Item/Relationships/Assignee/AssigneeRequestBuilder.cs +++ b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Api/TodoItems/Item/Relationships/Assignee/AssigneeRequestBuilder.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -25,6 +27,7 @@ public partial class AssigneeRequestBuilder : BaseRequestBuilder public AssigneeRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/api/todoItems/{id}/relationships/assignee{?query*}", pathParameters) { } + /// /// Instantiates a new and sets the default values. /// @@ -33,6 +36,7 @@ public AssigneeRequestBuilder(Dictionary pathParameters, IReques public AssigneeRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/api/todoItems/{id}/relationships/assignee{?query*}", rawUrl) { } + /// /// Retrieves the related person identity of an individual todoItem's assignee relationship. /// @@ -41,15 +45,8 @@ public AssigneeRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b /// Configuration for the request such as headers, query parameters, and middleware options. /// When receiving a 400 status code /// When receiving a 404 status code -#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> { @@ -58,23 +55,18 @@ public AssigneeRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b }; return await RequestAdapter.SendAsync(requestInfo, global::OpenApiKiotaClientExample.GeneratedCode.Models.NullablePersonIdentifierResponseDocument.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// /// 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 HeadAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { -#nullable restore -#else - public async Task HeadAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) - { -#endif var requestInfo = ToHeadRequestInformation(requestConfiguration); await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); } + /// /// Clears or assigns an existing person to the assignee relationship of an individual todoItem. /// @@ -84,15 +76,8 @@ public async Task HeadAsync(ActionWhen receiving a 400 status code /// When receiving a 404 status code /// When receiving a 409 status code -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public async Task PatchAsync(global::OpenApiKiotaClientExample.GeneratedCode.Models.NullableToOnePersonInRequest body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { -#nullable restore -#else - public async Task PatchAsync(global::OpenApiKiotaClientExample.GeneratedCode.Models.NullableToOnePersonInRequest body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) - { -#endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> @@ -103,58 +88,40 @@ public async Task PatchAsync(global::OpenApiKiotaClientExample.GeneratedCode.Mod }; await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); } + /// /// Retrieves the related person identity of an individual todoItem's assignee relationship. /// /// A /// 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(Method.GET, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/vnd.api+json"); return requestInfo; } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// /// A /// 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 ToHeadRequestInformation(Action>? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToHeadRequestInformation(Action> requestConfiguration = default) - { -#endif var requestInfo = new RequestInformation(Method.HEAD, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); return requestInfo; } + /// /// Clears or assigns an existing person to the assignee relationship of an individual todoItem. /// /// A /// 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(global::OpenApiKiotaClientExample.GeneratedCode.Models.NullableToOnePersonInRequest body, Action>? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToPatchRequestInformation(global::OpenApiKiotaClientExample.GeneratedCode.Models.NullableToOnePersonInRequest body, Action> requestConfiguration = default) - { -#endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); @@ -162,6 +129,7 @@ public RequestInformation ToPatchRequestInformation(global::OpenApiKiotaClientEx requestInfo.SetContentFromParsable(RequestAdapter, "application/vnd.api+json", body); return requestInfo; } + /// /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. /// @@ -171,6 +139,7 @@ public RequestInformation ToPatchRequestInformation(global::OpenApiKiotaClientEx { return new global::OpenApiKiotaClientExample.GeneratedCode.Api.TodoItems.Item.Relationships.Assignee.AssigneeRequestBuilder(rawUrl, RequestAdapter); } + /// /// Retrieves the related person identity of an individual todoItem's assignee relationship. /// @@ -178,16 +147,10 @@ public RequestInformation ToPatchRequestInformation(global::OpenApiKiotaClientEx public partial class AssigneeRequestBuilderGetQueryParameters { /// For syntax, see the documentation for the [`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// @@ -195,16 +158,10 @@ public partial class AssigneeRequestBuilderGetQueryParameters public partial class AssigneeRequestBuilderHeadQueryParameters { /// For syntax, see the documentation for the [`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } } } #pragma warning restore CS0618 + diff --git a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Api/TodoItems/Item/Relationships/Owner/OwnerRequestBuilder.cs b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Api/TodoItems/Item/Relationships/Owner/OwnerRequestBuilder.cs index 090a2b122..95bf12301 100644 --- a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Api/TodoItems/Item/Relationships/Owner/OwnerRequestBuilder.cs +++ b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Api/TodoItems/Item/Relationships/Owner/OwnerRequestBuilder.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -25,6 +27,7 @@ public partial class OwnerRequestBuilder : BaseRequestBuilder public OwnerRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/api/todoItems/{id}/relationships/owner{?query*}", pathParameters) { } + /// /// Instantiates a new and sets the default values. /// @@ -33,6 +36,7 @@ public OwnerRequestBuilder(Dictionary pathParameters, IRequestAd public OwnerRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/api/todoItems/{id}/relationships/owner{?query*}", rawUrl) { } + /// /// Retrieves the related person identity of an individual todoItem's owner relationship. /// @@ -41,15 +45,8 @@ public OwnerRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base /// Configuration for the request such as headers, query parameters, and middleware options. /// When receiving a 400 status code /// When receiving a 404 status code -#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> { @@ -58,23 +55,18 @@ public OwnerRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base }; return await RequestAdapter.SendAsync(requestInfo, global::OpenApiKiotaClientExample.GeneratedCode.Models.PersonIdentifierResponseDocument.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// /// 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 HeadAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { -#nullable restore -#else - public async Task HeadAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) - { -#endif var requestInfo = ToHeadRequestInformation(requestConfiguration); await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); } + /// /// Assigns an existing person to the owner relationship of an individual todoItem. /// @@ -84,15 +76,8 @@ public async Task HeadAsync(ActionWhen receiving a 400 status code /// When receiving a 404 status code /// When receiving a 409 status code -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public async Task PatchAsync(global::OpenApiKiotaClientExample.GeneratedCode.Models.ToOnePersonInRequest body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { -#nullable restore -#else - public async Task PatchAsync(global::OpenApiKiotaClientExample.GeneratedCode.Models.ToOnePersonInRequest body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) - { -#endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> @@ -103,58 +88,40 @@ public async Task PatchAsync(global::OpenApiKiotaClientExample.GeneratedCode.Mod }; await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); } + /// /// Retrieves the related person identity of an individual todoItem's owner relationship. /// /// A /// 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(Method.GET, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/vnd.api+json"); return requestInfo; } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// /// A /// 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 ToHeadRequestInformation(Action>? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToHeadRequestInformation(Action> requestConfiguration = default) - { -#endif var requestInfo = new RequestInformation(Method.HEAD, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); return requestInfo; } + /// /// Assigns an existing person to the owner relationship of an individual todoItem. /// /// A /// 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(global::OpenApiKiotaClientExample.GeneratedCode.Models.ToOnePersonInRequest body, Action>? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToPatchRequestInformation(global::OpenApiKiotaClientExample.GeneratedCode.Models.ToOnePersonInRequest body, Action> requestConfiguration = default) - { -#endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); @@ -162,6 +129,7 @@ public RequestInformation ToPatchRequestInformation(global::OpenApiKiotaClientEx requestInfo.SetContentFromParsable(RequestAdapter, "application/vnd.api+json", body); return requestInfo; } + /// /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. /// @@ -171,6 +139,7 @@ public RequestInformation ToPatchRequestInformation(global::OpenApiKiotaClientEx { return new global::OpenApiKiotaClientExample.GeneratedCode.Api.TodoItems.Item.Relationships.Owner.OwnerRequestBuilder(rawUrl, RequestAdapter); } + /// /// Retrieves the related person identity of an individual todoItem's owner relationship. /// @@ -178,16 +147,10 @@ public RequestInformation ToPatchRequestInformation(global::OpenApiKiotaClientEx public partial class OwnerRequestBuilderGetQueryParameters { /// For syntax, see the documentation for the [`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// @@ -195,16 +158,10 @@ public partial class OwnerRequestBuilderGetQueryParameters public partial class OwnerRequestBuilderHeadQueryParameters { /// For syntax, see the documentation for the [`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } } } #pragma warning restore CS0618 + diff --git a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Api/TodoItems/Item/Relationships/RelationshipsRequestBuilder.cs b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Api/TodoItems/Item/Relationships/RelationshipsRequestBuilder.cs index 560b72f4f..83ca085fe 100644 --- a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Api/TodoItems/Item/Relationships/RelationshipsRequestBuilder.cs +++ b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Api/TodoItems/Item/Relationships/RelationshipsRequestBuilder.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions; @@ -22,16 +24,19 @@ public partial class RelationshipsRequestBuilder : BaseRequestBuilder { get => new global::OpenApiKiotaClientExample.GeneratedCode.Api.TodoItems.Item.Relationships.Assignee.AssigneeRequestBuilder(PathParameters, RequestAdapter); } + /// The owner property public global::OpenApiKiotaClientExample.GeneratedCode.Api.TodoItems.Item.Relationships.Owner.OwnerRequestBuilder Owner { get => new global::OpenApiKiotaClientExample.GeneratedCode.Api.TodoItems.Item.Relationships.Owner.OwnerRequestBuilder(PathParameters, RequestAdapter); } + /// The tags property public global::OpenApiKiotaClientExample.GeneratedCode.Api.TodoItems.Item.Relationships.Tags.TagsRequestBuilder Tags { get => new global::OpenApiKiotaClientExample.GeneratedCode.Api.TodoItems.Item.Relationships.Tags.TagsRequestBuilder(PathParameters, RequestAdapter); } + /// /// Instantiates a new and sets the default values. /// @@ -40,6 +45,7 @@ public partial class RelationshipsRequestBuilder : BaseRequestBuilder public RelationshipsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/api/todoItems/{id}/relationships", pathParameters) { } + /// /// Instantiates a new and sets the default values. /// @@ -51,3 +57,4 @@ public RelationshipsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter } } #pragma warning restore CS0618 + diff --git a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Api/TodoItems/Item/Relationships/Tags/TagsRequestBuilder.cs b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Api/TodoItems/Item/Relationships/Tags/TagsRequestBuilder.cs index 56d596e5a..d3b344bc6 100644 --- a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Api/TodoItems/Item/Relationships/Tags/TagsRequestBuilder.cs +++ b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Api/TodoItems/Item/Relationships/Tags/TagsRequestBuilder.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -25,6 +27,7 @@ public partial class TagsRequestBuilder : BaseRequestBuilder public TagsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/api/todoItems/{id}/relationships/tags{?query*}", pathParameters) { } + /// /// Instantiates a new and sets the default values. /// @@ -33,6 +36,7 @@ public TagsRequestBuilder(Dictionary pathParameters, IRequestAda public TagsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/api/todoItems/{id}/relationships/tags{?query*}", rawUrl) { } + /// /// Removes existing tags from the tags relationship of an individual todoItem. /// @@ -42,15 +46,8 @@ public TagsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base( /// When receiving a 400 status code /// When receiving a 404 status code /// When receiving a 409 status code -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public async Task DeleteAsync(global::OpenApiKiotaClientExample.GeneratedCode.Models.ToManyTagInRequest body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { -#nullable restore -#else - public async Task DeleteAsync(global::OpenApiKiotaClientExample.GeneratedCode.Models.ToManyTagInRequest body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) - { -#endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = ToDeleteRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> @@ -61,6 +58,7 @@ public async Task DeleteAsync(global::OpenApiKiotaClientExample.GeneratedCode.Mo }; await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); } + /// /// Retrieves the related tag identities of an individual todoItem's tags relationship. /// @@ -69,15 +67,8 @@ public async Task DeleteAsync(global::OpenApiKiotaClientExample.GeneratedCode.Mo /// Configuration for the request such as headers, query parameters, and middleware options. /// When receiving a 400 status code /// When receiving a 404 status code -#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> { @@ -86,23 +77,18 @@ public async Task DeleteAsync(global::OpenApiKiotaClientExample.GeneratedCode.Mo }; return await RequestAdapter.SendAsync(requestInfo, global::OpenApiKiotaClientExample.GeneratedCode.Models.TagIdentifierCollectionResponseDocument.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// /// 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 HeadAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { -#nullable restore -#else - public async Task HeadAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) - { -#endif var requestInfo = ToHeadRequestInformation(requestConfiguration); await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); } + /// /// Assigns existing tags to the tags relationship of an individual todoItem. /// @@ -112,15 +98,8 @@ public async Task HeadAsync(ActionWhen receiving a 400 status code /// When receiving a 404 status code /// When receiving a 409 status code -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public async Task PatchAsync(global::OpenApiKiotaClientExample.GeneratedCode.Models.ToManyTagInRequest body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { -#nullable restore -#else - public async Task PatchAsync(global::OpenApiKiotaClientExample.GeneratedCode.Models.ToManyTagInRequest body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) - { -#endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> @@ -131,6 +110,7 @@ public async Task PatchAsync(global::OpenApiKiotaClientExample.GeneratedCode.Mod }; await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); } + /// /// Adds existing tags to the tags relationship of an individual todoItem. /// @@ -140,15 +120,8 @@ public async Task PatchAsync(global::OpenApiKiotaClientExample.GeneratedCode.Mod /// When receiving a 400 status code /// When receiving a 404 status code /// When receiving a 409 status code -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public async Task PostAsync(global::OpenApiKiotaClientExample.GeneratedCode.Models.ToManyTagInRequest body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { -#nullable restore -#else - public async Task PostAsync(global::OpenApiKiotaClientExample.GeneratedCode.Models.ToManyTagInRequest body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) - { -#endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> @@ -159,21 +132,15 @@ public async Task PostAsync(global::OpenApiKiotaClientExample.GeneratedCode.Mode }; await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); } + /// /// Removes existing tags from the tags relationship of an individual todoItem. /// /// A /// 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 ToDeleteRequestInformation(global::OpenApiKiotaClientExample.GeneratedCode.Models.ToManyTagInRequest body, Action>? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToDeleteRequestInformation(global::OpenApiKiotaClientExample.GeneratedCode.Models.ToManyTagInRequest body, Action> requestConfiguration = default) - { -#endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); @@ -181,58 +148,40 @@ public RequestInformation ToDeleteRequestInformation(global::OpenApiKiotaClientE requestInfo.SetContentFromParsable(RequestAdapter, "application/vnd.api+json", body); return requestInfo; } + /// /// Retrieves the related tag identities of an individual todoItem's tags relationship. /// /// A /// 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(Method.GET, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/vnd.api+json"); return requestInfo; } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// /// A /// 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 ToHeadRequestInformation(Action>? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToHeadRequestInformation(Action> requestConfiguration = default) - { -#endif var requestInfo = new RequestInformation(Method.HEAD, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); return requestInfo; } + /// /// Assigns existing tags to the tags relationship of an individual todoItem. /// /// A /// 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(global::OpenApiKiotaClientExample.GeneratedCode.Models.ToManyTagInRequest body, Action>? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToPatchRequestInformation(global::OpenApiKiotaClientExample.GeneratedCode.Models.ToManyTagInRequest body, Action> requestConfiguration = default) - { -#endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); @@ -240,21 +189,15 @@ public RequestInformation ToPatchRequestInformation(global::OpenApiKiotaClientEx requestInfo.SetContentFromParsable(RequestAdapter, "application/vnd.api+json", body); return requestInfo; } + /// /// Adds existing tags to the tags relationship of an individual todoItem. /// /// A /// 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(global::OpenApiKiotaClientExample.GeneratedCode.Models.ToManyTagInRequest body, Action>? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToPostRequestInformation(global::OpenApiKiotaClientExample.GeneratedCode.Models.ToManyTagInRequest body, Action> requestConfiguration = default) - { -#endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); @@ -262,6 +205,7 @@ public RequestInformation ToPostRequestInformation(global::OpenApiKiotaClientExa requestInfo.SetContentFromParsable(RequestAdapter, "application/vnd.api+json", body); return requestInfo; } + /// /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. /// @@ -271,6 +215,7 @@ public RequestInformation ToPostRequestInformation(global::OpenApiKiotaClientExa { return new global::OpenApiKiotaClientExample.GeneratedCode.Api.TodoItems.Item.Relationships.Tags.TagsRequestBuilder(rawUrl, RequestAdapter); } + /// /// Retrieves the related tag identities of an individual todoItem's tags relationship. /// @@ -278,16 +223,10 @@ public RequestInformation ToPostRequestInformation(global::OpenApiKiotaClientExa public partial class TagsRequestBuilderGetQueryParameters { /// For syntax, see the documentation for the [`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// @@ -295,16 +234,10 @@ public partial class TagsRequestBuilderGetQueryParameters public partial class TagsRequestBuilderHeadQueryParameters { /// For syntax, see the documentation for the [`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } } } #pragma warning restore CS0618 + diff --git a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Api/TodoItems/Item/Tags/TagsRequestBuilder.cs b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Api/TodoItems/Item/Tags/TagsRequestBuilder.cs index 880a376a8..1ea4c026b 100644 --- a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Api/TodoItems/Item/Tags/TagsRequestBuilder.cs +++ b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Api/TodoItems/Item/Tags/TagsRequestBuilder.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -25,6 +27,7 @@ public partial class TagsRequestBuilder : BaseRequestBuilder public TagsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/api/todoItems/{id}/tags{?query*}", pathParameters) { } + /// /// Instantiates a new and sets the default values. /// @@ -33,6 +36,7 @@ public TagsRequestBuilder(Dictionary pathParameters, IRequestAda public TagsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/api/todoItems/{id}/tags{?query*}", rawUrl) { } + /// /// Retrieves the related tags of an individual todoItem's tags relationship. /// @@ -41,15 +45,8 @@ public TagsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base( /// Configuration for the request such as headers, query parameters, and middleware options. /// When receiving a 400 status code /// When receiving a 404 status code -#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> { @@ -58,60 +55,43 @@ public TagsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base( }; return await RequestAdapter.SendAsync(requestInfo, global::OpenApiKiotaClientExample.GeneratedCode.Models.TagCollectionResponseDocument.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// /// 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 HeadAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { -#nullable restore -#else - public async Task HeadAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) - { -#endif var requestInfo = ToHeadRequestInformation(requestConfiguration); await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); } + /// /// Retrieves the related tags of an individual todoItem's tags relationship. /// /// A /// 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(Method.GET, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/vnd.api+json"); return requestInfo; } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// /// A /// 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 ToHeadRequestInformation(Action>? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToHeadRequestInformation(Action> requestConfiguration = default) - { -#endif var requestInfo = new RequestInformation(Method.HEAD, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); return requestInfo; } + /// /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. /// @@ -121,6 +101,7 @@ public RequestInformation ToHeadRequestInformation(Action /// Retrieves the related tags of an individual todoItem's tags relationship. /// @@ -128,16 +109,10 @@ public RequestInformation ToHeadRequestInformation(ActionFor syntax, see the documentation for the [`include`](https://www.jsonapi.net/usage/reading/including-relationships.html)/[`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// @@ -145,16 +120,10 @@ public partial class TagsRequestBuilderGetQueryParameters public partial class TagsRequestBuilderHeadQueryParameters { /// For syntax, see the documentation for the [`include`](https://www.jsonapi.net/usage/reading/including-relationships.html)/[`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } } } #pragma warning restore CS0618 + diff --git a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Api/TodoItems/Item/TodoItemsItemRequestBuilder.cs b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Api/TodoItems/Item/TodoItemsItemRequestBuilder.cs index 1f7cea8dd..9ba6038a6 100644 --- a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Api/TodoItems/Item/TodoItemsItemRequestBuilder.cs +++ b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Api/TodoItems/Item/TodoItemsItemRequestBuilder.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -26,21 +28,25 @@ public partial class TodoItemsItemRequestBuilder : BaseRequestBuilder { get => new global::OpenApiKiotaClientExample.GeneratedCode.Api.TodoItems.Item.Assignee.AssigneeRequestBuilder(PathParameters, RequestAdapter); } + /// The owner property public global::OpenApiKiotaClientExample.GeneratedCode.Api.TodoItems.Item.Owner.OwnerRequestBuilder Owner { get => new global::OpenApiKiotaClientExample.GeneratedCode.Api.TodoItems.Item.Owner.OwnerRequestBuilder(PathParameters, RequestAdapter); } + /// The relationships property public global::OpenApiKiotaClientExample.GeneratedCode.Api.TodoItems.Item.Relationships.RelationshipsRequestBuilder Relationships { get => new global::OpenApiKiotaClientExample.GeneratedCode.Api.TodoItems.Item.Relationships.RelationshipsRequestBuilder(PathParameters, RequestAdapter); } + /// The tags property public global::OpenApiKiotaClientExample.GeneratedCode.Api.TodoItems.Item.Tags.TagsRequestBuilder Tags { get => new global::OpenApiKiotaClientExample.GeneratedCode.Api.TodoItems.Item.Tags.TagsRequestBuilder(PathParameters, RequestAdapter); } + /// /// Instantiates a new and sets the default values. /// @@ -49,6 +55,7 @@ public partial class TodoItemsItemRequestBuilder : BaseRequestBuilder public TodoItemsItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/api/todoItems/{id}{?query*}", pathParameters) { } + /// /// Instantiates a new and sets the default values. /// @@ -57,21 +64,15 @@ public TodoItemsItemRequestBuilder(Dictionary pathParameters, IR public TodoItemsItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/api/todoItems/{id}{?query*}", rawUrl) { } + /// /// Deletes an existing todoItem by its identifier. /// /// Cancellation token to use when cancelling requests /// Configuration for the request such as headers, query parameters, and middleware options. /// When receiving a 404 status code -#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> { @@ -79,6 +80,7 @@ public async Task DeleteAsync(Action /// Retrieves an individual todoItem by its identifier. /// @@ -87,15 +89,8 @@ public async Task DeleteAsync(ActionConfiguration for the request such as headers, query parameters, and middleware options. /// When receiving a 400 status code /// When receiving a 404 status code -#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> { @@ -104,23 +99,18 @@ public async Task DeleteAsync(Action(requestInfo, global::OpenApiKiotaClientExample.GeneratedCode.Models.TodoItemPrimaryResponseDocument.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// /// 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 HeadAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { -#nullable restore -#else - public async Task HeadAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) - { -#endif var requestInfo = ToHeadRequestInformation(requestConfiguration); await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); } + /// /// Updates an existing todoItem. /// @@ -132,15 +122,8 @@ public async Task HeadAsync(ActionWhen receiving a 404 status code /// When receiving a 409 status code /// When receiving a 422 status code -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public async Task PatchAsync(global::OpenApiKiotaClientExample.GeneratedCode.Models.UpdateTodoItemRequestDocument body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { -#nullable restore -#else - public async Task PatchAsync(global::OpenApiKiotaClientExample.GeneratedCode.Models.UpdateTodoItemRequestDocument body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) - { -#endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> @@ -152,77 +135,53 @@ public async Task HeadAsync(Action(requestInfo, global::OpenApiKiotaClientExample.GeneratedCode.Models.TodoItemPrimaryResponseDocument.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } + /// /// Deletes an existing todoItem by its identifier. /// /// A /// 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(Method.DELETE, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/vnd.api+json"); return requestInfo; } + /// /// Retrieves an individual todoItem by its identifier. /// /// A /// 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(Method.GET, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/vnd.api+json"); return requestInfo; } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// /// A /// 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 ToHeadRequestInformation(Action>? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToHeadRequestInformation(Action> requestConfiguration = default) - { -#endif var requestInfo = new RequestInformation(Method.HEAD, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); return requestInfo; } + /// /// Updates an existing todoItem. /// /// A /// 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(global::OpenApiKiotaClientExample.GeneratedCode.Models.UpdateTodoItemRequestDocument body, Action>? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToPatchRequestInformation(global::OpenApiKiotaClientExample.GeneratedCode.Models.UpdateTodoItemRequestDocument body, Action> requestConfiguration = default) - { -#endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); @@ -230,6 +189,7 @@ public RequestInformation ToPatchRequestInformation(global::OpenApiKiotaClientEx requestInfo.SetContentFromParsable(RequestAdapter, "application/vnd.api+json", body); return requestInfo; } + /// /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. /// @@ -239,6 +199,7 @@ public RequestInformation ToPatchRequestInformation(global::OpenApiKiotaClientEx { return new global::OpenApiKiotaClientExample.GeneratedCode.Api.TodoItems.Item.TodoItemsItemRequestBuilder(rawUrl, RequestAdapter); } + /// /// Retrieves an individual todoItem by its identifier. /// @@ -246,16 +207,10 @@ public RequestInformation ToPatchRequestInformation(global::OpenApiKiotaClientEx public partial class TodoItemsItemRequestBuilderGetQueryParameters { /// For syntax, see the documentation for the [`include`](https://www.jsonapi.net/usage/reading/including-relationships.html)/[`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// @@ -263,16 +218,10 @@ public partial class TodoItemsItemRequestBuilderGetQueryParameters public partial class TodoItemsItemRequestBuilderHeadQueryParameters { /// For syntax, see the documentation for the [`include`](https://www.jsonapi.net/usage/reading/including-relationships.html)/[`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } + /// /// Updates an existing todoItem. /// @@ -280,16 +229,10 @@ public partial class TodoItemsItemRequestBuilderHeadQueryParameters public partial class TodoItemsItemRequestBuilderPatchQueryParameters { /// For syntax, see the documentation for the [`include`](https://www.jsonapi.net/usage/reading/including-relationships.html)/[`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } } } #pragma warning restore CS0618 + diff --git a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Api/TodoItems/TodoItemsRequestBuilder.cs b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Api/TodoItems/TodoItemsRequestBuilder.cs index 1b640a12b..edea6674f 100644 --- a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Api/TodoItems/TodoItemsRequestBuilder.cs +++ b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Api/TodoItems/TodoItemsRequestBuilder.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -30,6 +32,7 @@ public partial class TodoItemsRequestBuilder : BaseRequestBuilder return new global::OpenApiKiotaClientExample.GeneratedCode.Api.TodoItems.Item.TodoItemsItemRequestBuilder(urlTplParams, RequestAdapter); } } + /// /// Instantiates a new and sets the default values. /// @@ -38,6 +41,7 @@ public partial class TodoItemsRequestBuilder : BaseRequestBuilder public TodoItemsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/api/todoItems{?query*}", pathParameters) { } + /// /// Instantiates a new and sets the default values. /// @@ -46,6 +50,7 @@ public TodoItemsRequestBuilder(Dictionary pathParameters, IReque public TodoItemsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/api/todoItems{?query*}", rawUrl) { } + /// /// Retrieves a collection of todoItems. /// @@ -53,15 +58,8 @@ public TodoItemsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : /// Cancellation token to use when cancelling requests /// Configuration for the request such as headers, query parameters, and middleware options. /// When receiving a 400 status code -#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> { @@ -69,23 +67,18 @@ public TodoItemsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : }; return await RequestAdapter.SendAsync(requestInfo, global::OpenApiKiotaClientExample.GeneratedCode.Models.TodoItemCollectionResponseDocument.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// /// 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 HeadAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { -#nullable restore -#else - public async Task HeadAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) - { -#endif var requestInfo = ToHeadRequestInformation(requestConfiguration); await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); } + /// /// Creates a new todoItem. /// @@ -98,15 +91,8 @@ public async Task HeadAsync(ActionWhen receiving a 404 status code /// When receiving a 409 status code /// When receiving a 422 status code -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public async Task PostAsync(global::OpenApiKiotaClientExample.GeneratedCode.Models.CreateTodoItemRequestDocument body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { -#nullable restore -#else - public async Task PostAsync(global::OpenApiKiotaClientExample.GeneratedCode.Models.CreateTodoItemRequestDocument body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) - { -#endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> @@ -119,58 +105,40 @@ public async Task HeadAsync(Action(requestInfo, global::OpenApiKiotaClientExample.GeneratedCode.Models.TodoItemPrimaryResponseDocument.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } + /// /// Retrieves a collection of todoItems. /// /// A /// 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(Method.GET, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/vnd.api+json"); return requestInfo; } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// /// A /// 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 ToHeadRequestInformation(Action>? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToHeadRequestInformation(Action> requestConfiguration = default) - { -#endif var requestInfo = new RequestInformation(Method.HEAD, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); return requestInfo; } + /// /// Creates a new todoItem. /// /// A /// 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(global::OpenApiKiotaClientExample.GeneratedCode.Models.CreateTodoItemRequestDocument body, Action>? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToPostRequestInformation(global::OpenApiKiotaClientExample.GeneratedCode.Models.CreateTodoItemRequestDocument body, Action> requestConfiguration = default) - { -#endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); @@ -178,6 +146,7 @@ public RequestInformation ToPostRequestInformation(global::OpenApiKiotaClientExa requestInfo.SetContentFromParsable(RequestAdapter, "application/vnd.api+json", body); return requestInfo; } + /// /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. /// @@ -187,6 +156,7 @@ public RequestInformation ToPostRequestInformation(global::OpenApiKiotaClientExa { return new global::OpenApiKiotaClientExample.GeneratedCode.Api.TodoItems.TodoItemsRequestBuilder(rawUrl, RequestAdapter); } + /// /// Retrieves a collection of todoItems. /// @@ -194,16 +164,10 @@ public RequestInformation ToPostRequestInformation(global::OpenApiKiotaClientExa public partial class TodoItemsRequestBuilderGetQueryParameters { /// For syntax, see the documentation for the [`include`](https://www.jsonapi.net/usage/reading/including-relationships.html)/[`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// @@ -211,16 +175,10 @@ public partial class TodoItemsRequestBuilderGetQueryParameters public partial class TodoItemsRequestBuilderHeadQueryParameters { /// For syntax, see the documentation for the [`include`](https://www.jsonapi.net/usage/reading/including-relationships.html)/[`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } + /// /// Creates a new todoItem. /// @@ -228,16 +186,10 @@ public partial class TodoItemsRequestBuilderHeadQueryParameters public partial class TodoItemsRequestBuilderPostQueryParameters { /// For syntax, see the documentation for the [`include`](https://www.jsonapi.net/usage/reading/including-relationships.html)/[`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } } } #pragma warning restore CS0618 + diff --git a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/ExampleApiClient.cs b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/ExampleApiClient.cs index 90482e782..259eb2c48 100644 --- a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/ExampleApiClient.cs +++ b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/ExampleApiClient.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Store; @@ -25,6 +27,7 @@ public partial class ExampleApiClient : BaseRequestBuilder { get => new global::OpenApiKiotaClientExample.GeneratedCode.Api.ApiRequestBuilder(PathParameters, RequestAdapter); } + /// /// Instantiates a new and sets the default values. /// @@ -49,3 +52,4 @@ public partial class ExampleApiClient : BaseRequestBuilder } } #pragma warning restore CS0618 + diff --git a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/AddOperationCode.cs b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/AddOperationCode.cs index c9c21b39b..eb7e9bff6 100644 --- a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/AddOperationCode.cs +++ b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/AddOperationCode.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 using System.Runtime.Serialization; using System; namespace OpenApiKiotaClientExample.GeneratedCode.Models @@ -14,3 +16,4 @@ public enum AddOperationCode #pragma warning restore CS1591 } } + diff --git a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/AddToPersonAssignedTodoItemsRelationshipOperation.cs b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/AddToPersonAssignedTodoItemsRelationshipOperation.cs index 365c75c24..febb6019d 100644 --- a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/AddToPersonAssignedTodoItemsRelationshipOperation.cs +++ b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/AddToPersonAssignedTodoItemsRelationshipOperation.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -13,43 +15,26 @@ public partial class AddToPersonAssignedTodoItemsRelationshipOperation : global: #pragma warning restore CS1591 { /// The data property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public List? Data { get { return BackingStore?.Get?>("data"); } set { BackingStore?.Set("data", value); } } -#nullable restore -#else - public List Data - { - get { return BackingStore?.Get>("data"); } - set { BackingStore?.Set("data", value); } - } -#endif + /// The op property public global::OpenApiKiotaClientExample.GeneratedCode.Models.AddOperationCode? Op { get { return BackingStore?.Get("op"); } set { BackingStore?.Set("op", value); } } + /// The ref property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaClientExample.GeneratedCode.Models.PersonAssignedTodoItemsRelationshipIdentifier? Ref { get { return BackingStore?.Get("ref"); } set { BackingStore?.Set("ref", value); } } -#nullable restore -#else - public global::OpenApiKiotaClientExample.GeneratedCode.Models.PersonAssignedTodoItemsRelationshipIdentifier Ref - { - get { return BackingStore?.Get("ref"); } - set { BackingStore?.Set("ref", value); } - } -#endif + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -60,6 +45,7 @@ public partial class AddToPersonAssignedTodoItemsRelationshipOperation : global: _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaClientExample.GeneratedCode.Models.AddToPersonAssignedTodoItemsRelationshipOperation(); } + /// /// The deserialization information for the current model /// @@ -73,6 +59,7 @@ public override IDictionary> GetFieldDeserializers() { "ref", n => { Ref = n.GetObjectValue(global::OpenApiKiotaClientExample.GeneratedCode.Models.PersonAssignedTodoItemsRelationshipIdentifier.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -88,3 +75,4 @@ public override void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/AddToPersonOwnedTodoItemsRelationshipOperation.cs b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/AddToPersonOwnedTodoItemsRelationshipOperation.cs index 6cb635dc3..4bbc6cfc5 100644 --- a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/AddToPersonOwnedTodoItemsRelationshipOperation.cs +++ b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/AddToPersonOwnedTodoItemsRelationshipOperation.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -13,43 +15,26 @@ public partial class AddToPersonOwnedTodoItemsRelationshipOperation : global::Op #pragma warning restore CS1591 { /// The data property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public List? Data { get { return BackingStore?.Get?>("data"); } set { BackingStore?.Set("data", value); } } -#nullable restore -#else - public List Data - { - get { return BackingStore?.Get>("data"); } - set { BackingStore?.Set("data", value); } - } -#endif + /// The op property public global::OpenApiKiotaClientExample.GeneratedCode.Models.AddOperationCode? Op { get { return BackingStore?.Get("op"); } set { BackingStore?.Set("op", value); } } + /// The ref property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaClientExample.GeneratedCode.Models.PersonOwnedTodoItemsRelationshipIdentifier? Ref { get { return BackingStore?.Get("ref"); } set { BackingStore?.Set("ref", value); } } -#nullable restore -#else - public global::OpenApiKiotaClientExample.GeneratedCode.Models.PersonOwnedTodoItemsRelationshipIdentifier Ref - { - get { return BackingStore?.Get("ref"); } - set { BackingStore?.Set("ref", value); } - } -#endif + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -60,6 +45,7 @@ public partial class AddToPersonOwnedTodoItemsRelationshipOperation : global::Op _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaClientExample.GeneratedCode.Models.AddToPersonOwnedTodoItemsRelationshipOperation(); } + /// /// The deserialization information for the current model /// @@ -73,6 +59,7 @@ public override IDictionary> GetFieldDeserializers() { "ref", n => { Ref = n.GetObjectValue(global::OpenApiKiotaClientExample.GeneratedCode.Models.PersonOwnedTodoItemsRelationshipIdentifier.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -88,3 +75,4 @@ public override void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/AddToTagTodoItemsRelationshipOperation.cs b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/AddToTagTodoItemsRelationshipOperation.cs index 6053a0990..9b039d63f 100644 --- a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/AddToTagTodoItemsRelationshipOperation.cs +++ b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/AddToTagTodoItemsRelationshipOperation.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -13,43 +15,26 @@ public partial class AddToTagTodoItemsRelationshipOperation : global::OpenApiKio #pragma warning restore CS1591 { /// The data property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public List? Data { get { return BackingStore?.Get?>("data"); } set { BackingStore?.Set("data", value); } } -#nullable restore -#else - public List Data - { - get { return BackingStore?.Get>("data"); } - set { BackingStore?.Set("data", value); } - } -#endif + /// The op property public global::OpenApiKiotaClientExample.GeneratedCode.Models.AddOperationCode? Op { get { return BackingStore?.Get("op"); } set { BackingStore?.Set("op", value); } } + /// The ref property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaClientExample.GeneratedCode.Models.TagTodoItemsRelationshipIdentifier? Ref { get { return BackingStore?.Get("ref"); } set { BackingStore?.Set("ref", value); } } -#nullable restore -#else - public global::OpenApiKiotaClientExample.GeneratedCode.Models.TagTodoItemsRelationshipIdentifier Ref - { - get { return BackingStore?.Get("ref"); } - set { BackingStore?.Set("ref", value); } - } -#endif + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -60,6 +45,7 @@ public partial class AddToTagTodoItemsRelationshipOperation : global::OpenApiKio _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaClientExample.GeneratedCode.Models.AddToTagTodoItemsRelationshipOperation(); } + /// /// The deserialization information for the current model /// @@ -73,6 +59,7 @@ public override IDictionary> GetFieldDeserializers() { "ref", n => { Ref = n.GetObjectValue(global::OpenApiKiotaClientExample.GeneratedCode.Models.TagTodoItemsRelationshipIdentifier.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -88,3 +75,4 @@ public override void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/AddToTodoItemTagsRelationshipOperation.cs b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/AddToTodoItemTagsRelationshipOperation.cs index 90d8010e5..4fff181b9 100644 --- a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/AddToTodoItemTagsRelationshipOperation.cs +++ b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/AddToTodoItemTagsRelationshipOperation.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -13,43 +15,26 @@ public partial class AddToTodoItemTagsRelationshipOperation : global::OpenApiKio #pragma warning restore CS1591 { /// The data property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public List? Data { get { return BackingStore?.Get?>("data"); } set { BackingStore?.Set("data", value); } } -#nullable restore -#else - public List Data - { - get { return BackingStore?.Get>("data"); } - set { BackingStore?.Set("data", value); } - } -#endif + /// The op property public global::OpenApiKiotaClientExample.GeneratedCode.Models.AddOperationCode? Op { get { return BackingStore?.Get("op"); } set { BackingStore?.Set("op", value); } } + /// The ref property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaClientExample.GeneratedCode.Models.TodoItemTagsRelationshipIdentifier? Ref { get { return BackingStore?.Get("ref"); } set { BackingStore?.Set("ref", value); } } -#nullable restore -#else - public global::OpenApiKiotaClientExample.GeneratedCode.Models.TodoItemTagsRelationshipIdentifier Ref - { - get { return BackingStore?.Get("ref"); } - set { BackingStore?.Set("ref", value); } - } -#endif + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -60,6 +45,7 @@ public partial class AddToTodoItemTagsRelationshipOperation : global::OpenApiKio _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaClientExample.GeneratedCode.Models.AddToTodoItemTagsRelationshipOperation(); } + /// /// The deserialization information for the current model /// @@ -73,6 +59,7 @@ public override IDictionary> GetFieldDeserializers() { "ref", n => { Ref = n.GetObjectValue(global::OpenApiKiotaClientExample.GeneratedCode.Models.TodoItemTagsRelationshipIdentifier.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -88,3 +75,4 @@ public override void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/AtomicOperation.cs b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/AtomicOperation.cs index 3c1d31a6f..fb6aa7d4b 100644 --- a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/AtomicOperation.cs +++ b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/AtomicOperation.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,38 +17,21 @@ public partial class AtomicOperation : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaClientExample.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaClientExample.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// The openapiDiscriminator property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? OpenapiDiscriminator { get { return BackingStore?.Get("openapi:discriminator"); } set { BackingStore?.Set("openapi:discriminator", value); } } -#nullable restore -#else - public string OpenapiDiscriminator - { - get { return BackingStore?.Get("openapi:discriminator"); } - set { BackingStore?.Set("openapi:discriminator", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -54,6 +39,7 @@ public AtomicOperation() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -91,6 +77,7 @@ public AtomicOperation() _ => new global::OpenApiKiotaClientExample.GeneratedCode.Models.AtomicOperation(), }; } + /// /// The deserialization information for the current model /// @@ -103,6 +90,7 @@ public virtual IDictionary> GetFieldDeserializers() { "openapi:discriminator", n => { OpenapiDiscriminator = n.GetStringValue(); } }, }; } + /// /// Serializes information the current object /// @@ -116,3 +104,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/AtomicResult.cs b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/AtomicResult.cs index 6261d39c1..007d26df4 100644 --- a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/AtomicResult.cs +++ b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/AtomicResult.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,38 +17,21 @@ public partial class AtomicResult : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The data property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaClientExample.GeneratedCode.Models.DataInResponse? Data { get { return BackingStore?.Get("data"); } set { BackingStore?.Set("data", value); } } -#nullable restore -#else - public global::OpenApiKiotaClientExample.GeneratedCode.Models.DataInResponse Data - { - get { return BackingStore?.Get("data"); } - set { BackingStore?.Set("data", value); } - } -#endif + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaClientExample.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaClientExample.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -54,6 +39,7 @@ public AtomicResult() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -64,6 +50,7 @@ public AtomicResult() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaClientExample.GeneratedCode.Models.AtomicResult(); } + /// /// The deserialization information for the current model /// @@ -76,6 +63,7 @@ public virtual IDictionary> GetFieldDeserializers() { "meta", n => { Meta = n.GetObjectValue(global::OpenApiKiotaClientExample.GeneratedCode.Models.Meta.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -89,3 +77,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/AttributesInCreatePersonRequest.cs b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/AttributesInCreatePersonRequest.cs index f973fb543..15e92a42e 100644 --- a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/AttributesInCreatePersonRequest.cs +++ b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/AttributesInCreatePersonRequest.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,38 +17,21 @@ public partial class AttributesInCreatePersonRequest : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The firstName property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? FirstName { get { return BackingStore?.Get("firstName"); } set { BackingStore?.Set("firstName", value); } } -#nullable restore -#else - public string FirstName - { - get { return BackingStore?.Get("firstName"); } - set { BackingStore?.Set("firstName", value); } - } -#endif + /// The lastName property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? LastName { get { return BackingStore?.Get("lastName"); } set { BackingStore?.Set("lastName", value); } } -#nullable restore -#else - public string LastName - { - get { return BackingStore?.Get("lastName"); } - set { BackingStore?.Set("lastName", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -54,6 +39,7 @@ public AttributesInCreatePersonRequest() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -64,6 +50,7 @@ public AttributesInCreatePersonRequest() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaClientExample.GeneratedCode.Models.AttributesInCreatePersonRequest(); } + /// /// The deserialization information for the current model /// @@ -76,6 +63,7 @@ public virtual IDictionary> GetFieldDeserializers() { "lastName", n => { LastName = n.GetStringValue(); } }, }; } + /// /// Serializes information the current object /// @@ -89,3 +77,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/AttributesInCreateTagRequest.cs b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/AttributesInCreateTagRequest.cs index 87ce5f555..850b22af8 100644 --- a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/AttributesInCreateTagRequest.cs +++ b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/AttributesInCreateTagRequest.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,22 +17,14 @@ public partial class AttributesInCreateTagRequest : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The name property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Name { get { return BackingStore?.Get("name"); } set { BackingStore?.Set("name", value); } } -#nullable restore -#else - public string Name - { - get { return BackingStore?.Get("name"); } - set { BackingStore?.Set("name", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -38,6 +32,7 @@ public AttributesInCreateTagRequest() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -48,6 +43,7 @@ public AttributesInCreateTagRequest() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaClientExample.GeneratedCode.Models.AttributesInCreateTagRequest(); } + /// /// The deserialization information for the current model /// @@ -59,6 +55,7 @@ public virtual IDictionary> GetFieldDeserializers() { "name", n => { Name = n.GetStringValue(); } }, }; } + /// /// Serializes information the current object /// @@ -71,3 +68,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/AttributesInCreateTodoItemRequest.cs b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/AttributesInCreateTodoItemRequest.cs index 431dcd470..36c1c01ae 100644 --- a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/AttributesInCreateTodoItemRequest.cs +++ b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/AttributesInCreateTodoItemRequest.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,34 +17,28 @@ public partial class AttributesInCreateTodoItemRequest : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The description property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Description { get { return BackingStore?.Get("description"); } set { BackingStore?.Set("description", value); } } -#nullable restore -#else - public string Description - { - get { return BackingStore?.Get("description"); } - set { BackingStore?.Set("description", value); } - } -#endif + /// The durationInHours property public long? DurationInHours { get { return BackingStore?.Get("durationInHours"); } set { BackingStore?.Set("durationInHours", value); } } + /// The priority property public global::OpenApiKiotaClientExample.GeneratedCode.Models.TodoItemPriority? Priority { get { return BackingStore?.Get("priority"); } set { BackingStore?.Set("priority", value); } } + /// /// Instantiates a new and sets the default values. /// @@ -50,6 +46,7 @@ public AttributesInCreateTodoItemRequest() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -60,6 +57,7 @@ public AttributesInCreateTodoItemRequest() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaClientExample.GeneratedCode.Models.AttributesInCreateTodoItemRequest(); } + /// /// The deserialization information for the current model /// @@ -73,6 +71,7 @@ public virtual IDictionary> GetFieldDeserializers() { "priority", n => { Priority = n.GetEnumValue(); } }, }; } + /// /// Serializes information the current object /// @@ -87,3 +86,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/AttributesInUpdatePersonRequest.cs b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/AttributesInUpdatePersonRequest.cs index a9bf691db..f5de4f855 100644 --- a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/AttributesInUpdatePersonRequest.cs +++ b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/AttributesInUpdatePersonRequest.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,38 +17,21 @@ public partial class AttributesInUpdatePersonRequest : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The firstName property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? FirstName { get { return BackingStore?.Get("firstName"); } set { BackingStore?.Set("firstName", value); } } -#nullable restore -#else - public string FirstName - { - get { return BackingStore?.Get("firstName"); } - set { BackingStore?.Set("firstName", value); } - } -#endif + /// The lastName property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? LastName { get { return BackingStore?.Get("lastName"); } set { BackingStore?.Set("lastName", value); } } -#nullable restore -#else - public string LastName - { - get { return BackingStore?.Get("lastName"); } - set { BackingStore?.Set("lastName", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -54,6 +39,7 @@ public AttributesInUpdatePersonRequest() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -64,6 +50,7 @@ public AttributesInUpdatePersonRequest() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaClientExample.GeneratedCode.Models.AttributesInUpdatePersonRequest(); } + /// /// The deserialization information for the current model /// @@ -76,6 +63,7 @@ public virtual IDictionary> GetFieldDeserializers() { "lastName", n => { LastName = n.GetStringValue(); } }, }; } + /// /// Serializes information the current object /// @@ -89,3 +77,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/AttributesInUpdateTagRequest.cs b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/AttributesInUpdateTagRequest.cs index 62a971477..0296dbff6 100644 --- a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/AttributesInUpdateTagRequest.cs +++ b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/AttributesInUpdateTagRequest.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,22 +17,14 @@ public partial class AttributesInUpdateTagRequest : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The name property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Name { get { return BackingStore?.Get("name"); } set { BackingStore?.Set("name", value); } } -#nullable restore -#else - public string Name - { - get { return BackingStore?.Get("name"); } - set { BackingStore?.Set("name", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -38,6 +32,7 @@ public AttributesInUpdateTagRequest() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -48,6 +43,7 @@ public AttributesInUpdateTagRequest() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaClientExample.GeneratedCode.Models.AttributesInUpdateTagRequest(); } + /// /// The deserialization information for the current model /// @@ -59,6 +55,7 @@ public virtual IDictionary> GetFieldDeserializers() { "name", n => { Name = n.GetStringValue(); } }, }; } + /// /// Serializes information the current object /// @@ -71,3 +68,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/AttributesInUpdateTodoItemRequest.cs b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/AttributesInUpdateTodoItemRequest.cs index e0ae88f15..6993ab9d4 100644 --- a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/AttributesInUpdateTodoItemRequest.cs +++ b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/AttributesInUpdateTodoItemRequest.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,34 +17,28 @@ public partial class AttributesInUpdateTodoItemRequest : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The description property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Description { get { return BackingStore?.Get("description"); } set { BackingStore?.Set("description", value); } } -#nullable restore -#else - public string Description - { - get { return BackingStore?.Get("description"); } - set { BackingStore?.Set("description", value); } - } -#endif + /// The durationInHours property public long? DurationInHours { get { return BackingStore?.Get("durationInHours"); } set { BackingStore?.Set("durationInHours", value); } } + /// The priority property public global::OpenApiKiotaClientExample.GeneratedCode.Models.TodoItemPriority? Priority { get { return BackingStore?.Get("priority"); } set { BackingStore?.Set("priority", value); } } + /// /// Instantiates a new and sets the default values. /// @@ -50,6 +46,7 @@ public AttributesInUpdateTodoItemRequest() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -60,6 +57,7 @@ public AttributesInUpdateTodoItemRequest() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaClientExample.GeneratedCode.Models.AttributesInUpdateTodoItemRequest(); } + /// /// The deserialization information for the current model /// @@ -73,6 +71,7 @@ public virtual IDictionary> GetFieldDeserializers() { "priority", n => { Priority = n.GetEnumValue(); } }, }; } + /// /// Serializes information the current object /// @@ -87,3 +86,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/CreatePersonOperation.cs b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/CreatePersonOperation.cs index 27b7aa938..d4832778a 100644 --- a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/CreatePersonOperation.cs +++ b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/CreatePersonOperation.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -13,27 +15,19 @@ public partial class CreatePersonOperation : global::OpenApiKiotaClientExample.G #pragma warning restore CS1591 { /// The data property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaClientExample.GeneratedCode.Models.DataInCreatePersonRequest? Data { get { return BackingStore?.Get("data"); } set { BackingStore?.Set("data", value); } } -#nullable restore -#else - public global::OpenApiKiotaClientExample.GeneratedCode.Models.DataInCreatePersonRequest Data - { - get { return BackingStore?.Get("data"); } - set { BackingStore?.Set("data", value); } - } -#endif + /// The op property public global::OpenApiKiotaClientExample.GeneratedCode.Models.AddOperationCode? Op { get { return BackingStore?.Get("op"); } set { BackingStore?.Set("op", value); } } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -44,6 +38,7 @@ public partial class CreatePersonOperation : global::OpenApiKiotaClientExample.G _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaClientExample.GeneratedCode.Models.CreatePersonOperation(); } + /// /// The deserialization information for the current model /// @@ -56,6 +51,7 @@ public override IDictionary> GetFieldDeserializers() { "op", n => { Op = n.GetEnumValue(); } }, }; } + /// /// Serializes information the current object /// @@ -70,3 +66,4 @@ public override void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/CreatePersonRequestDocument.cs b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/CreatePersonRequestDocument.cs index 2e7e88a8f..dd79babf5 100644 --- a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/CreatePersonRequestDocument.cs +++ b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/CreatePersonRequestDocument.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,38 +17,21 @@ public partial class CreatePersonRequestDocument : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The data property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaClientExample.GeneratedCode.Models.DataInCreatePersonRequest? Data { get { return BackingStore?.Get("data"); } set { BackingStore?.Set("data", value); } } -#nullable restore -#else - public global::OpenApiKiotaClientExample.GeneratedCode.Models.DataInCreatePersonRequest Data - { - get { return BackingStore?.Get("data"); } - set { BackingStore?.Set("data", value); } - } -#endif + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaClientExample.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaClientExample.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -54,6 +39,7 @@ public CreatePersonRequestDocument() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -64,6 +50,7 @@ public CreatePersonRequestDocument() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaClientExample.GeneratedCode.Models.CreatePersonRequestDocument(); } + /// /// The deserialization information for the current model /// @@ -76,6 +63,7 @@ public virtual IDictionary> GetFieldDeserializers() { "meta", n => { Meta = n.GetObjectValue(global::OpenApiKiotaClientExample.GeneratedCode.Models.Meta.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -89,3 +77,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/CreateTagOperation.cs b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/CreateTagOperation.cs index 4434ae4e3..1d72403c2 100644 --- a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/CreateTagOperation.cs +++ b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/CreateTagOperation.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -13,27 +15,19 @@ public partial class CreateTagOperation : global::OpenApiKiotaClientExample.Gene #pragma warning restore CS1591 { /// The data property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaClientExample.GeneratedCode.Models.DataInCreateTagRequest? Data { get { return BackingStore?.Get("data"); } set { BackingStore?.Set("data", value); } } -#nullable restore -#else - public global::OpenApiKiotaClientExample.GeneratedCode.Models.DataInCreateTagRequest Data - { - get { return BackingStore?.Get("data"); } - set { BackingStore?.Set("data", value); } - } -#endif + /// The op property public global::OpenApiKiotaClientExample.GeneratedCode.Models.AddOperationCode? Op { get { return BackingStore?.Get("op"); } set { BackingStore?.Set("op", value); } } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -44,6 +38,7 @@ public partial class CreateTagOperation : global::OpenApiKiotaClientExample.Gene _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaClientExample.GeneratedCode.Models.CreateTagOperation(); } + /// /// The deserialization information for the current model /// @@ -56,6 +51,7 @@ public override IDictionary> GetFieldDeserializers() { "op", n => { Op = n.GetEnumValue(); } }, }; } + /// /// Serializes information the current object /// @@ -70,3 +66,4 @@ public override void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/CreateTagRequestDocument.cs b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/CreateTagRequestDocument.cs index d096271ea..6701a3f93 100644 --- a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/CreateTagRequestDocument.cs +++ b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/CreateTagRequestDocument.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,38 +17,21 @@ public partial class CreateTagRequestDocument : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The data property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaClientExample.GeneratedCode.Models.DataInCreateTagRequest? Data { get { return BackingStore?.Get("data"); } set { BackingStore?.Set("data", value); } } -#nullable restore -#else - public global::OpenApiKiotaClientExample.GeneratedCode.Models.DataInCreateTagRequest Data - { - get { return BackingStore?.Get("data"); } - set { BackingStore?.Set("data", value); } - } -#endif + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaClientExample.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaClientExample.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -54,6 +39,7 @@ public CreateTagRequestDocument() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -64,6 +50,7 @@ public CreateTagRequestDocument() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaClientExample.GeneratedCode.Models.CreateTagRequestDocument(); } + /// /// The deserialization information for the current model /// @@ -76,6 +63,7 @@ public virtual IDictionary> GetFieldDeserializers() { "meta", n => { Meta = n.GetObjectValue(global::OpenApiKiotaClientExample.GeneratedCode.Models.Meta.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -89,3 +77,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/CreateTodoItemOperation.cs b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/CreateTodoItemOperation.cs index 60ee24848..21cc727d0 100644 --- a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/CreateTodoItemOperation.cs +++ b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/CreateTodoItemOperation.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -13,27 +15,19 @@ public partial class CreateTodoItemOperation : global::OpenApiKiotaClientExample #pragma warning restore CS1591 { /// The data property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaClientExample.GeneratedCode.Models.DataInCreateTodoItemRequest? Data { get { return BackingStore?.Get("data"); } set { BackingStore?.Set("data", value); } } -#nullable restore -#else - public global::OpenApiKiotaClientExample.GeneratedCode.Models.DataInCreateTodoItemRequest Data - { - get { return BackingStore?.Get("data"); } - set { BackingStore?.Set("data", value); } - } -#endif + /// The op property public global::OpenApiKiotaClientExample.GeneratedCode.Models.AddOperationCode? Op { get { return BackingStore?.Get("op"); } set { BackingStore?.Set("op", value); } } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -44,6 +38,7 @@ public partial class CreateTodoItemOperation : global::OpenApiKiotaClientExample _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaClientExample.GeneratedCode.Models.CreateTodoItemOperation(); } + /// /// The deserialization information for the current model /// @@ -56,6 +51,7 @@ public override IDictionary> GetFieldDeserializers() { "op", n => { Op = n.GetEnumValue(); } }, }; } + /// /// Serializes information the current object /// @@ -70,3 +66,4 @@ public override void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/CreateTodoItemRequestDocument.cs b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/CreateTodoItemRequestDocument.cs index 47d24e1b1..48654f7b4 100644 --- a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/CreateTodoItemRequestDocument.cs +++ b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/CreateTodoItemRequestDocument.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,38 +17,21 @@ public partial class CreateTodoItemRequestDocument : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The data property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaClientExample.GeneratedCode.Models.DataInCreateTodoItemRequest? Data { get { return BackingStore?.Get("data"); } set { BackingStore?.Set("data", value); } } -#nullable restore -#else - public global::OpenApiKiotaClientExample.GeneratedCode.Models.DataInCreateTodoItemRequest Data - { - get { return BackingStore?.Get("data"); } - set { BackingStore?.Set("data", value); } - } -#endif + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaClientExample.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaClientExample.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -54,6 +39,7 @@ public CreateTodoItemRequestDocument() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -64,6 +50,7 @@ public CreateTodoItemRequestDocument() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaClientExample.GeneratedCode.Models.CreateTodoItemRequestDocument(); } + /// /// The deserialization information for the current model /// @@ -76,6 +63,7 @@ public virtual IDictionary> GetFieldDeserializers() { "meta", n => { Meta = n.GetObjectValue(global::OpenApiKiotaClientExample.GeneratedCode.Models.Meta.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -89,3 +77,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/DataInCreatePersonRequest.cs b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/DataInCreatePersonRequest.cs index 53efea7fc..da1d5605d 100644 --- a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/DataInCreatePersonRequest.cs +++ b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/DataInCreatePersonRequest.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -14,77 +16,43 @@ public partial class DataInCreatePersonRequest : IBackedModel, IParsable #pragma warning restore CS1591 { /// The attributes property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaClientExample.GeneratedCode.Models.AttributesInCreatePersonRequest? Attributes { get { return BackingStore?.Get("attributes"); } set { BackingStore?.Set("attributes", value); } } -#nullable restore -#else - public global::OpenApiKiotaClientExample.GeneratedCode.Models.AttributesInCreatePersonRequest Attributes - { - get { return BackingStore?.Get("attributes"); } - set { BackingStore?.Set("attributes", value); } - } -#endif + /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The lid property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Lid { get { return BackingStore?.Get("lid"); } set { BackingStore?.Set("lid", value); } } -#nullable restore -#else - public string Lid - { - get { return BackingStore?.Get("lid"); } - set { BackingStore?.Set("lid", value); } - } -#endif + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaClientExample.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaClientExample.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// The relationships property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaClientExample.GeneratedCode.Models.RelationshipsInCreatePersonRequest? Relationships { get { return BackingStore?.Get("relationships"); } set { BackingStore?.Set("relationships", value); } } -#nullable restore -#else - public global::OpenApiKiotaClientExample.GeneratedCode.Models.RelationshipsInCreatePersonRequest Relationships - { - get { return BackingStore?.Get("relationships"); } - set { BackingStore?.Set("relationships", value); } - } -#endif + /// The type property public global::OpenApiKiotaClientExample.GeneratedCode.Models.PersonResourceType? Type { get { return BackingStore?.Get("type"); } set { BackingStore?.Set("type", value); } } + /// /// Instantiates a new and sets the default values. /// @@ -92,6 +60,7 @@ public DataInCreatePersonRequest() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -102,6 +71,7 @@ public DataInCreatePersonRequest() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaClientExample.GeneratedCode.Models.DataInCreatePersonRequest(); } + /// /// The deserialization information for the current model /// @@ -117,6 +87,7 @@ public virtual IDictionary> GetFieldDeserializers() { "type", n => { Type = n.GetEnumValue(); } }, }; } + /// /// Serializes information the current object /// @@ -133,3 +104,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/DataInCreateTagRequest.cs b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/DataInCreateTagRequest.cs index 284cb08d8..5b3cce3a1 100644 --- a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/DataInCreateTagRequest.cs +++ b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/DataInCreateTagRequest.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -14,77 +16,43 @@ public partial class DataInCreateTagRequest : IBackedModel, IParsable #pragma warning restore CS1591 { /// The attributes property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaClientExample.GeneratedCode.Models.AttributesInCreateTagRequest? Attributes { get { return BackingStore?.Get("attributes"); } set { BackingStore?.Set("attributes", value); } } -#nullable restore -#else - public global::OpenApiKiotaClientExample.GeneratedCode.Models.AttributesInCreateTagRequest Attributes - { - get { return BackingStore?.Get("attributes"); } - set { BackingStore?.Set("attributes", value); } - } -#endif + /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The lid property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Lid { get { return BackingStore?.Get("lid"); } set { BackingStore?.Set("lid", value); } } -#nullable restore -#else - public string Lid - { - get { return BackingStore?.Get("lid"); } - set { BackingStore?.Set("lid", value); } - } -#endif + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaClientExample.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaClientExample.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// The relationships property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaClientExample.GeneratedCode.Models.RelationshipsInCreateTagRequest? Relationships { get { return BackingStore?.Get("relationships"); } set { BackingStore?.Set("relationships", value); } } -#nullable restore -#else - public global::OpenApiKiotaClientExample.GeneratedCode.Models.RelationshipsInCreateTagRequest Relationships - { - get { return BackingStore?.Get("relationships"); } - set { BackingStore?.Set("relationships", value); } - } -#endif + /// The type property public global::OpenApiKiotaClientExample.GeneratedCode.Models.TagResourceType? Type { get { return BackingStore?.Get("type"); } set { BackingStore?.Set("type", value); } } + /// /// Instantiates a new and sets the default values. /// @@ -92,6 +60,7 @@ public DataInCreateTagRequest() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -102,6 +71,7 @@ public DataInCreateTagRequest() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaClientExample.GeneratedCode.Models.DataInCreateTagRequest(); } + /// /// The deserialization information for the current model /// @@ -117,6 +87,7 @@ public virtual IDictionary> GetFieldDeserializers() { "type", n => { Type = n.GetEnumValue(); } }, }; } + /// /// Serializes information the current object /// @@ -133,3 +104,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/DataInCreateTodoItemRequest.cs b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/DataInCreateTodoItemRequest.cs index fd46f3a89..98539f6be 100644 --- a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/DataInCreateTodoItemRequest.cs +++ b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/DataInCreateTodoItemRequest.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -14,77 +16,43 @@ public partial class DataInCreateTodoItemRequest : IBackedModel, IParsable #pragma warning restore CS1591 { /// The attributes property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaClientExample.GeneratedCode.Models.AttributesInCreateTodoItemRequest? Attributes { get { return BackingStore?.Get("attributes"); } set { BackingStore?.Set("attributes", value); } } -#nullable restore -#else - public global::OpenApiKiotaClientExample.GeneratedCode.Models.AttributesInCreateTodoItemRequest Attributes - { - get { return BackingStore?.Get("attributes"); } - set { BackingStore?.Set("attributes", value); } - } -#endif + /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The lid property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Lid { get { return BackingStore?.Get("lid"); } set { BackingStore?.Set("lid", value); } } -#nullable restore -#else - public string Lid - { - get { return BackingStore?.Get("lid"); } - set { BackingStore?.Set("lid", value); } - } -#endif + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaClientExample.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaClientExample.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// The relationships property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaClientExample.GeneratedCode.Models.RelationshipsInCreateTodoItemRequest? Relationships { get { return BackingStore?.Get("relationships"); } set { BackingStore?.Set("relationships", value); } } -#nullable restore -#else - public global::OpenApiKiotaClientExample.GeneratedCode.Models.RelationshipsInCreateTodoItemRequest Relationships - { - get { return BackingStore?.Get("relationships"); } - set { BackingStore?.Set("relationships", value); } - } -#endif + /// The type property public global::OpenApiKiotaClientExample.GeneratedCode.Models.TodoItemResourceType? Type { get { return BackingStore?.Get("type"); } set { BackingStore?.Set("type", value); } } + /// /// Instantiates a new and sets the default values. /// @@ -92,6 +60,7 @@ public DataInCreateTodoItemRequest() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -102,6 +71,7 @@ public DataInCreateTodoItemRequest() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaClientExample.GeneratedCode.Models.DataInCreateTodoItemRequest(); } + /// /// The deserialization information for the current model /// @@ -117,6 +87,7 @@ public virtual IDictionary> GetFieldDeserializers() { "type", n => { Type = n.GetEnumValue(); } }, }; } + /// /// Serializes information the current object /// @@ -133,3 +104,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/DataInResponse.cs b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/DataInResponse.cs index fa8276616..37d52804e 100644 --- a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/DataInResponse.cs +++ b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/DataInResponse.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,28 +17,21 @@ public partial class DataInResponse : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaClientExample.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaClientExample.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// The type property public global::OpenApiKiotaClientExample.GeneratedCode.Models.ResourceType? Type { get { return BackingStore?.Get("type"); } set { BackingStore?.Set("type", value); } } + /// /// Instantiates a new and sets the default values. /// @@ -44,6 +39,7 @@ public DataInResponse() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -61,6 +57,7 @@ public DataInResponse() _ => new global::OpenApiKiotaClientExample.GeneratedCode.Models.DataInResponse(), }; } + /// /// The deserialization information for the current model /// @@ -73,6 +70,7 @@ public virtual IDictionary> GetFieldDeserializers() { "type", n => { Type = n.GetEnumValue(); } }, }; } + /// /// Serializes information the current object /// @@ -86,3 +84,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/DataInUpdatePersonRequest.cs b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/DataInUpdatePersonRequest.cs index c3edfb046..5f26c50d0 100644 --- a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/DataInUpdatePersonRequest.cs +++ b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/DataInUpdatePersonRequest.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -14,93 +16,50 @@ public partial class DataInUpdatePersonRequest : IBackedModel, IParsable #pragma warning restore CS1591 { /// The attributes property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaClientExample.GeneratedCode.Models.AttributesInUpdatePersonRequest? Attributes { get { return BackingStore?.Get("attributes"); } set { BackingStore?.Set("attributes", value); } } -#nullable restore -#else - public global::OpenApiKiotaClientExample.GeneratedCode.Models.AttributesInUpdatePersonRequest Attributes - { - get { return BackingStore?.Get("attributes"); } - set { BackingStore?.Set("attributes", value); } - } -#endif + /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The id property -#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 lid property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Lid { get { return BackingStore?.Get("lid"); } set { BackingStore?.Set("lid", value); } } -#nullable restore -#else - public string Lid - { - get { return BackingStore?.Get("lid"); } - set { BackingStore?.Set("lid", value); } - } -#endif + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaClientExample.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaClientExample.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// The relationships property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaClientExample.GeneratedCode.Models.RelationshipsInUpdatePersonRequest? Relationships { get { return BackingStore?.Get("relationships"); } set { BackingStore?.Set("relationships", value); } } -#nullable restore -#else - public global::OpenApiKiotaClientExample.GeneratedCode.Models.RelationshipsInUpdatePersonRequest Relationships - { - get { return BackingStore?.Get("relationships"); } - set { BackingStore?.Set("relationships", value); } - } -#endif + /// The type property public global::OpenApiKiotaClientExample.GeneratedCode.Models.PersonResourceType? Type { get { return BackingStore?.Get("type"); } set { BackingStore?.Set("type", value); } } + /// /// Instantiates a new and sets the default values. /// @@ -108,6 +67,7 @@ public DataInUpdatePersonRequest() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -118,6 +78,7 @@ public DataInUpdatePersonRequest() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaClientExample.GeneratedCode.Models.DataInUpdatePersonRequest(); } + /// /// The deserialization information for the current model /// @@ -134,6 +95,7 @@ public virtual IDictionary> GetFieldDeserializers() { "type", n => { Type = n.GetEnumValue(); } }, }; } + /// /// Serializes information the current object /// @@ -151,3 +113,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/DataInUpdateTagRequest.cs b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/DataInUpdateTagRequest.cs index 4a7728a4f..44bf059f4 100644 --- a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/DataInUpdateTagRequest.cs +++ b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/DataInUpdateTagRequest.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -14,93 +16,50 @@ public partial class DataInUpdateTagRequest : IBackedModel, IParsable #pragma warning restore CS1591 { /// The attributes property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaClientExample.GeneratedCode.Models.AttributesInUpdateTagRequest? Attributes { get { return BackingStore?.Get("attributes"); } set { BackingStore?.Set("attributes", value); } } -#nullable restore -#else - public global::OpenApiKiotaClientExample.GeneratedCode.Models.AttributesInUpdateTagRequest Attributes - { - get { return BackingStore?.Get("attributes"); } - set { BackingStore?.Set("attributes", value); } - } -#endif + /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The id property -#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 lid property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Lid { get { return BackingStore?.Get("lid"); } set { BackingStore?.Set("lid", value); } } -#nullable restore -#else - public string Lid - { - get { return BackingStore?.Get("lid"); } - set { BackingStore?.Set("lid", value); } - } -#endif + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaClientExample.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaClientExample.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// The relationships property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaClientExample.GeneratedCode.Models.RelationshipsInUpdateTagRequest? Relationships { get { return BackingStore?.Get("relationships"); } set { BackingStore?.Set("relationships", value); } } -#nullable restore -#else - public global::OpenApiKiotaClientExample.GeneratedCode.Models.RelationshipsInUpdateTagRequest Relationships - { - get { return BackingStore?.Get("relationships"); } - set { BackingStore?.Set("relationships", value); } - } -#endif + /// The type property public global::OpenApiKiotaClientExample.GeneratedCode.Models.TagResourceType? Type { get { return BackingStore?.Get("type"); } set { BackingStore?.Set("type", value); } } + /// /// Instantiates a new and sets the default values. /// @@ -108,6 +67,7 @@ public DataInUpdateTagRequest() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -118,6 +78,7 @@ public DataInUpdateTagRequest() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaClientExample.GeneratedCode.Models.DataInUpdateTagRequest(); } + /// /// The deserialization information for the current model /// @@ -134,6 +95,7 @@ public virtual IDictionary> GetFieldDeserializers() { "type", n => { Type = n.GetEnumValue(); } }, }; } + /// /// Serializes information the current object /// @@ -151,3 +113,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/DataInUpdateTodoItemRequest.cs b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/DataInUpdateTodoItemRequest.cs index a446414a9..8d66fbe81 100644 --- a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/DataInUpdateTodoItemRequest.cs +++ b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/DataInUpdateTodoItemRequest.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -14,93 +16,50 @@ public partial class DataInUpdateTodoItemRequest : IBackedModel, IParsable #pragma warning restore CS1591 { /// The attributes property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaClientExample.GeneratedCode.Models.AttributesInUpdateTodoItemRequest? Attributes { get { return BackingStore?.Get("attributes"); } set { BackingStore?.Set("attributes", value); } } -#nullable restore -#else - public global::OpenApiKiotaClientExample.GeneratedCode.Models.AttributesInUpdateTodoItemRequest Attributes - { - get { return BackingStore?.Get("attributes"); } - set { BackingStore?.Set("attributes", value); } - } -#endif + /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The id property -#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 lid property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Lid { get { return BackingStore?.Get("lid"); } set { BackingStore?.Set("lid", value); } } -#nullable restore -#else - public string Lid - { - get { return BackingStore?.Get("lid"); } - set { BackingStore?.Set("lid", value); } - } -#endif + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaClientExample.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaClientExample.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// The relationships property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaClientExample.GeneratedCode.Models.RelationshipsInUpdateTodoItemRequest? Relationships { get { return BackingStore?.Get("relationships"); } set { BackingStore?.Set("relationships", value); } } -#nullable restore -#else - public global::OpenApiKiotaClientExample.GeneratedCode.Models.RelationshipsInUpdateTodoItemRequest Relationships - { - get { return BackingStore?.Get("relationships"); } - set { BackingStore?.Set("relationships", value); } - } -#endif + /// The type property public global::OpenApiKiotaClientExample.GeneratedCode.Models.TodoItemResourceType? Type { get { return BackingStore?.Get("type"); } set { BackingStore?.Set("type", value); } } + /// /// Instantiates a new and sets the default values. /// @@ -108,6 +67,7 @@ public DataInUpdateTodoItemRequest() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -118,6 +78,7 @@ public DataInUpdateTodoItemRequest() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaClientExample.GeneratedCode.Models.DataInUpdateTodoItemRequest(); } + /// /// The deserialization information for the current model /// @@ -134,6 +95,7 @@ public virtual IDictionary> GetFieldDeserializers() { "type", n => { Type = n.GetEnumValue(); } }, }; } + /// /// Serializes information the current object /// @@ -151,3 +113,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/DeletePersonOperation.cs b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/DeletePersonOperation.cs index 744f26417..c3a808201 100644 --- a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/DeletePersonOperation.cs +++ b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/DeletePersonOperation.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -18,22 +20,14 @@ public partial class DeletePersonOperation : global::OpenApiKiotaClientExample.G get { return BackingStore?.Get("op"); } set { BackingStore?.Set("op", value); } } + /// The ref property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaClientExample.GeneratedCode.Models.PersonIdentifierInRequest? Ref { get { return BackingStore?.Get("ref"); } set { BackingStore?.Set("ref", value); } } -#nullable restore -#else - public global::OpenApiKiotaClientExample.GeneratedCode.Models.PersonIdentifierInRequest Ref - { - get { return BackingStore?.Get("ref"); } - set { BackingStore?.Set("ref", value); } - } -#endif + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -44,6 +38,7 @@ public partial class DeletePersonOperation : global::OpenApiKiotaClientExample.G _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaClientExample.GeneratedCode.Models.DeletePersonOperation(); } + /// /// The deserialization information for the current model /// @@ -56,6 +51,7 @@ public override IDictionary> GetFieldDeserializers() { "ref", n => { Ref = n.GetObjectValue(global::OpenApiKiotaClientExample.GeneratedCode.Models.PersonIdentifierInRequest.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -70,3 +66,4 @@ public override void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/DeleteTagOperation.cs b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/DeleteTagOperation.cs index da8907fee..7b69d0d85 100644 --- a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/DeleteTagOperation.cs +++ b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/DeleteTagOperation.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -18,22 +20,14 @@ public partial class DeleteTagOperation : global::OpenApiKiotaClientExample.Gene get { return BackingStore?.Get("op"); } set { BackingStore?.Set("op", value); } } + /// The ref property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaClientExample.GeneratedCode.Models.TagIdentifierInRequest? Ref { get { return BackingStore?.Get("ref"); } set { BackingStore?.Set("ref", value); } } -#nullable restore -#else - public global::OpenApiKiotaClientExample.GeneratedCode.Models.TagIdentifierInRequest Ref - { - get { return BackingStore?.Get("ref"); } - set { BackingStore?.Set("ref", value); } - } -#endif + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -44,6 +38,7 @@ public partial class DeleteTagOperation : global::OpenApiKiotaClientExample.Gene _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaClientExample.GeneratedCode.Models.DeleteTagOperation(); } + /// /// The deserialization information for the current model /// @@ -56,6 +51,7 @@ public override IDictionary> GetFieldDeserializers() { "ref", n => { Ref = n.GetObjectValue(global::OpenApiKiotaClientExample.GeneratedCode.Models.TagIdentifierInRequest.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -70,3 +66,4 @@ public override void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/DeleteTodoItemOperation.cs b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/DeleteTodoItemOperation.cs index 0549daf40..f1592a402 100644 --- a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/DeleteTodoItemOperation.cs +++ b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/DeleteTodoItemOperation.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -18,22 +20,14 @@ public partial class DeleteTodoItemOperation : global::OpenApiKiotaClientExample get { return BackingStore?.Get("op"); } set { BackingStore?.Set("op", value); } } + /// The ref property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaClientExample.GeneratedCode.Models.TodoItemIdentifierInRequest? Ref { get { return BackingStore?.Get("ref"); } set { BackingStore?.Set("ref", value); } } -#nullable restore -#else - public global::OpenApiKiotaClientExample.GeneratedCode.Models.TodoItemIdentifierInRequest Ref - { - get { return BackingStore?.Get("ref"); } - set { BackingStore?.Set("ref", value); } - } -#endif + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -44,6 +38,7 @@ public partial class DeleteTodoItemOperation : global::OpenApiKiotaClientExample _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaClientExample.GeneratedCode.Models.DeleteTodoItemOperation(); } + /// /// The deserialization information for the current model /// @@ -56,6 +51,7 @@ public override IDictionary> GetFieldDeserializers() { "ref", n => { Ref = n.GetObjectValue(global::OpenApiKiotaClientExample.GeneratedCode.Models.TodoItemIdentifierInRequest.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -70,3 +66,4 @@ public override void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/ErrorLinks.cs b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/ErrorLinks.cs index deecfe886..76463c2f7 100644 --- a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/ErrorLinks.cs +++ b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/ErrorLinks.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -14,39 +16,22 @@ public partial class ErrorLinks : IBackedModel, IParsable #pragma warning restore CS1591 { /// The about property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? About { get { return BackingStore?.Get("about"); } set { BackingStore?.Set("about", value); } } -#nullable restore -#else - public string About - { - get { return BackingStore?.Get("about"); } - set { BackingStore?.Set("about", value); } - } -#endif + /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// 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 and sets the default values. /// @@ -54,6 +39,7 @@ public ErrorLinks() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -64,6 +50,7 @@ public ErrorLinks() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaClientExample.GeneratedCode.Models.ErrorLinks(); } + /// /// The deserialization information for the current model /// @@ -76,6 +63,7 @@ public virtual IDictionary> GetFieldDeserializers() { "type", n => { Type = n.GetStringValue(); } }, }; } + /// /// Serializes information the current object /// @@ -89,3 +77,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/ErrorObject.cs b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/ErrorObject.cs index d5a7566b3..29f61d8de 100644 --- a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/ErrorObject.cs +++ b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/ErrorObject.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,134 +17,63 @@ public partial class ErrorObject : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The code property -#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 detail property -#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 id property -#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 links property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaClientExample.GeneratedCode.Models.ErrorLinks? Links { get { return BackingStore?.Get("links"); } set { BackingStore?.Set("links", value); } } -#nullable restore -#else - public global::OpenApiKiotaClientExample.GeneratedCode.Models.ErrorLinks Links - { - get { return BackingStore?.Get("links"); } - set { BackingStore?.Set("links", value); } - } -#endif + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaClientExample.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaClientExample.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// The source property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaClientExample.GeneratedCode.Models.ErrorSource? Source { get { return BackingStore?.Get("source"); } set { BackingStore?.Set("source", value); } } -#nullable restore -#else - public global::OpenApiKiotaClientExample.GeneratedCode.Models.ErrorSource Source - { - get { return BackingStore?.Get("source"); } - set { BackingStore?.Set("source", value); } - } -#endif + /// The status property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Status { get { return BackingStore?.Get("status"); } set { BackingStore?.Set("status", value); } } -#nullable restore -#else - public string Status - { - get { return BackingStore?.Get("status"); } - set { BackingStore?.Set("status", value); } - } -#endif + /// The title property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Title { get { return BackingStore?.Get("title"); } set { BackingStore?.Set("title", value); } } -#nullable restore -#else - public string Title - { - get { return BackingStore?.Get("title"); } - set { BackingStore?.Set("title", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -150,6 +81,7 @@ public ErrorObject() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -160,6 +92,7 @@ public ErrorObject() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaClientExample.GeneratedCode.Models.ErrorObject(); } + /// /// The deserialization information for the current model /// @@ -178,6 +111,7 @@ public virtual IDictionary> GetFieldDeserializers() { "title", n => { Title = n.GetStringValue(); } }, }; } + /// /// Serializes information the current object /// @@ -197,3 +131,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/ErrorResponseDocument.cs b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/ErrorResponseDocument.cs index accf874f8..2a9c72b06 100644 --- a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/ErrorResponseDocument.cs +++ b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/ErrorResponseDocument.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -16,56 +18,31 @@ public partial class ErrorResponseDocument : ApiException, IBackedModel, IParsab { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The errors property -#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 + /// The links property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaClientExample.GeneratedCode.Models.ErrorTopLevelLinks? Links { get { return BackingStore?.Get("links"); } set { BackingStore?.Set("links", value); } } -#nullable restore -#else - public global::OpenApiKiotaClientExample.GeneratedCode.Models.ErrorTopLevelLinks Links - { - get { return BackingStore?.Get("links"); } - set { BackingStore?.Set("links", value); } - } -#endif + /// The primary error message. public override string Message { get => base.Message; } + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaClientExample.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaClientExample.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -73,6 +50,7 @@ public ErrorResponseDocument() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -83,6 +61,7 @@ public ErrorResponseDocument() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaClientExample.GeneratedCode.Models.ErrorResponseDocument(); } + /// /// The deserialization information for the current model /// @@ -96,6 +75,7 @@ public virtual IDictionary> GetFieldDeserializers() { "meta", n => { Meta = n.GetObjectValue(global::OpenApiKiotaClientExample.GeneratedCode.Models.Meta.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -110,3 +90,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/ErrorSource.cs b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/ErrorSource.cs index 200d2e9b3..5c6f9d89c 100644 --- a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/ErrorSource.cs +++ b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/ErrorSource.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,54 +17,28 @@ public partial class ErrorSource : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The header property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Header { get { return BackingStore?.Get("header"); } set { BackingStore?.Set("header", value); } } -#nullable restore -#else - public string Header - { - get { return BackingStore?.Get("header"); } - set { BackingStore?.Set("header", value); } - } -#endif + /// The parameter property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Parameter { get { return BackingStore?.Get("parameter"); } set { BackingStore?.Set("parameter", value); } } -#nullable restore -#else - public string Parameter - { - get { return BackingStore?.Get("parameter"); } - set { BackingStore?.Set("parameter", value); } - } -#endif + /// The pointer property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Pointer { get { return BackingStore?.Get("pointer"); } set { BackingStore?.Set("pointer", value); } } -#nullable restore -#else - public string Pointer - { - get { return BackingStore?.Get("pointer"); } - set { BackingStore?.Set("pointer", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -70,6 +46,7 @@ public ErrorSource() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -80,6 +57,7 @@ public ErrorSource() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaClientExample.GeneratedCode.Models.ErrorSource(); } + /// /// The deserialization information for the current model /// @@ -93,6 +71,7 @@ public virtual IDictionary> GetFieldDeserializers() { "pointer", n => { Pointer = n.GetStringValue(); } }, }; } + /// /// Serializes information the current object /// @@ -107,3 +86,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/ErrorTopLevelLinks.cs b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/ErrorTopLevelLinks.cs index 0a79742c8..3a2680d91 100644 --- a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/ErrorTopLevelLinks.cs +++ b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/ErrorTopLevelLinks.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,38 +17,21 @@ public partial class ErrorTopLevelLinks : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The describedby property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Describedby { get { return BackingStore?.Get("describedby"); } set { BackingStore?.Set("describedby", value); } } -#nullable restore -#else - public string Describedby - { - get { return BackingStore?.Get("describedby"); } - set { BackingStore?.Set("describedby", value); } - } -#endif + /// The self property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Self { get { return BackingStore?.Get("self"); } set { BackingStore?.Set("self", value); } } -#nullable restore -#else - public string Self - { - get { return BackingStore?.Get("self"); } - set { BackingStore?.Set("self", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -54,6 +39,7 @@ public ErrorTopLevelLinks() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -64,6 +50,7 @@ public ErrorTopLevelLinks() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaClientExample.GeneratedCode.Models.ErrorTopLevelLinks(); } + /// /// The deserialization information for the current model /// @@ -76,6 +63,7 @@ public virtual IDictionary> GetFieldDeserializers() { "self", n => { Self = n.GetStringValue(); } }, }; } + /// /// Serializes information the current object /// @@ -89,3 +77,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/Meta.cs b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/Meta.cs index 59cc59958..bafd4270d 100644 --- a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/Meta.cs +++ b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/Meta.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -19,8 +21,10 @@ public IDictionary AdditionalData get { return BackingStore.Get>("AdditionalData") ?? new Dictionary(); } set { BackingStore.Set("AdditionalData", value); } } + /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// /// Instantiates a new and sets the default values. /// @@ -29,6 +33,7 @@ public Meta() BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); AdditionalData = new Dictionary(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -39,6 +44,7 @@ public Meta() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaClientExample.GeneratedCode.Models.Meta(); } + /// /// The deserialization information for the current model /// @@ -49,6 +55,7 @@ public virtual IDictionary> GetFieldDeserializers() { }; } + /// /// Serializes information the current object /// @@ -61,3 +68,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/NullablePersonIdentifierResponseDocument.cs b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/NullablePersonIdentifierResponseDocument.cs index 3bc60c99a..7987a2908 100644 --- a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/NullablePersonIdentifierResponseDocument.cs +++ b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/NullablePersonIdentifierResponseDocument.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,54 +17,28 @@ public partial class NullablePersonIdentifierResponseDocument : IBackedModel, IP { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The data property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaClientExample.GeneratedCode.Models.PersonIdentifierInResponse? Data { get { return BackingStore?.Get("data"); } set { BackingStore?.Set("data", value); } } -#nullable restore -#else - public global::OpenApiKiotaClientExample.GeneratedCode.Models.PersonIdentifierInResponse Data - { - get { return BackingStore?.Get("data"); } - set { BackingStore?.Set("data", value); } - } -#endif + /// The links property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaClientExample.GeneratedCode.Models.ResourceIdentifierTopLevelLinks? Links { get { return BackingStore?.Get("links"); } set { BackingStore?.Set("links", value); } } -#nullable restore -#else - public global::OpenApiKiotaClientExample.GeneratedCode.Models.ResourceIdentifierTopLevelLinks Links - { - get { return BackingStore?.Get("links"); } - set { BackingStore?.Set("links", value); } - } -#endif + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaClientExample.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaClientExample.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -70,6 +46,7 @@ public NullablePersonIdentifierResponseDocument() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -80,6 +57,7 @@ public NullablePersonIdentifierResponseDocument() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaClientExample.GeneratedCode.Models.NullablePersonIdentifierResponseDocument(); } + /// /// The deserialization information for the current model /// @@ -93,6 +71,7 @@ public virtual IDictionary> GetFieldDeserializers() { "meta", n => { Meta = n.GetObjectValue(global::OpenApiKiotaClientExample.GeneratedCode.Models.Meta.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -107,3 +86,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/NullablePersonSecondaryResponseDocument.cs b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/NullablePersonSecondaryResponseDocument.cs index cfc003aaf..c6ca47f8e 100644 --- a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/NullablePersonSecondaryResponseDocument.cs +++ b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/NullablePersonSecondaryResponseDocument.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,70 +17,35 @@ public partial class NullablePersonSecondaryResponseDocument : IBackedModel, IPa { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The data property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaClientExample.GeneratedCode.Models.PersonDataInResponse? Data { get { return BackingStore?.Get("data"); } set { BackingStore?.Set("data", value); } } -#nullable restore -#else - public global::OpenApiKiotaClientExample.GeneratedCode.Models.PersonDataInResponse Data - { - get { return BackingStore?.Get("data"); } - set { BackingStore?.Set("data", value); } - } -#endif + /// The included property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public List? Included { get { return BackingStore?.Get?>("included"); } set { BackingStore?.Set("included", value); } } -#nullable restore -#else - public List Included - { - get { return BackingStore?.Get>("included"); } - set { BackingStore?.Set("included", value); } - } -#endif + /// The links property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaClientExample.GeneratedCode.Models.ResourceTopLevelLinks? Links { get { return BackingStore?.Get("links"); } set { BackingStore?.Set("links", value); } } -#nullable restore -#else - public global::OpenApiKiotaClientExample.GeneratedCode.Models.ResourceTopLevelLinks Links - { - get { return BackingStore?.Get("links"); } - set { BackingStore?.Set("links", value); } - } -#endif + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaClientExample.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaClientExample.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -86,6 +53,7 @@ public NullablePersonSecondaryResponseDocument() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -96,6 +64,7 @@ public NullablePersonSecondaryResponseDocument() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaClientExample.GeneratedCode.Models.NullablePersonSecondaryResponseDocument(); } + /// /// The deserialization information for the current model /// @@ -110,6 +79,7 @@ public virtual IDictionary> GetFieldDeserializers() { "meta", n => { Meta = n.GetObjectValue(global::OpenApiKiotaClientExample.GeneratedCode.Models.Meta.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -125,3 +95,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/NullableToOnePersonInRequest.cs b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/NullableToOnePersonInRequest.cs index 22788ae0b..f0c86baef 100644 --- a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/NullableToOnePersonInRequest.cs +++ b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/NullableToOnePersonInRequest.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,38 +17,21 @@ public partial class NullableToOnePersonInRequest : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The data property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaClientExample.GeneratedCode.Models.PersonIdentifierInRequest? Data { get { return BackingStore?.Get("data"); } set { BackingStore?.Set("data", value); } } -#nullable restore -#else - public global::OpenApiKiotaClientExample.GeneratedCode.Models.PersonIdentifierInRequest Data - { - get { return BackingStore?.Get("data"); } - set { BackingStore?.Set("data", value); } - } -#endif + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaClientExample.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaClientExample.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -54,6 +39,7 @@ public NullableToOnePersonInRequest() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -64,6 +50,7 @@ public NullableToOnePersonInRequest() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaClientExample.GeneratedCode.Models.NullableToOnePersonInRequest(); } + /// /// The deserialization information for the current model /// @@ -76,6 +63,7 @@ public virtual IDictionary> GetFieldDeserializers() { "meta", n => { Meta = n.GetObjectValue(global::OpenApiKiotaClientExample.GeneratedCode.Models.Meta.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -89,3 +77,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/NullableToOnePersonInResponse.cs b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/NullableToOnePersonInResponse.cs index 95697f16b..e8e52b40a 100644 --- a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/NullableToOnePersonInResponse.cs +++ b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/NullableToOnePersonInResponse.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,54 +17,28 @@ public partial class NullableToOnePersonInResponse : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The data property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaClientExample.GeneratedCode.Models.PersonIdentifierInResponse? Data { get { return BackingStore?.Get("data"); } set { BackingStore?.Set("data", value); } } -#nullable restore -#else - public global::OpenApiKiotaClientExample.GeneratedCode.Models.PersonIdentifierInResponse Data - { - get { return BackingStore?.Get("data"); } - set { BackingStore?.Set("data", value); } - } -#endif + /// The links property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaClientExample.GeneratedCode.Models.RelationshipLinks? Links { get { return BackingStore?.Get("links"); } set { BackingStore?.Set("links", value); } } -#nullable restore -#else - public global::OpenApiKiotaClientExample.GeneratedCode.Models.RelationshipLinks Links - { - get { return BackingStore?.Get("links"); } - set { BackingStore?.Set("links", value); } - } -#endif + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaClientExample.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaClientExample.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -70,6 +46,7 @@ public NullableToOnePersonInResponse() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -80,6 +57,7 @@ public NullableToOnePersonInResponse() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaClientExample.GeneratedCode.Models.NullableToOnePersonInResponse(); } + /// /// The deserialization information for the current model /// @@ -93,6 +71,7 @@ public virtual IDictionary> GetFieldDeserializers() { "meta", n => { Meta = n.GetObjectValue(global::OpenApiKiotaClientExample.GeneratedCode.Models.Meta.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -107,3 +86,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/OperationsRequestDocument.cs b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/OperationsRequestDocument.cs index 23a11f2cb..f0084780a 100644 --- a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/OperationsRequestDocument.cs +++ b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/OperationsRequestDocument.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -14,39 +16,22 @@ public partial class OperationsRequestDocument : IBackedModel, IParsable #pragma warning restore CS1591 { /// The atomicOperations property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public List? AtomicOperations { get { return BackingStore?.Get?>("atomic:operations"); } set { BackingStore?.Set("atomic:operations", value); } } -#nullable restore -#else - public List AtomicOperations - { - get { return BackingStore?.Get>("atomic:operations"); } - set { BackingStore?.Set("atomic:operations", value); } - } -#endif + /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaClientExample.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaClientExample.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -54,6 +39,7 @@ public OperationsRequestDocument() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -64,6 +50,7 @@ public OperationsRequestDocument() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaClientExample.GeneratedCode.Models.OperationsRequestDocument(); } + /// /// The deserialization information for the current model /// @@ -76,6 +63,7 @@ public virtual IDictionary> GetFieldDeserializers() { "meta", n => { Meta = n.GetObjectValue(global::OpenApiKiotaClientExample.GeneratedCode.Models.Meta.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -89,3 +77,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/OperationsResponseDocument.cs b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/OperationsResponseDocument.cs index 77d2bebf6..6428a3be6 100644 --- a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/OperationsResponseDocument.cs +++ b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/OperationsResponseDocument.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -14,55 +16,29 @@ public partial class OperationsResponseDocument : IBackedModel, IParsable #pragma warning restore CS1591 { /// The atomicResults property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public List? AtomicResults { get { return BackingStore?.Get?>("atomic:results"); } set { BackingStore?.Set("atomic:results", value); } } -#nullable restore -#else - public List AtomicResults - { - get { return BackingStore?.Get>("atomic:results"); } - set { BackingStore?.Set("atomic:results", value); } - } -#endif + /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The links property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaClientExample.GeneratedCode.Models.ResourceTopLevelLinks? Links { get { return BackingStore?.Get("links"); } set { BackingStore?.Set("links", value); } } -#nullable restore -#else - public global::OpenApiKiotaClientExample.GeneratedCode.Models.ResourceTopLevelLinks Links - { - get { return BackingStore?.Get("links"); } - set { BackingStore?.Set("links", value); } - } -#endif + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaClientExample.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaClientExample.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -70,6 +46,7 @@ public OperationsResponseDocument() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -80,6 +57,7 @@ public OperationsResponseDocument() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaClientExample.GeneratedCode.Models.OperationsResponseDocument(); } + /// /// The deserialization information for the current model /// @@ -93,6 +71,7 @@ public virtual IDictionary> GetFieldDeserializers() { "meta", n => { Meta = n.GetObjectValue(global::OpenApiKiotaClientExample.GeneratedCode.Models.Meta.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -107,3 +86,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/PersonAssignedTodoItemsRelationshipIdentifier.cs b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/PersonAssignedTodoItemsRelationshipIdentifier.cs index 75a1c8a3f..09819feb4 100644 --- a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/PersonAssignedTodoItemsRelationshipIdentifier.cs +++ b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/PersonAssignedTodoItemsRelationshipIdentifier.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,50 +17,35 @@ public partial class PersonAssignedTodoItemsRelationshipIdentifier : IBackedMode { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The id property -#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 lid property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Lid { get { return BackingStore?.Get("lid"); } set { BackingStore?.Set("lid", value); } } -#nullable restore -#else - public string Lid - { - get { return BackingStore?.Get("lid"); } - set { BackingStore?.Set("lid", value); } - } -#endif + /// The relationship property public global::OpenApiKiotaClientExample.GeneratedCode.Models.PersonAssignedTodoItemsRelationshipName? Relationship { get { return BackingStore?.Get("relationship"); } set { BackingStore?.Set("relationship", value); } } + /// The type property public global::OpenApiKiotaClientExample.GeneratedCode.Models.PersonResourceType? Type { get { return BackingStore?.Get("type"); } set { BackingStore?.Set("type", value); } } + /// /// Instantiates a new and sets the default values. /// @@ -66,6 +53,7 @@ public PersonAssignedTodoItemsRelationshipIdentifier() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -76,6 +64,7 @@ public PersonAssignedTodoItemsRelationshipIdentifier() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaClientExample.GeneratedCode.Models.PersonAssignedTodoItemsRelationshipIdentifier(); } + /// /// The deserialization information for the current model /// @@ -90,6 +79,7 @@ public virtual IDictionary> GetFieldDeserializers() { "type", n => { Type = n.GetEnumValue(); } }, }; } + /// /// Serializes information the current object /// @@ -105,3 +95,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/PersonAssignedTodoItemsRelationshipName.cs b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/PersonAssignedTodoItemsRelationshipName.cs index 994609e9d..312a62064 100644 --- a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/PersonAssignedTodoItemsRelationshipName.cs +++ b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/PersonAssignedTodoItemsRelationshipName.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 using System.Runtime.Serialization; using System; namespace OpenApiKiotaClientExample.GeneratedCode.Models @@ -14,3 +16,4 @@ public enum PersonAssignedTodoItemsRelationshipName #pragma warning restore CS1591 } } + diff --git a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/PersonAttributesInResponse.cs b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/PersonAttributesInResponse.cs index 15f4b3652..6bde68652 100644 --- a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/PersonAttributesInResponse.cs +++ b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/PersonAttributesInResponse.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,54 +17,28 @@ public partial class PersonAttributesInResponse : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The displayName property -#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 firstName property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? FirstName { get { return BackingStore?.Get("firstName"); } set { BackingStore?.Set("firstName", value); } } -#nullable restore -#else - public string FirstName - { - get { return BackingStore?.Get("firstName"); } - set { BackingStore?.Set("firstName", value); } - } -#endif + /// The lastName property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? LastName { get { return BackingStore?.Get("lastName"); } set { BackingStore?.Set("lastName", value); } } -#nullable restore -#else - public string LastName - { - get { return BackingStore?.Get("lastName"); } - set { BackingStore?.Set("lastName", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -70,6 +46,7 @@ public PersonAttributesInResponse() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -80,6 +57,7 @@ public PersonAttributesInResponse() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaClientExample.GeneratedCode.Models.PersonAttributesInResponse(); } + /// /// The deserialization information for the current model /// @@ -93,6 +71,7 @@ public virtual IDictionary> GetFieldDeserializers() { "lastName", n => { LastName = n.GetStringValue(); } }, }; } + /// /// Serializes information the current object /// @@ -106,3 +85,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/PersonCollectionResponseDocument.cs b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/PersonCollectionResponseDocument.cs index a1fcbc0ee..e571088b3 100644 --- a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/PersonCollectionResponseDocument.cs +++ b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/PersonCollectionResponseDocument.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,70 +17,35 @@ public partial class PersonCollectionResponseDocument : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The data property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public List? Data { get { return BackingStore?.Get?>("data"); } set { BackingStore?.Set("data", value); } } -#nullable restore -#else - public List Data - { - get { return BackingStore?.Get>("data"); } - set { BackingStore?.Set("data", value); } - } -#endif + /// The included property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public List? Included { get { return BackingStore?.Get?>("included"); } set { BackingStore?.Set("included", value); } } -#nullable restore -#else - public List Included - { - get { return BackingStore?.Get>("included"); } - set { BackingStore?.Set("included", value); } - } -#endif + /// The links property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaClientExample.GeneratedCode.Models.ResourceCollectionTopLevelLinks? Links { get { return BackingStore?.Get("links"); } set { BackingStore?.Set("links", value); } } -#nullable restore -#else - public global::OpenApiKiotaClientExample.GeneratedCode.Models.ResourceCollectionTopLevelLinks Links - { - get { return BackingStore?.Get("links"); } - set { BackingStore?.Set("links", value); } - } -#endif + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaClientExample.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaClientExample.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -86,6 +53,7 @@ public PersonCollectionResponseDocument() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -96,6 +64,7 @@ public PersonCollectionResponseDocument() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaClientExample.GeneratedCode.Models.PersonCollectionResponseDocument(); } + /// /// The deserialization information for the current model /// @@ -110,6 +79,7 @@ public virtual IDictionary> GetFieldDeserializers() { "meta", n => { Meta = n.GetObjectValue(global::OpenApiKiotaClientExample.GeneratedCode.Models.Meta.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -125,3 +95,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/PersonDataInResponse.cs b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/PersonDataInResponse.cs index 37677e82f..be2aead8a 100644 --- a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/PersonDataInResponse.cs +++ b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/PersonDataInResponse.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -13,69 +15,33 @@ public partial class PersonDataInResponse : global::OpenApiKiotaClientExample.Ge #pragma warning restore CS1591 { /// The attributes property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaClientExample.GeneratedCode.Models.PersonAttributesInResponse? Attributes { get { return BackingStore?.Get("attributes"); } set { BackingStore?.Set("attributes", value); } } -#nullable restore -#else - public global::OpenApiKiotaClientExample.GeneratedCode.Models.PersonAttributesInResponse Attributes - { - get { return BackingStore?.Get("attributes"); } - set { BackingStore?.Set("attributes", value); } - } -#endif + /// The id property -#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 links property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaClientExample.GeneratedCode.Models.ResourceLinks? Links { get { return BackingStore?.Get("links"); } set { BackingStore?.Set("links", value); } } -#nullable restore -#else - public global::OpenApiKiotaClientExample.GeneratedCode.Models.ResourceLinks Links - { - get { return BackingStore?.Get("links"); } - set { BackingStore?.Set("links", value); } - } -#endif + /// The relationships property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaClientExample.GeneratedCode.Models.PersonRelationshipsInResponse? Relationships { get { return BackingStore?.Get("relationships"); } set { BackingStore?.Set("relationships", value); } } -#nullable restore -#else - public global::OpenApiKiotaClientExample.GeneratedCode.Models.PersonRelationshipsInResponse Relationships - { - get { return BackingStore?.Get("relationships"); } - set { BackingStore?.Set("relationships", value); } - } -#endif + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -86,6 +52,7 @@ public string Id _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaClientExample.GeneratedCode.Models.PersonDataInResponse(); } + /// /// The deserialization information for the current model /// @@ -100,6 +67,7 @@ public override IDictionary> GetFieldDeserializers() { "relationships", n => { Relationships = n.GetObjectValue(global::OpenApiKiotaClientExample.GeneratedCode.Models.PersonRelationshipsInResponse.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -116,3 +84,4 @@ public override void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/PersonIdentifierInRequest.cs b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/PersonIdentifierInRequest.cs index e548ec28e..eac2a0c93 100644 --- a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/PersonIdentifierInRequest.cs +++ b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/PersonIdentifierInRequest.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,60 +17,35 @@ public partial class PersonIdentifierInRequest : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The id property -#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 lid property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Lid { get { return BackingStore?.Get("lid"); } set { BackingStore?.Set("lid", value); } } -#nullable restore -#else - public string Lid - { - get { return BackingStore?.Get("lid"); } - set { BackingStore?.Set("lid", value); } - } -#endif + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaClientExample.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaClientExample.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// The type property public global::OpenApiKiotaClientExample.GeneratedCode.Models.PersonResourceType? Type { get { return BackingStore?.Get("type"); } set { BackingStore?.Set("type", value); } } + /// /// Instantiates a new and sets the default values. /// @@ -76,6 +53,7 @@ public PersonIdentifierInRequest() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -86,6 +64,7 @@ public PersonIdentifierInRequest() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaClientExample.GeneratedCode.Models.PersonIdentifierInRequest(); } + /// /// The deserialization information for the current model /// @@ -100,6 +79,7 @@ public virtual IDictionary> GetFieldDeserializers() { "type", n => { Type = n.GetEnumValue(); } }, }; } + /// /// Serializes information the current object /// @@ -115,3 +95,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/PersonIdentifierInResponse.cs b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/PersonIdentifierInResponse.cs index 1e1c3d506..a45698a43 100644 --- a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/PersonIdentifierInResponse.cs +++ b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/PersonIdentifierInResponse.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,44 +17,28 @@ public partial class PersonIdentifierInResponse : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The id property -#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 meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaClientExample.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaClientExample.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// The type property public global::OpenApiKiotaClientExample.GeneratedCode.Models.PersonResourceType? Type { get { return BackingStore?.Get("type"); } set { BackingStore?.Set("type", value); } } + /// /// Instantiates a new and sets the default values. /// @@ -60,6 +46,7 @@ public PersonIdentifierInResponse() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -70,6 +57,7 @@ public PersonIdentifierInResponse() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaClientExample.GeneratedCode.Models.PersonIdentifierInResponse(); } + /// /// The deserialization information for the current model /// @@ -83,6 +71,7 @@ public virtual IDictionary> GetFieldDeserializers() { "type", n => { Type = n.GetEnumValue(); } }, }; } + /// /// Serializes information the current object /// @@ -97,3 +86,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/PersonIdentifierResponseDocument.cs b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/PersonIdentifierResponseDocument.cs index b0f79d18c..98a8b6a64 100644 --- a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/PersonIdentifierResponseDocument.cs +++ b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/PersonIdentifierResponseDocument.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,54 +17,28 @@ public partial class PersonIdentifierResponseDocument : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The data property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaClientExample.GeneratedCode.Models.PersonIdentifierInResponse? Data { get { return BackingStore?.Get("data"); } set { BackingStore?.Set("data", value); } } -#nullable restore -#else - public global::OpenApiKiotaClientExample.GeneratedCode.Models.PersonIdentifierInResponse Data - { - get { return BackingStore?.Get("data"); } - set { BackingStore?.Set("data", value); } - } -#endif + /// The links property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaClientExample.GeneratedCode.Models.ResourceIdentifierTopLevelLinks? Links { get { return BackingStore?.Get("links"); } set { BackingStore?.Set("links", value); } } -#nullable restore -#else - public global::OpenApiKiotaClientExample.GeneratedCode.Models.ResourceIdentifierTopLevelLinks Links - { - get { return BackingStore?.Get("links"); } - set { BackingStore?.Set("links", value); } - } -#endif + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaClientExample.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaClientExample.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -70,6 +46,7 @@ public PersonIdentifierResponseDocument() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -80,6 +57,7 @@ public PersonIdentifierResponseDocument() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaClientExample.GeneratedCode.Models.PersonIdentifierResponseDocument(); } + /// /// The deserialization information for the current model /// @@ -93,6 +71,7 @@ public virtual IDictionary> GetFieldDeserializers() { "meta", n => { Meta = n.GetObjectValue(global::OpenApiKiotaClientExample.GeneratedCode.Models.Meta.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -107,3 +86,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/PersonOwnedTodoItemsRelationshipIdentifier.cs b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/PersonOwnedTodoItemsRelationshipIdentifier.cs index 15a7b6fef..614f7f6b5 100644 --- a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/PersonOwnedTodoItemsRelationshipIdentifier.cs +++ b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/PersonOwnedTodoItemsRelationshipIdentifier.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,50 +17,35 @@ public partial class PersonOwnedTodoItemsRelationshipIdentifier : IBackedModel, { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The id property -#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 lid property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Lid { get { return BackingStore?.Get("lid"); } set { BackingStore?.Set("lid", value); } } -#nullable restore -#else - public string Lid - { - get { return BackingStore?.Get("lid"); } - set { BackingStore?.Set("lid", value); } - } -#endif + /// The relationship property public global::OpenApiKiotaClientExample.GeneratedCode.Models.PersonOwnedTodoItemsRelationshipName? Relationship { get { return BackingStore?.Get("relationship"); } set { BackingStore?.Set("relationship", value); } } + /// The type property public global::OpenApiKiotaClientExample.GeneratedCode.Models.PersonResourceType? Type { get { return BackingStore?.Get("type"); } set { BackingStore?.Set("type", value); } } + /// /// Instantiates a new and sets the default values. /// @@ -66,6 +53,7 @@ public PersonOwnedTodoItemsRelationshipIdentifier() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -76,6 +64,7 @@ public PersonOwnedTodoItemsRelationshipIdentifier() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaClientExample.GeneratedCode.Models.PersonOwnedTodoItemsRelationshipIdentifier(); } + /// /// The deserialization information for the current model /// @@ -90,6 +79,7 @@ public virtual IDictionary> GetFieldDeserializers() { "type", n => { Type = n.GetEnumValue(); } }, }; } + /// /// Serializes information the current object /// @@ -105,3 +95,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/PersonOwnedTodoItemsRelationshipName.cs b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/PersonOwnedTodoItemsRelationshipName.cs index 991140a33..7e11d6def 100644 --- a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/PersonOwnedTodoItemsRelationshipName.cs +++ b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/PersonOwnedTodoItemsRelationshipName.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 using System.Runtime.Serialization; using System; namespace OpenApiKiotaClientExample.GeneratedCode.Models @@ -14,3 +16,4 @@ public enum PersonOwnedTodoItemsRelationshipName #pragma warning restore CS1591 } } + diff --git a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/PersonPrimaryResponseDocument.cs b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/PersonPrimaryResponseDocument.cs index 828722d03..42be90c57 100644 --- a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/PersonPrimaryResponseDocument.cs +++ b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/PersonPrimaryResponseDocument.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,70 +17,35 @@ public partial class PersonPrimaryResponseDocument : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The data property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaClientExample.GeneratedCode.Models.PersonDataInResponse? Data { get { return BackingStore?.Get("data"); } set { BackingStore?.Set("data", value); } } -#nullable restore -#else - public global::OpenApiKiotaClientExample.GeneratedCode.Models.PersonDataInResponse Data - { - get { return BackingStore?.Get("data"); } - set { BackingStore?.Set("data", value); } - } -#endif + /// The included property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public List? Included { get { return BackingStore?.Get?>("included"); } set { BackingStore?.Set("included", value); } } -#nullable restore -#else - public List Included - { - get { return BackingStore?.Get>("included"); } - set { BackingStore?.Set("included", value); } - } -#endif + /// The links property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaClientExample.GeneratedCode.Models.ResourceTopLevelLinks? Links { get { return BackingStore?.Get("links"); } set { BackingStore?.Set("links", value); } } -#nullable restore -#else - public global::OpenApiKiotaClientExample.GeneratedCode.Models.ResourceTopLevelLinks Links - { - get { return BackingStore?.Get("links"); } - set { BackingStore?.Set("links", value); } - } -#endif + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaClientExample.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaClientExample.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -86,6 +53,7 @@ public PersonPrimaryResponseDocument() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -96,6 +64,7 @@ public PersonPrimaryResponseDocument() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaClientExample.GeneratedCode.Models.PersonPrimaryResponseDocument(); } + /// /// The deserialization information for the current model /// @@ -110,6 +79,7 @@ public virtual IDictionary> GetFieldDeserializers() { "meta", n => { Meta = n.GetObjectValue(global::OpenApiKiotaClientExample.GeneratedCode.Models.Meta.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -125,3 +95,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/PersonRelationshipsInResponse.cs b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/PersonRelationshipsInResponse.cs index cfd45413a..36908894f 100644 --- a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/PersonRelationshipsInResponse.cs +++ b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/PersonRelationshipsInResponse.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -14,39 +16,22 @@ public partial class PersonRelationshipsInResponse : IBackedModel, IParsable #pragma warning restore CS1591 { /// The assignedTodoItems property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaClientExample.GeneratedCode.Models.ToManyTodoItemInResponse? AssignedTodoItems { get { return BackingStore?.Get("assignedTodoItems"); } set { BackingStore?.Set("assignedTodoItems", value); } } -#nullable restore -#else - public global::OpenApiKiotaClientExample.GeneratedCode.Models.ToManyTodoItemInResponse AssignedTodoItems - { - get { return BackingStore?.Get("assignedTodoItems"); } - set { BackingStore?.Set("assignedTodoItems", value); } - } -#endif + /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The ownedTodoItems property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaClientExample.GeneratedCode.Models.ToManyTodoItemInResponse? OwnedTodoItems { get { return BackingStore?.Get("ownedTodoItems"); } set { BackingStore?.Set("ownedTodoItems", value); } } -#nullable restore -#else - public global::OpenApiKiotaClientExample.GeneratedCode.Models.ToManyTodoItemInResponse OwnedTodoItems - { - get { return BackingStore?.Get("ownedTodoItems"); } - set { BackingStore?.Set("ownedTodoItems", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -54,6 +39,7 @@ public PersonRelationshipsInResponse() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -64,6 +50,7 @@ public PersonRelationshipsInResponse() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaClientExample.GeneratedCode.Models.PersonRelationshipsInResponse(); } + /// /// The deserialization information for the current model /// @@ -76,6 +63,7 @@ public virtual IDictionary> GetFieldDeserializers() { "ownedTodoItems", n => { OwnedTodoItems = n.GetObjectValue(global::OpenApiKiotaClientExample.GeneratedCode.Models.ToManyTodoItemInResponse.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -89,3 +77,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/PersonResourceType.cs b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/PersonResourceType.cs index 5916b2bfa..fe8afacc1 100644 --- a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/PersonResourceType.cs +++ b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/PersonResourceType.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 using System.Runtime.Serialization; using System; namespace OpenApiKiotaClientExample.GeneratedCode.Models @@ -14,3 +16,4 @@ public enum PersonResourceType #pragma warning restore CS1591 } } + diff --git a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/PersonSecondaryResponseDocument.cs b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/PersonSecondaryResponseDocument.cs index d77a04144..189e88962 100644 --- a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/PersonSecondaryResponseDocument.cs +++ b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/PersonSecondaryResponseDocument.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,70 +17,35 @@ public partial class PersonSecondaryResponseDocument : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The data property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaClientExample.GeneratedCode.Models.PersonDataInResponse? Data { get { return BackingStore?.Get("data"); } set { BackingStore?.Set("data", value); } } -#nullable restore -#else - public global::OpenApiKiotaClientExample.GeneratedCode.Models.PersonDataInResponse Data - { - get { return BackingStore?.Get("data"); } - set { BackingStore?.Set("data", value); } - } -#endif + /// The included property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public List? Included { get { return BackingStore?.Get?>("included"); } set { BackingStore?.Set("included", value); } } -#nullable restore -#else - public List Included - { - get { return BackingStore?.Get>("included"); } - set { BackingStore?.Set("included", value); } - } -#endif + /// The links property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaClientExample.GeneratedCode.Models.ResourceTopLevelLinks? Links { get { return BackingStore?.Get("links"); } set { BackingStore?.Set("links", value); } } -#nullable restore -#else - public global::OpenApiKiotaClientExample.GeneratedCode.Models.ResourceTopLevelLinks Links - { - get { return BackingStore?.Get("links"); } - set { BackingStore?.Set("links", value); } - } -#endif + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaClientExample.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaClientExample.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -86,6 +53,7 @@ public PersonSecondaryResponseDocument() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -96,6 +64,7 @@ public PersonSecondaryResponseDocument() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaClientExample.GeneratedCode.Models.PersonSecondaryResponseDocument(); } + /// /// The deserialization information for the current model /// @@ -110,6 +79,7 @@ public virtual IDictionary> GetFieldDeserializers() { "meta", n => { Meta = n.GetObjectValue(global::OpenApiKiotaClientExample.GeneratedCode.Models.Meta.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -125,3 +95,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/RelationshipLinks.cs b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/RelationshipLinks.cs index 4c022a433..5e0d8f257 100644 --- a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/RelationshipLinks.cs +++ b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/RelationshipLinks.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,38 +17,21 @@ public partial class RelationshipLinks : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The related property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Related { get { return BackingStore?.Get("related"); } set { BackingStore?.Set("related", value); } } -#nullable restore -#else - public string Related - { - get { return BackingStore?.Get("related"); } - set { BackingStore?.Set("related", value); } - } -#endif + /// The self property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Self { get { return BackingStore?.Get("self"); } set { BackingStore?.Set("self", value); } } -#nullable restore -#else - public string Self - { - get { return BackingStore?.Get("self"); } - set { BackingStore?.Set("self", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -54,6 +39,7 @@ public RelationshipLinks() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -64,6 +50,7 @@ public RelationshipLinks() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaClientExample.GeneratedCode.Models.RelationshipLinks(); } + /// /// The deserialization information for the current model /// @@ -76,6 +63,7 @@ public virtual IDictionary> GetFieldDeserializers() { "self", n => { Self = n.GetStringValue(); } }, }; } + /// /// Serializes information the current object /// @@ -89,3 +77,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/RelationshipsInCreatePersonRequest.cs b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/RelationshipsInCreatePersonRequest.cs index 1d74dc614..d66ba988e 100644 --- a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/RelationshipsInCreatePersonRequest.cs +++ b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/RelationshipsInCreatePersonRequest.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -14,39 +16,22 @@ public partial class RelationshipsInCreatePersonRequest : IBackedModel, IParsabl #pragma warning restore CS1591 { /// The assignedTodoItems property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaClientExample.GeneratedCode.Models.ToManyTodoItemInRequest? AssignedTodoItems { get { return BackingStore?.Get("assignedTodoItems"); } set { BackingStore?.Set("assignedTodoItems", value); } } -#nullable restore -#else - public global::OpenApiKiotaClientExample.GeneratedCode.Models.ToManyTodoItemInRequest AssignedTodoItems - { - get { return BackingStore?.Get("assignedTodoItems"); } - set { BackingStore?.Set("assignedTodoItems", value); } - } -#endif + /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The ownedTodoItems property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaClientExample.GeneratedCode.Models.ToManyTodoItemInRequest? OwnedTodoItems { get { return BackingStore?.Get("ownedTodoItems"); } set { BackingStore?.Set("ownedTodoItems", value); } } -#nullable restore -#else - public global::OpenApiKiotaClientExample.GeneratedCode.Models.ToManyTodoItemInRequest OwnedTodoItems - { - get { return BackingStore?.Get("ownedTodoItems"); } - set { BackingStore?.Set("ownedTodoItems", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -54,6 +39,7 @@ public RelationshipsInCreatePersonRequest() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -64,6 +50,7 @@ public RelationshipsInCreatePersonRequest() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaClientExample.GeneratedCode.Models.RelationshipsInCreatePersonRequest(); } + /// /// The deserialization information for the current model /// @@ -76,6 +63,7 @@ public virtual IDictionary> GetFieldDeserializers() { "ownedTodoItems", n => { OwnedTodoItems = n.GetObjectValue(global::OpenApiKiotaClientExample.GeneratedCode.Models.ToManyTodoItemInRequest.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -89,3 +77,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/RelationshipsInCreateTagRequest.cs b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/RelationshipsInCreateTagRequest.cs index 258bf3395..593f79f65 100644 --- a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/RelationshipsInCreateTagRequest.cs +++ b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/RelationshipsInCreateTagRequest.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,22 +17,14 @@ public partial class RelationshipsInCreateTagRequest : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The todoItems property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaClientExample.GeneratedCode.Models.ToManyTodoItemInRequest? TodoItems { get { return BackingStore?.Get("todoItems"); } set { BackingStore?.Set("todoItems", value); } } -#nullable restore -#else - public global::OpenApiKiotaClientExample.GeneratedCode.Models.ToManyTodoItemInRequest TodoItems - { - get { return BackingStore?.Get("todoItems"); } - set { BackingStore?.Set("todoItems", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -38,6 +32,7 @@ public RelationshipsInCreateTagRequest() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -48,6 +43,7 @@ public RelationshipsInCreateTagRequest() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaClientExample.GeneratedCode.Models.RelationshipsInCreateTagRequest(); } + /// /// The deserialization information for the current model /// @@ -59,6 +55,7 @@ public virtual IDictionary> GetFieldDeserializers() { "todoItems", n => { TodoItems = n.GetObjectValue(global::OpenApiKiotaClientExample.GeneratedCode.Models.ToManyTodoItemInRequest.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -71,3 +68,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/RelationshipsInCreateTodoItemRequest.cs b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/RelationshipsInCreateTodoItemRequest.cs index 6b9592417..3f8d9153b 100644 --- a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/RelationshipsInCreateTodoItemRequest.cs +++ b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/RelationshipsInCreateTodoItemRequest.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -14,55 +16,29 @@ public partial class RelationshipsInCreateTodoItemRequest : IBackedModel, IParsa #pragma warning restore CS1591 { /// The assignee property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaClientExample.GeneratedCode.Models.NullableToOnePersonInRequest? Assignee { get { return BackingStore?.Get("assignee"); } set { BackingStore?.Set("assignee", value); } } -#nullable restore -#else - public global::OpenApiKiotaClientExample.GeneratedCode.Models.NullableToOnePersonInRequest Assignee - { - get { return BackingStore?.Get("assignee"); } - set { BackingStore?.Set("assignee", value); } - } -#endif + /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The owner property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaClientExample.GeneratedCode.Models.ToOnePersonInRequest? Owner { get { return BackingStore?.Get("owner"); } set { BackingStore?.Set("owner", value); } } -#nullable restore -#else - public global::OpenApiKiotaClientExample.GeneratedCode.Models.ToOnePersonInRequest Owner - { - get { return BackingStore?.Get("owner"); } - set { BackingStore?.Set("owner", value); } - } -#endif + /// The tags property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaClientExample.GeneratedCode.Models.ToManyTagInRequest? Tags { get { return BackingStore?.Get("tags"); } set { BackingStore?.Set("tags", value); } } -#nullable restore -#else - public global::OpenApiKiotaClientExample.GeneratedCode.Models.ToManyTagInRequest Tags - { - get { return BackingStore?.Get("tags"); } - set { BackingStore?.Set("tags", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -70,6 +46,7 @@ public RelationshipsInCreateTodoItemRequest() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -80,6 +57,7 @@ public RelationshipsInCreateTodoItemRequest() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaClientExample.GeneratedCode.Models.RelationshipsInCreateTodoItemRequest(); } + /// /// The deserialization information for the current model /// @@ -93,6 +71,7 @@ public virtual IDictionary> GetFieldDeserializers() { "tags", n => { Tags = n.GetObjectValue(global::OpenApiKiotaClientExample.GeneratedCode.Models.ToManyTagInRequest.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -107,3 +86,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/RelationshipsInUpdatePersonRequest.cs b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/RelationshipsInUpdatePersonRequest.cs index 98815104c..63329a6e8 100644 --- a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/RelationshipsInUpdatePersonRequest.cs +++ b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/RelationshipsInUpdatePersonRequest.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -14,39 +16,22 @@ public partial class RelationshipsInUpdatePersonRequest : IBackedModel, IParsabl #pragma warning restore CS1591 { /// The assignedTodoItems property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaClientExample.GeneratedCode.Models.ToManyTodoItemInRequest? AssignedTodoItems { get { return BackingStore?.Get("assignedTodoItems"); } set { BackingStore?.Set("assignedTodoItems", value); } } -#nullable restore -#else - public global::OpenApiKiotaClientExample.GeneratedCode.Models.ToManyTodoItemInRequest AssignedTodoItems - { - get { return BackingStore?.Get("assignedTodoItems"); } - set { BackingStore?.Set("assignedTodoItems", value); } - } -#endif + /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The ownedTodoItems property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaClientExample.GeneratedCode.Models.ToManyTodoItemInRequest? OwnedTodoItems { get { return BackingStore?.Get("ownedTodoItems"); } set { BackingStore?.Set("ownedTodoItems", value); } } -#nullable restore -#else - public global::OpenApiKiotaClientExample.GeneratedCode.Models.ToManyTodoItemInRequest OwnedTodoItems - { - get { return BackingStore?.Get("ownedTodoItems"); } - set { BackingStore?.Set("ownedTodoItems", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -54,6 +39,7 @@ public RelationshipsInUpdatePersonRequest() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -64,6 +50,7 @@ public RelationshipsInUpdatePersonRequest() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaClientExample.GeneratedCode.Models.RelationshipsInUpdatePersonRequest(); } + /// /// The deserialization information for the current model /// @@ -76,6 +63,7 @@ public virtual IDictionary> GetFieldDeserializers() { "ownedTodoItems", n => { OwnedTodoItems = n.GetObjectValue(global::OpenApiKiotaClientExample.GeneratedCode.Models.ToManyTodoItemInRequest.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -89,3 +77,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/RelationshipsInUpdateTagRequest.cs b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/RelationshipsInUpdateTagRequest.cs index 7f6daa2f6..2b3ed65cc 100644 --- a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/RelationshipsInUpdateTagRequest.cs +++ b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/RelationshipsInUpdateTagRequest.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,22 +17,14 @@ public partial class RelationshipsInUpdateTagRequest : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The todoItems property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaClientExample.GeneratedCode.Models.ToManyTodoItemInRequest? TodoItems { get { return BackingStore?.Get("todoItems"); } set { BackingStore?.Set("todoItems", value); } } -#nullable restore -#else - public global::OpenApiKiotaClientExample.GeneratedCode.Models.ToManyTodoItemInRequest TodoItems - { - get { return BackingStore?.Get("todoItems"); } - set { BackingStore?.Set("todoItems", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -38,6 +32,7 @@ public RelationshipsInUpdateTagRequest() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -48,6 +43,7 @@ public RelationshipsInUpdateTagRequest() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaClientExample.GeneratedCode.Models.RelationshipsInUpdateTagRequest(); } + /// /// The deserialization information for the current model /// @@ -59,6 +55,7 @@ public virtual IDictionary> GetFieldDeserializers() { "todoItems", n => { TodoItems = n.GetObjectValue(global::OpenApiKiotaClientExample.GeneratedCode.Models.ToManyTodoItemInRequest.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -71,3 +68,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/RelationshipsInUpdateTodoItemRequest.cs b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/RelationshipsInUpdateTodoItemRequest.cs index 1393d3282..172ffd16b 100644 --- a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/RelationshipsInUpdateTodoItemRequest.cs +++ b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/RelationshipsInUpdateTodoItemRequest.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -14,55 +16,29 @@ public partial class RelationshipsInUpdateTodoItemRequest : IBackedModel, IParsa #pragma warning restore CS1591 { /// The assignee property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaClientExample.GeneratedCode.Models.NullableToOnePersonInRequest? Assignee { get { return BackingStore?.Get("assignee"); } set { BackingStore?.Set("assignee", value); } } -#nullable restore -#else - public global::OpenApiKiotaClientExample.GeneratedCode.Models.NullableToOnePersonInRequest Assignee - { - get { return BackingStore?.Get("assignee"); } - set { BackingStore?.Set("assignee", value); } - } -#endif + /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The owner property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaClientExample.GeneratedCode.Models.ToOnePersonInRequest? Owner { get { return BackingStore?.Get("owner"); } set { BackingStore?.Set("owner", value); } } -#nullable restore -#else - public global::OpenApiKiotaClientExample.GeneratedCode.Models.ToOnePersonInRequest Owner - { - get { return BackingStore?.Get("owner"); } - set { BackingStore?.Set("owner", value); } - } -#endif + /// The tags property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaClientExample.GeneratedCode.Models.ToManyTagInRequest? Tags { get { return BackingStore?.Get("tags"); } set { BackingStore?.Set("tags", value); } } -#nullable restore -#else - public global::OpenApiKiotaClientExample.GeneratedCode.Models.ToManyTagInRequest Tags - { - get { return BackingStore?.Get("tags"); } - set { BackingStore?.Set("tags", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -70,6 +46,7 @@ public RelationshipsInUpdateTodoItemRequest() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -80,6 +57,7 @@ public RelationshipsInUpdateTodoItemRequest() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaClientExample.GeneratedCode.Models.RelationshipsInUpdateTodoItemRequest(); } + /// /// The deserialization information for the current model /// @@ -93,6 +71,7 @@ public virtual IDictionary> GetFieldDeserializers() { "tags", n => { Tags = n.GetObjectValue(global::OpenApiKiotaClientExample.GeneratedCode.Models.ToManyTagInRequest.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -107,3 +86,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/RemoveFromPersonAssignedTodoItemsRelationshipOperation.cs b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/RemoveFromPersonAssignedTodoItemsRelationshipOperation.cs index b9fd686b6..deae5da74 100644 --- a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/RemoveFromPersonAssignedTodoItemsRelationshipOperation.cs +++ b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/RemoveFromPersonAssignedTodoItemsRelationshipOperation.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -13,43 +15,26 @@ public partial class RemoveFromPersonAssignedTodoItemsRelationshipOperation : gl #pragma warning restore CS1591 { /// The data property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public List? Data { get { return BackingStore?.Get?>("data"); } set { BackingStore?.Set("data", value); } } -#nullable restore -#else - public List Data - { - get { return BackingStore?.Get>("data"); } - set { BackingStore?.Set("data", value); } - } -#endif + /// The op property public global::OpenApiKiotaClientExample.GeneratedCode.Models.RemoveOperationCode? Op { get { return BackingStore?.Get("op"); } set { BackingStore?.Set("op", value); } } + /// The ref property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaClientExample.GeneratedCode.Models.PersonAssignedTodoItemsRelationshipIdentifier? Ref { get { return BackingStore?.Get("ref"); } set { BackingStore?.Set("ref", value); } } -#nullable restore -#else - public global::OpenApiKiotaClientExample.GeneratedCode.Models.PersonAssignedTodoItemsRelationshipIdentifier Ref - { - get { return BackingStore?.Get("ref"); } - set { BackingStore?.Set("ref", value); } - } -#endif + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -60,6 +45,7 @@ public partial class RemoveFromPersonAssignedTodoItemsRelationshipOperation : gl _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaClientExample.GeneratedCode.Models.RemoveFromPersonAssignedTodoItemsRelationshipOperation(); } + /// /// The deserialization information for the current model /// @@ -73,6 +59,7 @@ public override IDictionary> GetFieldDeserializers() { "ref", n => { Ref = n.GetObjectValue(global::OpenApiKiotaClientExample.GeneratedCode.Models.PersonAssignedTodoItemsRelationshipIdentifier.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -88,3 +75,4 @@ public override void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/RemoveFromPersonOwnedTodoItemsRelationshipOperation.cs b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/RemoveFromPersonOwnedTodoItemsRelationshipOperation.cs index f1410e7ba..34476d665 100644 --- a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/RemoveFromPersonOwnedTodoItemsRelationshipOperation.cs +++ b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/RemoveFromPersonOwnedTodoItemsRelationshipOperation.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -13,43 +15,26 @@ public partial class RemoveFromPersonOwnedTodoItemsRelationshipOperation : globa #pragma warning restore CS1591 { /// The data property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public List? Data { get { return BackingStore?.Get?>("data"); } set { BackingStore?.Set("data", value); } } -#nullable restore -#else - public List Data - { - get { return BackingStore?.Get>("data"); } - set { BackingStore?.Set("data", value); } - } -#endif + /// The op property public global::OpenApiKiotaClientExample.GeneratedCode.Models.RemoveOperationCode? Op { get { return BackingStore?.Get("op"); } set { BackingStore?.Set("op", value); } } + /// The ref property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaClientExample.GeneratedCode.Models.PersonOwnedTodoItemsRelationshipIdentifier? Ref { get { return BackingStore?.Get("ref"); } set { BackingStore?.Set("ref", value); } } -#nullable restore -#else - public global::OpenApiKiotaClientExample.GeneratedCode.Models.PersonOwnedTodoItemsRelationshipIdentifier Ref - { - get { return BackingStore?.Get("ref"); } - set { BackingStore?.Set("ref", value); } - } -#endif + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -60,6 +45,7 @@ public partial class RemoveFromPersonOwnedTodoItemsRelationshipOperation : globa _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaClientExample.GeneratedCode.Models.RemoveFromPersonOwnedTodoItemsRelationshipOperation(); } + /// /// The deserialization information for the current model /// @@ -73,6 +59,7 @@ public override IDictionary> GetFieldDeserializers() { "ref", n => { Ref = n.GetObjectValue(global::OpenApiKiotaClientExample.GeneratedCode.Models.PersonOwnedTodoItemsRelationshipIdentifier.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -88,3 +75,4 @@ public override void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/RemoveFromTagTodoItemsRelationshipOperation.cs b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/RemoveFromTagTodoItemsRelationshipOperation.cs index ca236f7d3..2e4ddb015 100644 --- a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/RemoveFromTagTodoItemsRelationshipOperation.cs +++ b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/RemoveFromTagTodoItemsRelationshipOperation.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -13,43 +15,26 @@ public partial class RemoveFromTagTodoItemsRelationshipOperation : global::OpenA #pragma warning restore CS1591 { /// The data property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public List? Data { get { return BackingStore?.Get?>("data"); } set { BackingStore?.Set("data", value); } } -#nullable restore -#else - public List Data - { - get { return BackingStore?.Get>("data"); } - set { BackingStore?.Set("data", value); } - } -#endif + /// The op property public global::OpenApiKiotaClientExample.GeneratedCode.Models.RemoveOperationCode? Op { get { return BackingStore?.Get("op"); } set { BackingStore?.Set("op", value); } } + /// The ref property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaClientExample.GeneratedCode.Models.TagTodoItemsRelationshipIdentifier? Ref { get { return BackingStore?.Get("ref"); } set { BackingStore?.Set("ref", value); } } -#nullable restore -#else - public global::OpenApiKiotaClientExample.GeneratedCode.Models.TagTodoItemsRelationshipIdentifier Ref - { - get { return BackingStore?.Get("ref"); } - set { BackingStore?.Set("ref", value); } - } -#endif + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -60,6 +45,7 @@ public partial class RemoveFromTagTodoItemsRelationshipOperation : global::OpenA _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaClientExample.GeneratedCode.Models.RemoveFromTagTodoItemsRelationshipOperation(); } + /// /// The deserialization information for the current model /// @@ -73,6 +59,7 @@ public override IDictionary> GetFieldDeserializers() { "ref", n => { Ref = n.GetObjectValue(global::OpenApiKiotaClientExample.GeneratedCode.Models.TagTodoItemsRelationshipIdentifier.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -88,3 +75,4 @@ public override void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/RemoveFromTodoItemTagsRelationshipOperation.cs b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/RemoveFromTodoItemTagsRelationshipOperation.cs index 47f1525a8..6dbe543ae 100644 --- a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/RemoveFromTodoItemTagsRelationshipOperation.cs +++ b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/RemoveFromTodoItemTagsRelationshipOperation.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -13,43 +15,26 @@ public partial class RemoveFromTodoItemTagsRelationshipOperation : global::OpenA #pragma warning restore CS1591 { /// The data property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public List? Data { get { return BackingStore?.Get?>("data"); } set { BackingStore?.Set("data", value); } } -#nullable restore -#else - public List Data - { - get { return BackingStore?.Get>("data"); } - set { BackingStore?.Set("data", value); } - } -#endif + /// The op property public global::OpenApiKiotaClientExample.GeneratedCode.Models.RemoveOperationCode? Op { get { return BackingStore?.Get("op"); } set { BackingStore?.Set("op", value); } } + /// The ref property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaClientExample.GeneratedCode.Models.TodoItemTagsRelationshipIdentifier? Ref { get { return BackingStore?.Get("ref"); } set { BackingStore?.Set("ref", value); } } -#nullable restore -#else - public global::OpenApiKiotaClientExample.GeneratedCode.Models.TodoItemTagsRelationshipIdentifier Ref - { - get { return BackingStore?.Get("ref"); } - set { BackingStore?.Set("ref", value); } - } -#endif + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -60,6 +45,7 @@ public partial class RemoveFromTodoItemTagsRelationshipOperation : global::OpenA _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaClientExample.GeneratedCode.Models.RemoveFromTodoItemTagsRelationshipOperation(); } + /// /// The deserialization information for the current model /// @@ -73,6 +59,7 @@ public override IDictionary> GetFieldDeserializers() { "ref", n => { Ref = n.GetObjectValue(global::OpenApiKiotaClientExample.GeneratedCode.Models.TodoItemTagsRelationshipIdentifier.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -88,3 +75,4 @@ public override void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/RemoveOperationCode.cs b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/RemoveOperationCode.cs index a81897986..c7c06f014 100644 --- a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/RemoveOperationCode.cs +++ b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/RemoveOperationCode.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 using System.Runtime.Serialization; using System; namespace OpenApiKiotaClientExample.GeneratedCode.Models @@ -14,3 +16,4 @@ public enum RemoveOperationCode #pragma warning restore CS1591 } } + diff --git a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/ResourceCollectionTopLevelLinks.cs b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/ResourceCollectionTopLevelLinks.cs index 99a85a050..f40d610f8 100644 --- a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/ResourceCollectionTopLevelLinks.cs +++ b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/ResourceCollectionTopLevelLinks.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,102 +17,49 @@ public partial class ResourceCollectionTopLevelLinks : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The describedby property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Describedby { get { return BackingStore?.Get("describedby"); } set { BackingStore?.Set("describedby", value); } } -#nullable restore -#else - public string Describedby - { - get { return BackingStore?.Get("describedby"); } - set { BackingStore?.Set("describedby", value); } - } -#endif + /// The first property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? First { get { return BackingStore?.Get("first"); } set { BackingStore?.Set("first", value); } } -#nullable restore -#else - public string First - { - get { return BackingStore?.Get("first"); } - set { BackingStore?.Set("first", value); } - } -#endif + /// The last property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Last { get { return BackingStore?.Get("last"); } set { BackingStore?.Set("last", value); } } -#nullable restore -#else - public string Last - { - get { return BackingStore?.Get("last"); } - set { BackingStore?.Set("last", value); } - } -#endif + /// The next property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Next { get { return BackingStore?.Get("next"); } set { BackingStore?.Set("next", value); } } -#nullable restore -#else - public string Next - { - get { return BackingStore?.Get("next"); } - set { BackingStore?.Set("next", value); } - } -#endif + /// The prev property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Prev { get { return BackingStore?.Get("prev"); } set { BackingStore?.Set("prev", value); } } -#nullable restore -#else - public string Prev - { - get { return BackingStore?.Get("prev"); } - set { BackingStore?.Set("prev", value); } - } -#endif + /// The self property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Self { get { return BackingStore?.Get("self"); } set { BackingStore?.Set("self", value); } } -#nullable restore -#else - public string Self - { - get { return BackingStore?.Get("self"); } - set { BackingStore?.Set("self", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -118,6 +67,7 @@ public ResourceCollectionTopLevelLinks() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -128,6 +78,7 @@ public ResourceCollectionTopLevelLinks() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaClientExample.GeneratedCode.Models.ResourceCollectionTopLevelLinks(); } + /// /// The deserialization information for the current model /// @@ -144,6 +95,7 @@ public virtual IDictionary> GetFieldDeserializers() { "self", n => { Self = n.GetStringValue(); } }, }; } + /// /// Serializes information the current object /// @@ -161,3 +113,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/ResourceIdentifierCollectionTopLevelLinks.cs b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/ResourceIdentifierCollectionTopLevelLinks.cs index 2ef54e787..e7f44a09f 100644 --- a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/ResourceIdentifierCollectionTopLevelLinks.cs +++ b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/ResourceIdentifierCollectionTopLevelLinks.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,118 +17,56 @@ public partial class ResourceIdentifierCollectionTopLevelLinks : IBackedModel, I { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The describedby property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Describedby { get { return BackingStore?.Get("describedby"); } set { BackingStore?.Set("describedby", value); } } -#nullable restore -#else - public string Describedby - { - get { return BackingStore?.Get("describedby"); } - set { BackingStore?.Set("describedby", value); } - } -#endif + /// The first property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? First { get { return BackingStore?.Get("first"); } set { BackingStore?.Set("first", value); } } -#nullable restore -#else - public string First - { - get { return BackingStore?.Get("first"); } - set { BackingStore?.Set("first", value); } - } -#endif + /// The last property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Last { get { return BackingStore?.Get("last"); } set { BackingStore?.Set("last", value); } } -#nullable restore -#else - public string Last - { - get { return BackingStore?.Get("last"); } - set { BackingStore?.Set("last", value); } - } -#endif + /// The next property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Next { get { return BackingStore?.Get("next"); } set { BackingStore?.Set("next", value); } } -#nullable restore -#else - public string Next - { - get { return BackingStore?.Get("next"); } - set { BackingStore?.Set("next", value); } - } -#endif + /// The prev property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Prev { get { return BackingStore?.Get("prev"); } set { BackingStore?.Set("prev", value); } } -#nullable restore -#else - public string Prev - { - get { return BackingStore?.Get("prev"); } - set { BackingStore?.Set("prev", value); } - } -#endif + /// The related property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Related { get { return BackingStore?.Get("related"); } set { BackingStore?.Set("related", value); } } -#nullable restore -#else - public string Related - { - get { return BackingStore?.Get("related"); } - set { BackingStore?.Set("related", value); } - } -#endif + /// The self property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Self { get { return BackingStore?.Get("self"); } set { BackingStore?.Set("self", value); } } -#nullable restore -#else - public string Self - { - get { return BackingStore?.Get("self"); } - set { BackingStore?.Set("self", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -134,6 +74,7 @@ public ResourceIdentifierCollectionTopLevelLinks() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -144,6 +85,7 @@ public ResourceIdentifierCollectionTopLevelLinks() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaClientExample.GeneratedCode.Models.ResourceIdentifierCollectionTopLevelLinks(); } + /// /// The deserialization information for the current model /// @@ -161,6 +103,7 @@ public virtual IDictionary> GetFieldDeserializers() { "self", n => { Self = n.GetStringValue(); } }, }; } + /// /// Serializes information the current object /// @@ -179,3 +122,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/ResourceIdentifierTopLevelLinks.cs b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/ResourceIdentifierTopLevelLinks.cs index 016993c06..e3cd8e137 100644 --- a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/ResourceIdentifierTopLevelLinks.cs +++ b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/ResourceIdentifierTopLevelLinks.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,54 +17,28 @@ public partial class ResourceIdentifierTopLevelLinks : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The describedby property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Describedby { get { return BackingStore?.Get("describedby"); } set { BackingStore?.Set("describedby", value); } } -#nullable restore -#else - public string Describedby - { - get { return BackingStore?.Get("describedby"); } - set { BackingStore?.Set("describedby", value); } - } -#endif + /// The related property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Related { get { return BackingStore?.Get("related"); } set { BackingStore?.Set("related", value); } } -#nullable restore -#else - public string Related - { - get { return BackingStore?.Get("related"); } - set { BackingStore?.Set("related", value); } - } -#endif + /// The self property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Self { get { return BackingStore?.Get("self"); } set { BackingStore?.Set("self", value); } } -#nullable restore -#else - public string Self - { - get { return BackingStore?.Get("self"); } - set { BackingStore?.Set("self", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -70,6 +46,7 @@ public ResourceIdentifierTopLevelLinks() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -80,6 +57,7 @@ public ResourceIdentifierTopLevelLinks() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaClientExample.GeneratedCode.Models.ResourceIdentifierTopLevelLinks(); } + /// /// The deserialization information for the current model /// @@ -93,6 +71,7 @@ public virtual IDictionary> GetFieldDeserializers() { "self", n => { Self = n.GetStringValue(); } }, }; } + /// /// Serializes information the current object /// @@ -107,3 +86,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/ResourceLinks.cs b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/ResourceLinks.cs index eae7aced7..51943b9a9 100644 --- a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/ResourceLinks.cs +++ b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/ResourceLinks.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,22 +17,14 @@ public partial class ResourceLinks : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The self property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Self { get { return BackingStore?.Get("self"); } set { BackingStore?.Set("self", value); } } -#nullable restore -#else - public string Self - { - get { return BackingStore?.Get("self"); } - set { BackingStore?.Set("self", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -38,6 +32,7 @@ public ResourceLinks() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -48,6 +43,7 @@ public ResourceLinks() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaClientExample.GeneratedCode.Models.ResourceLinks(); } + /// /// The deserialization information for the current model /// @@ -59,6 +55,7 @@ public virtual IDictionary> GetFieldDeserializers() { "self", n => { Self = n.GetStringValue(); } }, }; } + /// /// Serializes information the current object /// @@ -71,3 +68,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/ResourceTopLevelLinks.cs b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/ResourceTopLevelLinks.cs index 34b1ccd81..3648e5c8e 100644 --- a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/ResourceTopLevelLinks.cs +++ b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/ResourceTopLevelLinks.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,38 +17,21 @@ public partial class ResourceTopLevelLinks : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The describedby property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Describedby { get { return BackingStore?.Get("describedby"); } set { BackingStore?.Set("describedby", value); } } -#nullable restore -#else - public string Describedby - { - get { return BackingStore?.Get("describedby"); } - set { BackingStore?.Set("describedby", value); } - } -#endif + /// The self property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Self { get { return BackingStore?.Get("self"); } set { BackingStore?.Set("self", value); } } -#nullable restore -#else - public string Self - { - get { return BackingStore?.Get("self"); } - set { BackingStore?.Set("self", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -54,6 +39,7 @@ public ResourceTopLevelLinks() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -64,6 +50,7 @@ public ResourceTopLevelLinks() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaClientExample.GeneratedCode.Models.ResourceTopLevelLinks(); } + /// /// The deserialization information for the current model /// @@ -76,6 +63,7 @@ public virtual IDictionary> GetFieldDeserializers() { "self", n => { Self = n.GetStringValue(); } }, }; } + /// /// Serializes information the current object /// @@ -89,3 +77,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/ResourceType.cs b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/ResourceType.cs index 730f49e72..8cbc90f04 100644 --- a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/ResourceType.cs +++ b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/ResourceType.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 using System.Runtime.Serialization; using System; namespace OpenApiKiotaClientExample.GeneratedCode.Models @@ -22,3 +24,4 @@ public enum ResourceType #pragma warning restore CS1591 } } + diff --git a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/TagAttributesInResponse.cs b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/TagAttributesInResponse.cs index ee3077d6a..4c419ce7f 100644 --- a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/TagAttributesInResponse.cs +++ b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/TagAttributesInResponse.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,22 +17,14 @@ public partial class TagAttributesInResponse : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The name property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Name { get { return BackingStore?.Get("name"); } set { BackingStore?.Set("name", value); } } -#nullable restore -#else - public string Name - { - get { return BackingStore?.Get("name"); } - set { BackingStore?.Set("name", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -38,6 +32,7 @@ public TagAttributesInResponse() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -48,6 +43,7 @@ public TagAttributesInResponse() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaClientExample.GeneratedCode.Models.TagAttributesInResponse(); } + /// /// The deserialization information for the current model /// @@ -59,6 +55,7 @@ public virtual IDictionary> GetFieldDeserializers() { "name", n => { Name = n.GetStringValue(); } }, }; } + /// /// Serializes information the current object /// @@ -71,3 +68,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/TagCollectionResponseDocument.cs b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/TagCollectionResponseDocument.cs index 93398cf8b..7e1e90235 100644 --- a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/TagCollectionResponseDocument.cs +++ b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/TagCollectionResponseDocument.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,70 +17,35 @@ public partial class TagCollectionResponseDocument : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The data property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public List? Data { get { return BackingStore?.Get?>("data"); } set { BackingStore?.Set("data", value); } } -#nullable restore -#else - public List Data - { - get { return BackingStore?.Get>("data"); } - set { BackingStore?.Set("data", value); } - } -#endif + /// The included property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public List? Included { get { return BackingStore?.Get?>("included"); } set { BackingStore?.Set("included", value); } } -#nullable restore -#else - public List Included - { - get { return BackingStore?.Get>("included"); } - set { BackingStore?.Set("included", value); } - } -#endif + /// The links property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaClientExample.GeneratedCode.Models.ResourceCollectionTopLevelLinks? Links { get { return BackingStore?.Get("links"); } set { BackingStore?.Set("links", value); } } -#nullable restore -#else - public global::OpenApiKiotaClientExample.GeneratedCode.Models.ResourceCollectionTopLevelLinks Links - { - get { return BackingStore?.Get("links"); } - set { BackingStore?.Set("links", value); } - } -#endif + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaClientExample.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaClientExample.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -86,6 +53,7 @@ public TagCollectionResponseDocument() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -96,6 +64,7 @@ public TagCollectionResponseDocument() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaClientExample.GeneratedCode.Models.TagCollectionResponseDocument(); } + /// /// The deserialization information for the current model /// @@ -110,6 +79,7 @@ public virtual IDictionary> GetFieldDeserializers() { "meta", n => { Meta = n.GetObjectValue(global::OpenApiKiotaClientExample.GeneratedCode.Models.Meta.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -125,3 +95,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/TagDataInResponse.cs b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/TagDataInResponse.cs index 5f97c7fe8..82cc8baa2 100644 --- a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/TagDataInResponse.cs +++ b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/TagDataInResponse.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -13,69 +15,33 @@ public partial class TagDataInResponse : global::OpenApiKiotaClientExample.Gener #pragma warning restore CS1591 { /// The attributes property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaClientExample.GeneratedCode.Models.TagAttributesInResponse? Attributes { get { return BackingStore?.Get("attributes"); } set { BackingStore?.Set("attributes", value); } } -#nullable restore -#else - public global::OpenApiKiotaClientExample.GeneratedCode.Models.TagAttributesInResponse Attributes - { - get { return BackingStore?.Get("attributes"); } - set { BackingStore?.Set("attributes", value); } - } -#endif + /// The id property -#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 links property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaClientExample.GeneratedCode.Models.ResourceLinks? Links { get { return BackingStore?.Get("links"); } set { BackingStore?.Set("links", value); } } -#nullable restore -#else - public global::OpenApiKiotaClientExample.GeneratedCode.Models.ResourceLinks Links - { - get { return BackingStore?.Get("links"); } - set { BackingStore?.Set("links", value); } - } -#endif + /// The relationships property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaClientExample.GeneratedCode.Models.TagRelationshipsInResponse? Relationships { get { return BackingStore?.Get("relationships"); } set { BackingStore?.Set("relationships", value); } } -#nullable restore -#else - public global::OpenApiKiotaClientExample.GeneratedCode.Models.TagRelationshipsInResponse Relationships - { - get { return BackingStore?.Get("relationships"); } - set { BackingStore?.Set("relationships", value); } - } -#endif + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -86,6 +52,7 @@ public string Id _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaClientExample.GeneratedCode.Models.TagDataInResponse(); } + /// /// The deserialization information for the current model /// @@ -100,6 +67,7 @@ public override IDictionary> GetFieldDeserializers() { "relationships", n => { Relationships = n.GetObjectValue(global::OpenApiKiotaClientExample.GeneratedCode.Models.TagRelationshipsInResponse.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -116,3 +84,4 @@ public override void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/TagIdentifierCollectionResponseDocument.cs b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/TagIdentifierCollectionResponseDocument.cs index 84a4b9b68..b9ef0c3de 100644 --- a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/TagIdentifierCollectionResponseDocument.cs +++ b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/TagIdentifierCollectionResponseDocument.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,54 +17,28 @@ public partial class TagIdentifierCollectionResponseDocument : IBackedModel, IPa { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The data property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public List? Data { get { return BackingStore?.Get?>("data"); } set { BackingStore?.Set("data", value); } } -#nullable restore -#else - public List Data - { - get { return BackingStore?.Get>("data"); } - set { BackingStore?.Set("data", value); } - } -#endif + /// The links property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaClientExample.GeneratedCode.Models.ResourceIdentifierCollectionTopLevelLinks? Links { get { return BackingStore?.Get("links"); } set { BackingStore?.Set("links", value); } } -#nullable restore -#else - public global::OpenApiKiotaClientExample.GeneratedCode.Models.ResourceIdentifierCollectionTopLevelLinks Links - { - get { return BackingStore?.Get("links"); } - set { BackingStore?.Set("links", value); } - } -#endif + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaClientExample.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaClientExample.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -70,6 +46,7 @@ public TagIdentifierCollectionResponseDocument() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -80,6 +57,7 @@ public TagIdentifierCollectionResponseDocument() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaClientExample.GeneratedCode.Models.TagIdentifierCollectionResponseDocument(); } + /// /// The deserialization information for the current model /// @@ -93,6 +71,7 @@ public virtual IDictionary> GetFieldDeserializers() { "meta", n => { Meta = n.GetObjectValue(global::OpenApiKiotaClientExample.GeneratedCode.Models.Meta.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -107,3 +86,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/TagIdentifierInRequest.cs b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/TagIdentifierInRequest.cs index 03a8541c0..8bcd51dd2 100644 --- a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/TagIdentifierInRequest.cs +++ b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/TagIdentifierInRequest.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,60 +17,35 @@ public partial class TagIdentifierInRequest : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The id property -#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 lid property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Lid { get { return BackingStore?.Get("lid"); } set { BackingStore?.Set("lid", value); } } -#nullable restore -#else - public string Lid - { - get { return BackingStore?.Get("lid"); } - set { BackingStore?.Set("lid", value); } - } -#endif + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaClientExample.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaClientExample.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// The type property public global::OpenApiKiotaClientExample.GeneratedCode.Models.TagResourceType? Type { get { return BackingStore?.Get("type"); } set { BackingStore?.Set("type", value); } } + /// /// Instantiates a new and sets the default values. /// @@ -76,6 +53,7 @@ public TagIdentifierInRequest() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -86,6 +64,7 @@ public TagIdentifierInRequest() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaClientExample.GeneratedCode.Models.TagIdentifierInRequest(); } + /// /// The deserialization information for the current model /// @@ -100,6 +79,7 @@ public virtual IDictionary> GetFieldDeserializers() { "type", n => { Type = n.GetEnumValue(); } }, }; } + /// /// Serializes information the current object /// @@ -115,3 +95,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/TagIdentifierInResponse.cs b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/TagIdentifierInResponse.cs index ee9a56c29..0791f2784 100644 --- a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/TagIdentifierInResponse.cs +++ b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/TagIdentifierInResponse.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,44 +17,28 @@ public partial class TagIdentifierInResponse : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The id property -#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 meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaClientExample.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaClientExample.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// The type property public global::OpenApiKiotaClientExample.GeneratedCode.Models.TagResourceType? Type { get { return BackingStore?.Get("type"); } set { BackingStore?.Set("type", value); } } + /// /// Instantiates a new and sets the default values. /// @@ -60,6 +46,7 @@ public TagIdentifierInResponse() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -70,6 +57,7 @@ public TagIdentifierInResponse() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaClientExample.GeneratedCode.Models.TagIdentifierInResponse(); } + /// /// The deserialization information for the current model /// @@ -83,6 +71,7 @@ public virtual IDictionary> GetFieldDeserializers() { "type", n => { Type = n.GetEnumValue(); } }, }; } + /// /// Serializes information the current object /// @@ -97,3 +86,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/TagPrimaryResponseDocument.cs b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/TagPrimaryResponseDocument.cs index 8ae36e013..833514f36 100644 --- a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/TagPrimaryResponseDocument.cs +++ b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/TagPrimaryResponseDocument.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,70 +17,35 @@ public partial class TagPrimaryResponseDocument : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The data property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaClientExample.GeneratedCode.Models.TagDataInResponse? Data { get { return BackingStore?.Get("data"); } set { BackingStore?.Set("data", value); } } -#nullable restore -#else - public global::OpenApiKiotaClientExample.GeneratedCode.Models.TagDataInResponse Data - { - get { return BackingStore?.Get("data"); } - set { BackingStore?.Set("data", value); } - } -#endif + /// The included property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public List? Included { get { return BackingStore?.Get?>("included"); } set { BackingStore?.Set("included", value); } } -#nullable restore -#else - public List Included - { - get { return BackingStore?.Get>("included"); } - set { BackingStore?.Set("included", value); } - } -#endif + /// The links property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaClientExample.GeneratedCode.Models.ResourceTopLevelLinks? Links { get { return BackingStore?.Get("links"); } set { BackingStore?.Set("links", value); } } -#nullable restore -#else - public global::OpenApiKiotaClientExample.GeneratedCode.Models.ResourceTopLevelLinks Links - { - get { return BackingStore?.Get("links"); } - set { BackingStore?.Set("links", value); } - } -#endif + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaClientExample.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaClientExample.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -86,6 +53,7 @@ public TagPrimaryResponseDocument() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -96,6 +64,7 @@ public TagPrimaryResponseDocument() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaClientExample.GeneratedCode.Models.TagPrimaryResponseDocument(); } + /// /// The deserialization information for the current model /// @@ -110,6 +79,7 @@ public virtual IDictionary> GetFieldDeserializers() { "meta", n => { Meta = n.GetObjectValue(global::OpenApiKiotaClientExample.GeneratedCode.Models.Meta.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -125,3 +95,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/TagRelationshipsInResponse.cs b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/TagRelationshipsInResponse.cs index 0d604cda5..7f40eb958 100644 --- a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/TagRelationshipsInResponse.cs +++ b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/TagRelationshipsInResponse.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,22 +17,14 @@ public partial class TagRelationshipsInResponse : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The todoItems property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaClientExample.GeneratedCode.Models.ToManyTodoItemInResponse? TodoItems { get { return BackingStore?.Get("todoItems"); } set { BackingStore?.Set("todoItems", value); } } -#nullable restore -#else - public global::OpenApiKiotaClientExample.GeneratedCode.Models.ToManyTodoItemInResponse TodoItems - { - get { return BackingStore?.Get("todoItems"); } - set { BackingStore?.Set("todoItems", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -38,6 +32,7 @@ public TagRelationshipsInResponse() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -48,6 +43,7 @@ public TagRelationshipsInResponse() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaClientExample.GeneratedCode.Models.TagRelationshipsInResponse(); } + /// /// The deserialization information for the current model /// @@ -59,6 +55,7 @@ public virtual IDictionary> GetFieldDeserializers() { "todoItems", n => { TodoItems = n.GetObjectValue(global::OpenApiKiotaClientExample.GeneratedCode.Models.ToManyTodoItemInResponse.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -71,3 +68,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/TagResourceType.cs b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/TagResourceType.cs index 8005ae37a..9f4e7d4ff 100644 --- a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/TagResourceType.cs +++ b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/TagResourceType.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 using System.Runtime.Serialization; using System; namespace OpenApiKiotaClientExample.GeneratedCode.Models @@ -14,3 +16,4 @@ public enum TagResourceType #pragma warning restore CS1591 } } + diff --git a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/TagTodoItemsRelationshipIdentifier.cs b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/TagTodoItemsRelationshipIdentifier.cs index 47b045bea..be3c1ae47 100644 --- a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/TagTodoItemsRelationshipIdentifier.cs +++ b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/TagTodoItemsRelationshipIdentifier.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,50 +17,35 @@ public partial class TagTodoItemsRelationshipIdentifier : IBackedModel, IParsabl { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The id property -#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 lid property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Lid { get { return BackingStore?.Get("lid"); } set { BackingStore?.Set("lid", value); } } -#nullable restore -#else - public string Lid - { - get { return BackingStore?.Get("lid"); } - set { BackingStore?.Set("lid", value); } - } -#endif + /// The relationship property public global::OpenApiKiotaClientExample.GeneratedCode.Models.TagTodoItemsRelationshipName? Relationship { get { return BackingStore?.Get("relationship"); } set { BackingStore?.Set("relationship", value); } } + /// The type property public global::OpenApiKiotaClientExample.GeneratedCode.Models.TagResourceType? Type { get { return BackingStore?.Get("type"); } set { BackingStore?.Set("type", value); } } + /// /// Instantiates a new and sets the default values. /// @@ -66,6 +53,7 @@ public TagTodoItemsRelationshipIdentifier() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -76,6 +64,7 @@ public TagTodoItemsRelationshipIdentifier() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaClientExample.GeneratedCode.Models.TagTodoItemsRelationshipIdentifier(); } + /// /// The deserialization information for the current model /// @@ -90,6 +79,7 @@ public virtual IDictionary> GetFieldDeserializers() { "type", n => { Type = n.GetEnumValue(); } }, }; } + /// /// Serializes information the current object /// @@ -105,3 +95,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/TagTodoItemsRelationshipName.cs b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/TagTodoItemsRelationshipName.cs index fe6b21776..b7761607e 100644 --- a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/TagTodoItemsRelationshipName.cs +++ b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/TagTodoItemsRelationshipName.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 using System.Runtime.Serialization; using System; namespace OpenApiKiotaClientExample.GeneratedCode.Models @@ -14,3 +16,4 @@ public enum TagTodoItemsRelationshipName #pragma warning restore CS1591 } } + diff --git a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/ToManyTagInRequest.cs b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/ToManyTagInRequest.cs index 8bc11cf5d..cf4f72514 100644 --- a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/ToManyTagInRequest.cs +++ b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/ToManyTagInRequest.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,38 +17,21 @@ public partial class ToManyTagInRequest : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The data property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public List? Data { get { return BackingStore?.Get?>("data"); } set { BackingStore?.Set("data", value); } } -#nullable restore -#else - public List Data - { - get { return BackingStore?.Get>("data"); } - set { BackingStore?.Set("data", value); } - } -#endif + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaClientExample.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaClientExample.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -54,6 +39,7 @@ public ToManyTagInRequest() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -64,6 +50,7 @@ public ToManyTagInRequest() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaClientExample.GeneratedCode.Models.ToManyTagInRequest(); } + /// /// The deserialization information for the current model /// @@ -76,6 +63,7 @@ public virtual IDictionary> GetFieldDeserializers() { "meta", n => { Meta = n.GetObjectValue(global::OpenApiKiotaClientExample.GeneratedCode.Models.Meta.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -89,3 +77,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/ToManyTagInResponse.cs b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/ToManyTagInResponse.cs index ce28d7df5..21be84c50 100644 --- a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/ToManyTagInResponse.cs +++ b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/ToManyTagInResponse.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,54 +17,28 @@ public partial class ToManyTagInResponse : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The data property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public List? Data { get { return BackingStore?.Get?>("data"); } set { BackingStore?.Set("data", value); } } -#nullable restore -#else - public List Data - { - get { return BackingStore?.Get>("data"); } - set { BackingStore?.Set("data", value); } - } -#endif + /// The links property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaClientExample.GeneratedCode.Models.RelationshipLinks? Links { get { return BackingStore?.Get("links"); } set { BackingStore?.Set("links", value); } } -#nullable restore -#else - public global::OpenApiKiotaClientExample.GeneratedCode.Models.RelationshipLinks Links - { - get { return BackingStore?.Get("links"); } - set { BackingStore?.Set("links", value); } - } -#endif + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaClientExample.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaClientExample.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -70,6 +46,7 @@ public ToManyTagInResponse() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -80,6 +57,7 @@ public ToManyTagInResponse() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaClientExample.GeneratedCode.Models.ToManyTagInResponse(); } + /// /// The deserialization information for the current model /// @@ -93,6 +71,7 @@ public virtual IDictionary> GetFieldDeserializers() { "meta", n => { Meta = n.GetObjectValue(global::OpenApiKiotaClientExample.GeneratedCode.Models.Meta.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -107,3 +86,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/ToManyTodoItemInRequest.cs b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/ToManyTodoItemInRequest.cs index 924e33598..a1958419c 100644 --- a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/ToManyTodoItemInRequest.cs +++ b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/ToManyTodoItemInRequest.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,38 +17,21 @@ public partial class ToManyTodoItemInRequest : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The data property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public List? Data { get { return BackingStore?.Get?>("data"); } set { BackingStore?.Set("data", value); } } -#nullable restore -#else - public List Data - { - get { return BackingStore?.Get>("data"); } - set { BackingStore?.Set("data", value); } - } -#endif + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaClientExample.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaClientExample.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -54,6 +39,7 @@ public ToManyTodoItemInRequest() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -64,6 +50,7 @@ public ToManyTodoItemInRequest() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaClientExample.GeneratedCode.Models.ToManyTodoItemInRequest(); } + /// /// The deserialization information for the current model /// @@ -76,6 +63,7 @@ public virtual IDictionary> GetFieldDeserializers() { "meta", n => { Meta = n.GetObjectValue(global::OpenApiKiotaClientExample.GeneratedCode.Models.Meta.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -89,3 +77,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/ToManyTodoItemInResponse.cs b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/ToManyTodoItemInResponse.cs index 49292a083..c9bfa7453 100644 --- a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/ToManyTodoItemInResponse.cs +++ b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/ToManyTodoItemInResponse.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,54 +17,28 @@ public partial class ToManyTodoItemInResponse : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The data property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public List? Data { get { return BackingStore?.Get?>("data"); } set { BackingStore?.Set("data", value); } } -#nullable restore -#else - public List Data - { - get { return BackingStore?.Get>("data"); } - set { BackingStore?.Set("data", value); } - } -#endif + /// The links property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaClientExample.GeneratedCode.Models.RelationshipLinks? Links { get { return BackingStore?.Get("links"); } set { BackingStore?.Set("links", value); } } -#nullable restore -#else - public global::OpenApiKiotaClientExample.GeneratedCode.Models.RelationshipLinks Links - { - get { return BackingStore?.Get("links"); } - set { BackingStore?.Set("links", value); } - } -#endif + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaClientExample.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaClientExample.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -70,6 +46,7 @@ public ToManyTodoItemInResponse() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -80,6 +57,7 @@ public ToManyTodoItemInResponse() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaClientExample.GeneratedCode.Models.ToManyTodoItemInResponse(); } + /// /// The deserialization information for the current model /// @@ -93,6 +71,7 @@ public virtual IDictionary> GetFieldDeserializers() { "meta", n => { Meta = n.GetObjectValue(global::OpenApiKiotaClientExample.GeneratedCode.Models.Meta.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -107,3 +86,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/ToOnePersonInRequest.cs b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/ToOnePersonInRequest.cs index fde00a2e4..05a123aee 100644 --- a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/ToOnePersonInRequest.cs +++ b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/ToOnePersonInRequest.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,38 +17,21 @@ public partial class ToOnePersonInRequest : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The data property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaClientExample.GeneratedCode.Models.PersonIdentifierInRequest? Data { get { return BackingStore?.Get("data"); } set { BackingStore?.Set("data", value); } } -#nullable restore -#else - public global::OpenApiKiotaClientExample.GeneratedCode.Models.PersonIdentifierInRequest Data - { - get { return BackingStore?.Get("data"); } - set { BackingStore?.Set("data", value); } - } -#endif + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaClientExample.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaClientExample.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -54,6 +39,7 @@ public ToOnePersonInRequest() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -64,6 +50,7 @@ public ToOnePersonInRequest() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaClientExample.GeneratedCode.Models.ToOnePersonInRequest(); } + /// /// The deserialization information for the current model /// @@ -76,6 +63,7 @@ public virtual IDictionary> GetFieldDeserializers() { "meta", n => { Meta = n.GetObjectValue(global::OpenApiKiotaClientExample.GeneratedCode.Models.Meta.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -89,3 +77,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/ToOnePersonInResponse.cs b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/ToOnePersonInResponse.cs index 421a3cc3a..348d65051 100644 --- a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/ToOnePersonInResponse.cs +++ b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/ToOnePersonInResponse.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,54 +17,28 @@ public partial class ToOnePersonInResponse : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The data property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaClientExample.GeneratedCode.Models.PersonIdentifierInResponse? Data { get { return BackingStore?.Get("data"); } set { BackingStore?.Set("data", value); } } -#nullable restore -#else - public global::OpenApiKiotaClientExample.GeneratedCode.Models.PersonIdentifierInResponse Data - { - get { return BackingStore?.Get("data"); } - set { BackingStore?.Set("data", value); } - } -#endif + /// The links property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaClientExample.GeneratedCode.Models.RelationshipLinks? Links { get { return BackingStore?.Get("links"); } set { BackingStore?.Set("links", value); } } -#nullable restore -#else - public global::OpenApiKiotaClientExample.GeneratedCode.Models.RelationshipLinks Links - { - get { return BackingStore?.Get("links"); } - set { BackingStore?.Set("links", value); } - } -#endif + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaClientExample.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaClientExample.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -70,6 +46,7 @@ public ToOnePersonInResponse() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -80,6 +57,7 @@ public ToOnePersonInResponse() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaClientExample.GeneratedCode.Models.ToOnePersonInResponse(); } + /// /// The deserialization information for the current model /// @@ -93,6 +71,7 @@ public virtual IDictionary> GetFieldDeserializers() { "meta", n => { Meta = n.GetObjectValue(global::OpenApiKiotaClientExample.GeneratedCode.Models.Meta.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -107,3 +86,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/TodoItemAssigneeRelationshipIdentifier.cs b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/TodoItemAssigneeRelationshipIdentifier.cs index eaf1bb74f..8c394400b 100644 --- a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/TodoItemAssigneeRelationshipIdentifier.cs +++ b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/TodoItemAssigneeRelationshipIdentifier.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,50 +17,35 @@ public partial class TodoItemAssigneeRelationshipIdentifier : IBackedModel, IPar { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The id property -#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 lid property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Lid { get { return BackingStore?.Get("lid"); } set { BackingStore?.Set("lid", value); } } -#nullable restore -#else - public string Lid - { - get { return BackingStore?.Get("lid"); } - set { BackingStore?.Set("lid", value); } - } -#endif + /// The relationship property public global::OpenApiKiotaClientExample.GeneratedCode.Models.TodoItemAssigneeRelationshipName? Relationship { get { return BackingStore?.Get("relationship"); } set { BackingStore?.Set("relationship", value); } } + /// The type property public global::OpenApiKiotaClientExample.GeneratedCode.Models.TodoItemResourceType? Type { get { return BackingStore?.Get("type"); } set { BackingStore?.Set("type", value); } } + /// /// Instantiates a new and sets the default values. /// @@ -66,6 +53,7 @@ public TodoItemAssigneeRelationshipIdentifier() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -76,6 +64,7 @@ public TodoItemAssigneeRelationshipIdentifier() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaClientExample.GeneratedCode.Models.TodoItemAssigneeRelationshipIdentifier(); } + /// /// The deserialization information for the current model /// @@ -90,6 +79,7 @@ public virtual IDictionary> GetFieldDeserializers() { "type", n => { Type = n.GetEnumValue(); } }, }; } + /// /// Serializes information the current object /// @@ -105,3 +95,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/TodoItemAssigneeRelationshipName.cs b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/TodoItemAssigneeRelationshipName.cs index 9da952c65..fbc43f8d3 100644 --- a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/TodoItemAssigneeRelationshipName.cs +++ b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/TodoItemAssigneeRelationshipName.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 using System.Runtime.Serialization; using System; namespace OpenApiKiotaClientExample.GeneratedCode.Models @@ -14,3 +16,4 @@ public enum TodoItemAssigneeRelationshipName #pragma warning restore CS1591 } } + diff --git a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/TodoItemAttributesInResponse.cs b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/TodoItemAttributesInResponse.cs index e7a594deb..d80f9b1cc 100644 --- a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/TodoItemAttributesInResponse.cs +++ b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/TodoItemAttributesInResponse.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,46 +17,42 @@ public partial class TodoItemAttributesInResponse : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The createdAt property public DateTimeOffset? CreatedAt { get { return BackingStore?.Get("createdAt"); } set { BackingStore?.Set("createdAt", value); } } + /// The description property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Description { get { return BackingStore?.Get("description"); } set { BackingStore?.Set("description", value); } } -#nullable restore -#else - public string Description - { - get { return BackingStore?.Get("description"); } - set { BackingStore?.Set("description", value); } - } -#endif + /// The durationInHours property public long? DurationInHours { get { return BackingStore?.Get("durationInHours"); } set { BackingStore?.Set("durationInHours", value); } } + /// The modifiedAt property public DateTimeOffset? ModifiedAt { get { return BackingStore?.Get("modifiedAt"); } set { BackingStore?.Set("modifiedAt", value); } } + /// The priority property public global::OpenApiKiotaClientExample.GeneratedCode.Models.TodoItemPriority? Priority { get { return BackingStore?.Get("priority"); } set { BackingStore?.Set("priority", value); } } + /// /// Instantiates a new and sets the default values. /// @@ -62,6 +60,7 @@ public TodoItemAttributesInResponse() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -72,6 +71,7 @@ public TodoItemAttributesInResponse() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaClientExample.GeneratedCode.Models.TodoItemAttributesInResponse(); } + /// /// The deserialization information for the current model /// @@ -87,6 +87,7 @@ public virtual IDictionary> GetFieldDeserializers() { "priority", n => { Priority = n.GetEnumValue(); } }, }; } + /// /// Serializes information the current object /// @@ -103,3 +104,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/TodoItemCollectionResponseDocument.cs b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/TodoItemCollectionResponseDocument.cs index cd9fa7ec8..0045e250a 100644 --- a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/TodoItemCollectionResponseDocument.cs +++ b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/TodoItemCollectionResponseDocument.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,70 +17,35 @@ public partial class TodoItemCollectionResponseDocument : IBackedModel, IParsabl { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The data property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public List? Data { get { return BackingStore?.Get?>("data"); } set { BackingStore?.Set("data", value); } } -#nullable restore -#else - public List Data - { - get { return BackingStore?.Get>("data"); } - set { BackingStore?.Set("data", value); } - } -#endif + /// The included property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public List? Included { get { return BackingStore?.Get?>("included"); } set { BackingStore?.Set("included", value); } } -#nullable restore -#else - public List Included - { - get { return BackingStore?.Get>("included"); } - set { BackingStore?.Set("included", value); } - } -#endif + /// The links property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaClientExample.GeneratedCode.Models.ResourceCollectionTopLevelLinks? Links { get { return BackingStore?.Get("links"); } set { BackingStore?.Set("links", value); } } -#nullable restore -#else - public global::OpenApiKiotaClientExample.GeneratedCode.Models.ResourceCollectionTopLevelLinks Links - { - get { return BackingStore?.Get("links"); } - set { BackingStore?.Set("links", value); } - } -#endif + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaClientExample.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaClientExample.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -86,6 +53,7 @@ public TodoItemCollectionResponseDocument() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -96,6 +64,7 @@ public TodoItemCollectionResponseDocument() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaClientExample.GeneratedCode.Models.TodoItemCollectionResponseDocument(); } + /// /// The deserialization information for the current model /// @@ -110,6 +79,7 @@ public virtual IDictionary> GetFieldDeserializers() { "meta", n => { Meta = n.GetObjectValue(global::OpenApiKiotaClientExample.GeneratedCode.Models.Meta.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -125,3 +95,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/TodoItemDataInResponse.cs b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/TodoItemDataInResponse.cs index fc20828b1..9d56c8fc5 100644 --- a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/TodoItemDataInResponse.cs +++ b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/TodoItemDataInResponse.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -13,69 +15,33 @@ public partial class TodoItemDataInResponse : global::OpenApiKiotaClientExample. #pragma warning restore CS1591 { /// The attributes property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaClientExample.GeneratedCode.Models.TodoItemAttributesInResponse? Attributes { get { return BackingStore?.Get("attributes"); } set { BackingStore?.Set("attributes", value); } } -#nullable restore -#else - public global::OpenApiKiotaClientExample.GeneratedCode.Models.TodoItemAttributesInResponse Attributes - { - get { return BackingStore?.Get("attributes"); } - set { BackingStore?.Set("attributes", value); } - } -#endif + /// The id property -#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 links property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaClientExample.GeneratedCode.Models.ResourceLinks? Links { get { return BackingStore?.Get("links"); } set { BackingStore?.Set("links", value); } } -#nullable restore -#else - public global::OpenApiKiotaClientExample.GeneratedCode.Models.ResourceLinks Links - { - get { return BackingStore?.Get("links"); } - set { BackingStore?.Set("links", value); } - } -#endif + /// The relationships property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaClientExample.GeneratedCode.Models.TodoItemRelationshipsInResponse? Relationships { get { return BackingStore?.Get("relationships"); } set { BackingStore?.Set("relationships", value); } } -#nullable restore -#else - public global::OpenApiKiotaClientExample.GeneratedCode.Models.TodoItemRelationshipsInResponse Relationships - { - get { return BackingStore?.Get("relationships"); } - set { BackingStore?.Set("relationships", value); } - } -#endif + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -86,6 +52,7 @@ public string Id _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaClientExample.GeneratedCode.Models.TodoItemDataInResponse(); } + /// /// The deserialization information for the current model /// @@ -100,6 +67,7 @@ public override IDictionary> GetFieldDeserializers() { "relationships", n => { Relationships = n.GetObjectValue(global::OpenApiKiotaClientExample.GeneratedCode.Models.TodoItemRelationshipsInResponse.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -116,3 +84,4 @@ public override void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/TodoItemIdentifierCollectionResponseDocument.cs b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/TodoItemIdentifierCollectionResponseDocument.cs index dc4c38184..dcac11365 100644 --- a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/TodoItemIdentifierCollectionResponseDocument.cs +++ b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/TodoItemIdentifierCollectionResponseDocument.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,54 +17,28 @@ public partial class TodoItemIdentifierCollectionResponseDocument : IBackedModel { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The data property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public List? Data { get { return BackingStore?.Get?>("data"); } set { BackingStore?.Set("data", value); } } -#nullable restore -#else - public List Data - { - get { return BackingStore?.Get>("data"); } - set { BackingStore?.Set("data", value); } - } -#endif + /// The links property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaClientExample.GeneratedCode.Models.ResourceIdentifierCollectionTopLevelLinks? Links { get { return BackingStore?.Get("links"); } set { BackingStore?.Set("links", value); } } -#nullable restore -#else - public global::OpenApiKiotaClientExample.GeneratedCode.Models.ResourceIdentifierCollectionTopLevelLinks Links - { - get { return BackingStore?.Get("links"); } - set { BackingStore?.Set("links", value); } - } -#endif + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaClientExample.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaClientExample.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -70,6 +46,7 @@ public TodoItemIdentifierCollectionResponseDocument() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -80,6 +57,7 @@ public TodoItemIdentifierCollectionResponseDocument() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaClientExample.GeneratedCode.Models.TodoItemIdentifierCollectionResponseDocument(); } + /// /// The deserialization information for the current model /// @@ -93,6 +71,7 @@ public virtual IDictionary> GetFieldDeserializers() { "meta", n => { Meta = n.GetObjectValue(global::OpenApiKiotaClientExample.GeneratedCode.Models.Meta.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -107,3 +86,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/TodoItemIdentifierInRequest.cs b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/TodoItemIdentifierInRequest.cs index fc21eb4a8..39b36f4df 100644 --- a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/TodoItemIdentifierInRequest.cs +++ b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/TodoItemIdentifierInRequest.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,60 +17,35 @@ public partial class TodoItemIdentifierInRequest : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The id property -#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 lid property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Lid { get { return BackingStore?.Get("lid"); } set { BackingStore?.Set("lid", value); } } -#nullable restore -#else - public string Lid - { - get { return BackingStore?.Get("lid"); } - set { BackingStore?.Set("lid", value); } - } -#endif + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaClientExample.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaClientExample.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// The type property public global::OpenApiKiotaClientExample.GeneratedCode.Models.TodoItemResourceType? Type { get { return BackingStore?.Get("type"); } set { BackingStore?.Set("type", value); } } + /// /// Instantiates a new and sets the default values. /// @@ -76,6 +53,7 @@ public TodoItemIdentifierInRequest() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -86,6 +64,7 @@ public TodoItemIdentifierInRequest() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaClientExample.GeneratedCode.Models.TodoItemIdentifierInRequest(); } + /// /// The deserialization information for the current model /// @@ -100,6 +79,7 @@ public virtual IDictionary> GetFieldDeserializers() { "type", n => { Type = n.GetEnumValue(); } }, }; } + /// /// Serializes information the current object /// @@ -115,3 +95,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/TodoItemIdentifierInResponse.cs b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/TodoItemIdentifierInResponse.cs index c7ac6d6ec..07d4c5a83 100644 --- a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/TodoItemIdentifierInResponse.cs +++ b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/TodoItemIdentifierInResponse.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,44 +17,28 @@ public partial class TodoItemIdentifierInResponse : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The id property -#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 meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaClientExample.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaClientExample.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// The type property public global::OpenApiKiotaClientExample.GeneratedCode.Models.TodoItemResourceType? Type { get { return BackingStore?.Get("type"); } set { BackingStore?.Set("type", value); } } + /// /// Instantiates a new and sets the default values. /// @@ -60,6 +46,7 @@ public TodoItemIdentifierInResponse() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -70,6 +57,7 @@ public TodoItemIdentifierInResponse() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaClientExample.GeneratedCode.Models.TodoItemIdentifierInResponse(); } + /// /// The deserialization information for the current model /// @@ -83,6 +71,7 @@ public virtual IDictionary> GetFieldDeserializers() { "type", n => { Type = n.GetEnumValue(); } }, }; } + /// /// Serializes information the current object /// @@ -97,3 +86,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/TodoItemOwnerRelationshipIdentifier.cs b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/TodoItemOwnerRelationshipIdentifier.cs index a5dd09556..dc28a6f41 100644 --- a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/TodoItemOwnerRelationshipIdentifier.cs +++ b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/TodoItemOwnerRelationshipIdentifier.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,50 +17,35 @@ public partial class TodoItemOwnerRelationshipIdentifier : IBackedModel, IParsab { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The id property -#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 lid property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Lid { get { return BackingStore?.Get("lid"); } set { BackingStore?.Set("lid", value); } } -#nullable restore -#else - public string Lid - { - get { return BackingStore?.Get("lid"); } - set { BackingStore?.Set("lid", value); } - } -#endif + /// The relationship property public global::OpenApiKiotaClientExample.GeneratedCode.Models.TodoItemOwnerRelationshipName? Relationship { get { return BackingStore?.Get("relationship"); } set { BackingStore?.Set("relationship", value); } } + /// The type property public global::OpenApiKiotaClientExample.GeneratedCode.Models.TodoItemResourceType? Type { get { return BackingStore?.Get("type"); } set { BackingStore?.Set("type", value); } } + /// /// Instantiates a new and sets the default values. /// @@ -66,6 +53,7 @@ public TodoItemOwnerRelationshipIdentifier() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -76,6 +64,7 @@ public TodoItemOwnerRelationshipIdentifier() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaClientExample.GeneratedCode.Models.TodoItemOwnerRelationshipIdentifier(); } + /// /// The deserialization information for the current model /// @@ -90,6 +79,7 @@ public virtual IDictionary> GetFieldDeserializers() { "type", n => { Type = n.GetEnumValue(); } }, }; } + /// /// Serializes information the current object /// @@ -105,3 +95,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/TodoItemOwnerRelationshipName.cs b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/TodoItemOwnerRelationshipName.cs index 121d6ce6f..dff462cfb 100644 --- a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/TodoItemOwnerRelationshipName.cs +++ b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/TodoItemOwnerRelationshipName.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 using System.Runtime.Serialization; using System; namespace OpenApiKiotaClientExample.GeneratedCode.Models @@ -14,3 +16,4 @@ public enum TodoItemOwnerRelationshipName #pragma warning restore CS1591 } } + diff --git a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/TodoItemPrimaryResponseDocument.cs b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/TodoItemPrimaryResponseDocument.cs index a9abcfb46..f6c46c7c1 100644 --- a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/TodoItemPrimaryResponseDocument.cs +++ b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/TodoItemPrimaryResponseDocument.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,70 +17,35 @@ public partial class TodoItemPrimaryResponseDocument : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The data property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaClientExample.GeneratedCode.Models.TodoItemDataInResponse? Data { get { return BackingStore?.Get("data"); } set { BackingStore?.Set("data", value); } } -#nullable restore -#else - public global::OpenApiKiotaClientExample.GeneratedCode.Models.TodoItemDataInResponse Data - { - get { return BackingStore?.Get("data"); } - set { BackingStore?.Set("data", value); } - } -#endif + /// The included property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public List? Included { get { return BackingStore?.Get?>("included"); } set { BackingStore?.Set("included", value); } } -#nullable restore -#else - public List Included - { - get { return BackingStore?.Get>("included"); } - set { BackingStore?.Set("included", value); } - } -#endif + /// The links property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaClientExample.GeneratedCode.Models.ResourceTopLevelLinks? Links { get { return BackingStore?.Get("links"); } set { BackingStore?.Set("links", value); } } -#nullable restore -#else - public global::OpenApiKiotaClientExample.GeneratedCode.Models.ResourceTopLevelLinks Links - { - get { return BackingStore?.Get("links"); } - set { BackingStore?.Set("links", value); } - } -#endif + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaClientExample.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaClientExample.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -86,6 +53,7 @@ public TodoItemPrimaryResponseDocument() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -96,6 +64,7 @@ public TodoItemPrimaryResponseDocument() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaClientExample.GeneratedCode.Models.TodoItemPrimaryResponseDocument(); } + /// /// The deserialization information for the current model /// @@ -110,6 +79,7 @@ public virtual IDictionary> GetFieldDeserializers() { "meta", n => { Meta = n.GetObjectValue(global::OpenApiKiotaClientExample.GeneratedCode.Models.Meta.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -125,3 +95,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/TodoItemPriority.cs b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/TodoItemPriority.cs index 2dbb500ba..c30eb8408 100644 --- a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/TodoItemPriority.cs +++ b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/TodoItemPriority.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 using System.Runtime.Serialization; using System; namespace OpenApiKiotaClientExample.GeneratedCode.Models @@ -22,3 +24,4 @@ public enum TodoItemPriority #pragma warning restore CS1591 } } + diff --git a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/TodoItemRelationshipsInResponse.cs b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/TodoItemRelationshipsInResponse.cs index 425372ba6..2a0097a54 100644 --- a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/TodoItemRelationshipsInResponse.cs +++ b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/TodoItemRelationshipsInResponse.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -14,55 +16,29 @@ public partial class TodoItemRelationshipsInResponse : IBackedModel, IParsable #pragma warning restore CS1591 { /// The assignee property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaClientExample.GeneratedCode.Models.NullableToOnePersonInResponse? Assignee { get { return BackingStore?.Get("assignee"); } set { BackingStore?.Set("assignee", value); } } -#nullable restore -#else - public global::OpenApiKiotaClientExample.GeneratedCode.Models.NullableToOnePersonInResponse Assignee - { - get { return BackingStore?.Get("assignee"); } - set { BackingStore?.Set("assignee", value); } - } -#endif + /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The owner property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaClientExample.GeneratedCode.Models.ToOnePersonInResponse? Owner { get { return BackingStore?.Get("owner"); } set { BackingStore?.Set("owner", value); } } -#nullable restore -#else - public global::OpenApiKiotaClientExample.GeneratedCode.Models.ToOnePersonInResponse Owner - { - get { return BackingStore?.Get("owner"); } - set { BackingStore?.Set("owner", value); } - } -#endif + /// The tags property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaClientExample.GeneratedCode.Models.ToManyTagInResponse? Tags { get { return BackingStore?.Get("tags"); } set { BackingStore?.Set("tags", value); } } -#nullable restore -#else - public global::OpenApiKiotaClientExample.GeneratedCode.Models.ToManyTagInResponse Tags - { - get { return BackingStore?.Get("tags"); } - set { BackingStore?.Set("tags", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -70,6 +46,7 @@ public TodoItemRelationshipsInResponse() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -80,6 +57,7 @@ public TodoItemRelationshipsInResponse() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaClientExample.GeneratedCode.Models.TodoItemRelationshipsInResponse(); } + /// /// The deserialization information for the current model /// @@ -93,6 +71,7 @@ public virtual IDictionary> GetFieldDeserializers() { "tags", n => { Tags = n.GetObjectValue(global::OpenApiKiotaClientExample.GeneratedCode.Models.ToManyTagInResponse.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -107,3 +86,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/TodoItemResourceType.cs b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/TodoItemResourceType.cs index 1ace23a8b..2951bcdf8 100644 --- a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/TodoItemResourceType.cs +++ b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/TodoItemResourceType.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 using System.Runtime.Serialization; using System; namespace OpenApiKiotaClientExample.GeneratedCode.Models @@ -14,3 +16,4 @@ public enum TodoItemResourceType #pragma warning restore CS1591 } } + diff --git a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/TodoItemTagsRelationshipIdentifier.cs b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/TodoItemTagsRelationshipIdentifier.cs index 01714d575..868c98495 100644 --- a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/TodoItemTagsRelationshipIdentifier.cs +++ b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/TodoItemTagsRelationshipIdentifier.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,50 +17,35 @@ public partial class TodoItemTagsRelationshipIdentifier : IBackedModel, IParsabl { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The id property -#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 lid property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Lid { get { return BackingStore?.Get("lid"); } set { BackingStore?.Set("lid", value); } } -#nullable restore -#else - public string Lid - { - get { return BackingStore?.Get("lid"); } - set { BackingStore?.Set("lid", value); } - } -#endif + /// The relationship property public global::OpenApiKiotaClientExample.GeneratedCode.Models.TodoItemTagsRelationshipName? Relationship { get { return BackingStore?.Get("relationship"); } set { BackingStore?.Set("relationship", value); } } + /// The type property public global::OpenApiKiotaClientExample.GeneratedCode.Models.TodoItemResourceType? Type { get { return BackingStore?.Get("type"); } set { BackingStore?.Set("type", value); } } + /// /// Instantiates a new and sets the default values. /// @@ -66,6 +53,7 @@ public TodoItemTagsRelationshipIdentifier() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -76,6 +64,7 @@ public TodoItemTagsRelationshipIdentifier() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaClientExample.GeneratedCode.Models.TodoItemTagsRelationshipIdentifier(); } + /// /// The deserialization information for the current model /// @@ -90,6 +79,7 @@ public virtual IDictionary> GetFieldDeserializers() { "type", n => { Type = n.GetEnumValue(); } }, }; } + /// /// Serializes information the current object /// @@ -105,3 +95,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/TodoItemTagsRelationshipName.cs b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/TodoItemTagsRelationshipName.cs index b530a9bb4..eb36d6d21 100644 --- a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/TodoItemTagsRelationshipName.cs +++ b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/TodoItemTagsRelationshipName.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 using System.Runtime.Serialization; using System; namespace OpenApiKiotaClientExample.GeneratedCode.Models @@ -14,3 +16,4 @@ public enum TodoItemTagsRelationshipName #pragma warning restore CS1591 } } + diff --git a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/UpdateOperationCode.cs b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/UpdateOperationCode.cs index fdd68ca01..116f90ed0 100644 --- a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/UpdateOperationCode.cs +++ b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/UpdateOperationCode.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 using System.Runtime.Serialization; using System; namespace OpenApiKiotaClientExample.GeneratedCode.Models @@ -14,3 +16,4 @@ public enum UpdateOperationCode #pragma warning restore CS1591 } } + diff --git a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/UpdatePersonAssignedTodoItemsRelationshipOperation.cs b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/UpdatePersonAssignedTodoItemsRelationshipOperation.cs index ff906a2c7..21bc4a4a7 100644 --- a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/UpdatePersonAssignedTodoItemsRelationshipOperation.cs +++ b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/UpdatePersonAssignedTodoItemsRelationshipOperation.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -13,43 +15,26 @@ public partial class UpdatePersonAssignedTodoItemsRelationshipOperation : global #pragma warning restore CS1591 { /// The data property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public List? Data { get { return BackingStore?.Get?>("data"); } set { BackingStore?.Set("data", value); } } -#nullable restore -#else - public List Data - { - get { return BackingStore?.Get>("data"); } - set { BackingStore?.Set("data", value); } - } -#endif + /// The op property public global::OpenApiKiotaClientExample.GeneratedCode.Models.UpdateOperationCode? Op { get { return BackingStore?.Get("op"); } set { BackingStore?.Set("op", value); } } + /// The ref property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaClientExample.GeneratedCode.Models.PersonAssignedTodoItemsRelationshipIdentifier? Ref { get { return BackingStore?.Get("ref"); } set { BackingStore?.Set("ref", value); } } -#nullable restore -#else - public global::OpenApiKiotaClientExample.GeneratedCode.Models.PersonAssignedTodoItemsRelationshipIdentifier Ref - { - get { return BackingStore?.Get("ref"); } - set { BackingStore?.Set("ref", value); } - } -#endif + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -60,6 +45,7 @@ public partial class UpdatePersonAssignedTodoItemsRelationshipOperation : global _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaClientExample.GeneratedCode.Models.UpdatePersonAssignedTodoItemsRelationshipOperation(); } + /// /// The deserialization information for the current model /// @@ -73,6 +59,7 @@ public override IDictionary> GetFieldDeserializers() { "ref", n => { Ref = n.GetObjectValue(global::OpenApiKiotaClientExample.GeneratedCode.Models.PersonAssignedTodoItemsRelationshipIdentifier.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -88,3 +75,4 @@ public override void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/UpdatePersonOperation.cs b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/UpdatePersonOperation.cs index 833f1ae51..ef21f9c25 100644 --- a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/UpdatePersonOperation.cs +++ b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/UpdatePersonOperation.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -13,43 +15,26 @@ public partial class UpdatePersonOperation : global::OpenApiKiotaClientExample.G #pragma warning restore CS1591 { /// The data property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaClientExample.GeneratedCode.Models.DataInUpdatePersonRequest? Data { get { return BackingStore?.Get("data"); } set { BackingStore?.Set("data", value); } } -#nullable restore -#else - public global::OpenApiKiotaClientExample.GeneratedCode.Models.DataInUpdatePersonRequest Data - { - get { return BackingStore?.Get("data"); } - set { BackingStore?.Set("data", value); } - } -#endif + /// The op property public global::OpenApiKiotaClientExample.GeneratedCode.Models.UpdateOperationCode? Op { get { return BackingStore?.Get("op"); } set { BackingStore?.Set("op", value); } } + /// The ref property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaClientExample.GeneratedCode.Models.PersonIdentifierInRequest? Ref { get { return BackingStore?.Get("ref"); } set { BackingStore?.Set("ref", value); } } -#nullable restore -#else - public global::OpenApiKiotaClientExample.GeneratedCode.Models.PersonIdentifierInRequest Ref - { - get { return BackingStore?.Get("ref"); } - set { BackingStore?.Set("ref", value); } - } -#endif + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -60,6 +45,7 @@ public partial class UpdatePersonOperation : global::OpenApiKiotaClientExample.G _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaClientExample.GeneratedCode.Models.UpdatePersonOperation(); } + /// /// The deserialization information for the current model /// @@ -73,6 +59,7 @@ public override IDictionary> GetFieldDeserializers() { "ref", n => { Ref = n.GetObjectValue(global::OpenApiKiotaClientExample.GeneratedCode.Models.PersonIdentifierInRequest.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -88,3 +75,4 @@ public override void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/UpdatePersonOwnedTodoItemsRelationshipOperation.cs b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/UpdatePersonOwnedTodoItemsRelationshipOperation.cs index 738312291..4127f9a9a 100644 --- a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/UpdatePersonOwnedTodoItemsRelationshipOperation.cs +++ b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/UpdatePersonOwnedTodoItemsRelationshipOperation.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -13,43 +15,26 @@ public partial class UpdatePersonOwnedTodoItemsRelationshipOperation : global::O #pragma warning restore CS1591 { /// The data property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public List? Data { get { return BackingStore?.Get?>("data"); } set { BackingStore?.Set("data", value); } } -#nullable restore -#else - public List Data - { - get { return BackingStore?.Get>("data"); } - set { BackingStore?.Set("data", value); } - } -#endif + /// The op property public global::OpenApiKiotaClientExample.GeneratedCode.Models.UpdateOperationCode? Op { get { return BackingStore?.Get("op"); } set { BackingStore?.Set("op", value); } } + /// The ref property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaClientExample.GeneratedCode.Models.PersonOwnedTodoItemsRelationshipIdentifier? Ref { get { return BackingStore?.Get("ref"); } set { BackingStore?.Set("ref", value); } } -#nullable restore -#else - public global::OpenApiKiotaClientExample.GeneratedCode.Models.PersonOwnedTodoItemsRelationshipIdentifier Ref - { - get { return BackingStore?.Get("ref"); } - set { BackingStore?.Set("ref", value); } - } -#endif + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -60,6 +45,7 @@ public partial class UpdatePersonOwnedTodoItemsRelationshipOperation : global::O _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaClientExample.GeneratedCode.Models.UpdatePersonOwnedTodoItemsRelationshipOperation(); } + /// /// The deserialization information for the current model /// @@ -73,6 +59,7 @@ public override IDictionary> GetFieldDeserializers() { "ref", n => { Ref = n.GetObjectValue(global::OpenApiKiotaClientExample.GeneratedCode.Models.PersonOwnedTodoItemsRelationshipIdentifier.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -88,3 +75,4 @@ public override void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/UpdatePersonRequestDocument.cs b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/UpdatePersonRequestDocument.cs index b9ea35321..9f43b1a97 100644 --- a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/UpdatePersonRequestDocument.cs +++ b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/UpdatePersonRequestDocument.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,38 +17,21 @@ public partial class UpdatePersonRequestDocument : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The data property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaClientExample.GeneratedCode.Models.DataInUpdatePersonRequest? Data { get { return BackingStore?.Get("data"); } set { BackingStore?.Set("data", value); } } -#nullable restore -#else - public global::OpenApiKiotaClientExample.GeneratedCode.Models.DataInUpdatePersonRequest Data - { - get { return BackingStore?.Get("data"); } - set { BackingStore?.Set("data", value); } - } -#endif + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaClientExample.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaClientExample.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -54,6 +39,7 @@ public UpdatePersonRequestDocument() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -64,6 +50,7 @@ public UpdatePersonRequestDocument() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaClientExample.GeneratedCode.Models.UpdatePersonRequestDocument(); } + /// /// The deserialization information for the current model /// @@ -76,6 +63,7 @@ public virtual IDictionary> GetFieldDeserializers() { "meta", n => { Meta = n.GetObjectValue(global::OpenApiKiotaClientExample.GeneratedCode.Models.Meta.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -89,3 +77,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/UpdateTagOperation.cs b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/UpdateTagOperation.cs index 1807b99ed..5ad4d31ea 100644 --- a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/UpdateTagOperation.cs +++ b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/UpdateTagOperation.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -13,43 +15,26 @@ public partial class UpdateTagOperation : global::OpenApiKiotaClientExample.Gene #pragma warning restore CS1591 { /// The data property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaClientExample.GeneratedCode.Models.DataInUpdateTagRequest? Data { get { return BackingStore?.Get("data"); } set { BackingStore?.Set("data", value); } } -#nullable restore -#else - public global::OpenApiKiotaClientExample.GeneratedCode.Models.DataInUpdateTagRequest Data - { - get { return BackingStore?.Get("data"); } - set { BackingStore?.Set("data", value); } - } -#endif + /// The op property public global::OpenApiKiotaClientExample.GeneratedCode.Models.UpdateOperationCode? Op { get { return BackingStore?.Get("op"); } set { BackingStore?.Set("op", value); } } + /// The ref property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaClientExample.GeneratedCode.Models.TagIdentifierInRequest? Ref { get { return BackingStore?.Get("ref"); } set { BackingStore?.Set("ref", value); } } -#nullable restore -#else - public global::OpenApiKiotaClientExample.GeneratedCode.Models.TagIdentifierInRequest Ref - { - get { return BackingStore?.Get("ref"); } - set { BackingStore?.Set("ref", value); } - } -#endif + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -60,6 +45,7 @@ public partial class UpdateTagOperation : global::OpenApiKiotaClientExample.Gene _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaClientExample.GeneratedCode.Models.UpdateTagOperation(); } + /// /// The deserialization information for the current model /// @@ -73,6 +59,7 @@ public override IDictionary> GetFieldDeserializers() { "ref", n => { Ref = n.GetObjectValue(global::OpenApiKiotaClientExample.GeneratedCode.Models.TagIdentifierInRequest.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -88,3 +75,4 @@ public override void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/UpdateTagRequestDocument.cs b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/UpdateTagRequestDocument.cs index edcfcfc04..89fff261a 100644 --- a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/UpdateTagRequestDocument.cs +++ b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/UpdateTagRequestDocument.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,38 +17,21 @@ public partial class UpdateTagRequestDocument : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The data property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaClientExample.GeneratedCode.Models.DataInUpdateTagRequest? Data { get { return BackingStore?.Get("data"); } set { BackingStore?.Set("data", value); } } -#nullable restore -#else - public global::OpenApiKiotaClientExample.GeneratedCode.Models.DataInUpdateTagRequest Data - { - get { return BackingStore?.Get("data"); } - set { BackingStore?.Set("data", value); } - } -#endif + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaClientExample.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaClientExample.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -54,6 +39,7 @@ public UpdateTagRequestDocument() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -64,6 +50,7 @@ public UpdateTagRequestDocument() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaClientExample.GeneratedCode.Models.UpdateTagRequestDocument(); } + /// /// The deserialization information for the current model /// @@ -76,6 +63,7 @@ public virtual IDictionary> GetFieldDeserializers() { "meta", n => { Meta = n.GetObjectValue(global::OpenApiKiotaClientExample.GeneratedCode.Models.Meta.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -89,3 +77,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/UpdateTagTodoItemsRelationshipOperation.cs b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/UpdateTagTodoItemsRelationshipOperation.cs index 576ec0417..a27ce8284 100644 --- a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/UpdateTagTodoItemsRelationshipOperation.cs +++ b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/UpdateTagTodoItemsRelationshipOperation.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -13,43 +15,26 @@ public partial class UpdateTagTodoItemsRelationshipOperation : global::OpenApiKi #pragma warning restore CS1591 { /// The data property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public List? Data { get { return BackingStore?.Get?>("data"); } set { BackingStore?.Set("data", value); } } -#nullable restore -#else - public List Data - { - get { return BackingStore?.Get>("data"); } - set { BackingStore?.Set("data", value); } - } -#endif + /// The op property public global::OpenApiKiotaClientExample.GeneratedCode.Models.UpdateOperationCode? Op { get { return BackingStore?.Get("op"); } set { BackingStore?.Set("op", value); } } + /// The ref property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaClientExample.GeneratedCode.Models.TagTodoItemsRelationshipIdentifier? Ref { get { return BackingStore?.Get("ref"); } set { BackingStore?.Set("ref", value); } } -#nullable restore -#else - public global::OpenApiKiotaClientExample.GeneratedCode.Models.TagTodoItemsRelationshipIdentifier Ref - { - get { return BackingStore?.Get("ref"); } - set { BackingStore?.Set("ref", value); } - } -#endif + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -60,6 +45,7 @@ public partial class UpdateTagTodoItemsRelationshipOperation : global::OpenApiKi _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaClientExample.GeneratedCode.Models.UpdateTagTodoItemsRelationshipOperation(); } + /// /// The deserialization information for the current model /// @@ -73,6 +59,7 @@ public override IDictionary> GetFieldDeserializers() { "ref", n => { Ref = n.GetObjectValue(global::OpenApiKiotaClientExample.GeneratedCode.Models.TagTodoItemsRelationshipIdentifier.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -88,3 +75,4 @@ public override void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/UpdateTodoItemAssigneeRelationshipOperation.cs b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/UpdateTodoItemAssigneeRelationshipOperation.cs index 3c2bdc126..e895f92ef 100644 --- a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/UpdateTodoItemAssigneeRelationshipOperation.cs +++ b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/UpdateTodoItemAssigneeRelationshipOperation.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -13,43 +15,26 @@ public partial class UpdateTodoItemAssigneeRelationshipOperation : global::OpenA #pragma warning restore CS1591 { /// The data property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaClientExample.GeneratedCode.Models.PersonIdentifierInRequest? Data { get { return BackingStore?.Get("data"); } set { BackingStore?.Set("data", value); } } -#nullable restore -#else - public global::OpenApiKiotaClientExample.GeneratedCode.Models.PersonIdentifierInRequest Data - { - get { return BackingStore?.Get("data"); } - set { BackingStore?.Set("data", value); } - } -#endif + /// The op property public global::OpenApiKiotaClientExample.GeneratedCode.Models.UpdateOperationCode? Op { get { return BackingStore?.Get("op"); } set { BackingStore?.Set("op", value); } } + /// The ref property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaClientExample.GeneratedCode.Models.TodoItemAssigneeRelationshipIdentifier? Ref { get { return BackingStore?.Get("ref"); } set { BackingStore?.Set("ref", value); } } -#nullable restore -#else - public global::OpenApiKiotaClientExample.GeneratedCode.Models.TodoItemAssigneeRelationshipIdentifier Ref - { - get { return BackingStore?.Get("ref"); } - set { BackingStore?.Set("ref", value); } - } -#endif + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -60,6 +45,7 @@ public partial class UpdateTodoItemAssigneeRelationshipOperation : global::OpenA _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaClientExample.GeneratedCode.Models.UpdateTodoItemAssigneeRelationshipOperation(); } + /// /// The deserialization information for the current model /// @@ -73,6 +59,7 @@ public override IDictionary> GetFieldDeserializers() { "ref", n => { Ref = n.GetObjectValue(global::OpenApiKiotaClientExample.GeneratedCode.Models.TodoItemAssigneeRelationshipIdentifier.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -88,3 +75,4 @@ public override void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/UpdateTodoItemOperation.cs b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/UpdateTodoItemOperation.cs index 9ba4a8795..f1df05fa4 100644 --- a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/UpdateTodoItemOperation.cs +++ b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/UpdateTodoItemOperation.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -13,43 +15,26 @@ public partial class UpdateTodoItemOperation : global::OpenApiKiotaClientExample #pragma warning restore CS1591 { /// The data property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaClientExample.GeneratedCode.Models.DataInUpdateTodoItemRequest? Data { get { return BackingStore?.Get("data"); } set { BackingStore?.Set("data", value); } } -#nullable restore -#else - public global::OpenApiKiotaClientExample.GeneratedCode.Models.DataInUpdateTodoItemRequest Data - { - get { return BackingStore?.Get("data"); } - set { BackingStore?.Set("data", value); } - } -#endif + /// The op property public global::OpenApiKiotaClientExample.GeneratedCode.Models.UpdateOperationCode? Op { get { return BackingStore?.Get("op"); } set { BackingStore?.Set("op", value); } } + /// The ref property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaClientExample.GeneratedCode.Models.TodoItemIdentifierInRequest? Ref { get { return BackingStore?.Get("ref"); } set { BackingStore?.Set("ref", value); } } -#nullable restore -#else - public global::OpenApiKiotaClientExample.GeneratedCode.Models.TodoItemIdentifierInRequest Ref - { - get { return BackingStore?.Get("ref"); } - set { BackingStore?.Set("ref", value); } - } -#endif + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -60,6 +45,7 @@ public partial class UpdateTodoItemOperation : global::OpenApiKiotaClientExample _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaClientExample.GeneratedCode.Models.UpdateTodoItemOperation(); } + /// /// The deserialization information for the current model /// @@ -73,6 +59,7 @@ public override IDictionary> GetFieldDeserializers() { "ref", n => { Ref = n.GetObjectValue(global::OpenApiKiotaClientExample.GeneratedCode.Models.TodoItemIdentifierInRequest.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -88,3 +75,4 @@ public override void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/UpdateTodoItemOwnerRelationshipOperation.cs b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/UpdateTodoItemOwnerRelationshipOperation.cs index 93c088e45..bf6b6bf53 100644 --- a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/UpdateTodoItemOwnerRelationshipOperation.cs +++ b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/UpdateTodoItemOwnerRelationshipOperation.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -13,43 +15,26 @@ public partial class UpdateTodoItemOwnerRelationshipOperation : global::OpenApiK #pragma warning restore CS1591 { /// The data property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaClientExample.GeneratedCode.Models.PersonIdentifierInRequest? Data { get { return BackingStore?.Get("data"); } set { BackingStore?.Set("data", value); } } -#nullable restore -#else - public global::OpenApiKiotaClientExample.GeneratedCode.Models.PersonIdentifierInRequest Data - { - get { return BackingStore?.Get("data"); } - set { BackingStore?.Set("data", value); } - } -#endif + /// The op property public global::OpenApiKiotaClientExample.GeneratedCode.Models.UpdateOperationCode? Op { get { return BackingStore?.Get("op"); } set { BackingStore?.Set("op", value); } } + /// The ref property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaClientExample.GeneratedCode.Models.TodoItemOwnerRelationshipIdentifier? Ref { get { return BackingStore?.Get("ref"); } set { BackingStore?.Set("ref", value); } } -#nullable restore -#else - public global::OpenApiKiotaClientExample.GeneratedCode.Models.TodoItemOwnerRelationshipIdentifier Ref - { - get { return BackingStore?.Get("ref"); } - set { BackingStore?.Set("ref", value); } - } -#endif + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -60,6 +45,7 @@ public partial class UpdateTodoItemOwnerRelationshipOperation : global::OpenApiK _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaClientExample.GeneratedCode.Models.UpdateTodoItemOwnerRelationshipOperation(); } + /// /// The deserialization information for the current model /// @@ -73,6 +59,7 @@ public override IDictionary> GetFieldDeserializers() { "ref", n => { Ref = n.GetObjectValue(global::OpenApiKiotaClientExample.GeneratedCode.Models.TodoItemOwnerRelationshipIdentifier.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -88,3 +75,4 @@ public override void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/UpdateTodoItemRequestDocument.cs b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/UpdateTodoItemRequestDocument.cs index 923fca9af..0260c344f 100644 --- a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/UpdateTodoItemRequestDocument.cs +++ b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/UpdateTodoItemRequestDocument.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,38 +17,21 @@ public partial class UpdateTodoItemRequestDocument : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The data property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaClientExample.GeneratedCode.Models.DataInUpdateTodoItemRequest? Data { get { return BackingStore?.Get("data"); } set { BackingStore?.Set("data", value); } } -#nullable restore -#else - public global::OpenApiKiotaClientExample.GeneratedCode.Models.DataInUpdateTodoItemRequest Data - { - get { return BackingStore?.Get("data"); } - set { BackingStore?.Set("data", value); } - } -#endif + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaClientExample.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaClientExample.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -54,6 +39,7 @@ public UpdateTodoItemRequestDocument() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -64,6 +50,7 @@ public UpdateTodoItemRequestDocument() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaClientExample.GeneratedCode.Models.UpdateTodoItemRequestDocument(); } + /// /// The deserialization information for the current model /// @@ -76,6 +63,7 @@ public virtual IDictionary> GetFieldDeserializers() { "meta", n => { Meta = n.GetObjectValue(global::OpenApiKiotaClientExample.GeneratedCode.Models.Meta.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -89,3 +77,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/UpdateTodoItemTagsRelationshipOperation.cs b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/UpdateTodoItemTagsRelationshipOperation.cs index 00f01b21b..7c86dd4c5 100644 --- a/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/UpdateTodoItemTagsRelationshipOperation.cs +++ b/src/Examples/OpenApiKiotaClientExample/GeneratedCode/Models/UpdateTodoItemTagsRelationshipOperation.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -13,43 +15,26 @@ public partial class UpdateTodoItemTagsRelationshipOperation : global::OpenApiKi #pragma warning restore CS1591 { /// The data property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public List? Data { get { return BackingStore?.Get?>("data"); } set { BackingStore?.Set("data", value); } } -#nullable restore -#else - public List Data - { - get { return BackingStore?.Get>("data"); } - set { BackingStore?.Set("data", value); } - } -#endif + /// The op property public global::OpenApiKiotaClientExample.GeneratedCode.Models.UpdateOperationCode? Op { get { return BackingStore?.Get("op"); } set { BackingStore?.Set("op", value); } } + /// The ref property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaClientExample.GeneratedCode.Models.TodoItemTagsRelationshipIdentifier? Ref { get { return BackingStore?.Get("ref"); } set { BackingStore?.Set("ref", value); } } -#nullable restore -#else - public global::OpenApiKiotaClientExample.GeneratedCode.Models.TodoItemTagsRelationshipIdentifier Ref - { - get { return BackingStore?.Get("ref"); } - set { BackingStore?.Set("ref", value); } - } -#endif + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -60,6 +45,7 @@ public partial class UpdateTodoItemTagsRelationshipOperation : global::OpenApiKi _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaClientExample.GeneratedCode.Models.UpdateTodoItemTagsRelationshipOperation(); } + /// /// The deserialization information for the current model /// @@ -73,6 +59,7 @@ public override IDictionary> GetFieldDeserializers() { "ref", n => { Ref = n.GetObjectValue(global::OpenApiKiotaClientExample.GeneratedCode.Models.TodoItemTagsRelationshipIdentifier.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -88,3 +75,4 @@ public override void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/src/Examples/OpenApiKiotaClientExample/OpenApiKiotaClientExample.csproj b/src/Examples/OpenApiKiotaClientExample/OpenApiKiotaClientExample.csproj index d1d0dae36..c0d3f03d7 100644 --- a/src/Examples/OpenApiKiotaClientExample/OpenApiKiotaClientExample.csproj +++ b/src/Examples/OpenApiKiotaClientExample/OpenApiKiotaClientExample.csproj @@ -34,6 +34,7 @@ Condition="$(DesignTimeBuild) != true And $(BuildingProject) == true"> + +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Store; @@ -29,26 +31,31 @@ public partial class AtomicOperationsClient : BaseRequestBuilder { get => new global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Courses.CoursesRequestBuilder(PathParameters, RequestAdapter); } + /// The enrollments property public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Enrollments.EnrollmentsRequestBuilder Enrollments { get => new global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Enrollments.EnrollmentsRequestBuilder(PathParameters, RequestAdapter); } + /// The operations property public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Operations.OperationsRequestBuilder Operations { get => new global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Operations.OperationsRequestBuilder(PathParameters, RequestAdapter); } + /// The students property public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Students.StudentsRequestBuilder Students { get => new global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Students.StudentsRequestBuilder(PathParameters, RequestAdapter); } + /// The teachers property public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Teachers.TeachersRequestBuilder Teachers { get => new global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Teachers.TeachersRequestBuilder(PathParameters, RequestAdapter); } + /// /// Instantiates a new and sets the default values. /// @@ -73,3 +80,4 @@ public partial class AtomicOperationsClient : BaseRequestBuilder } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Courses/CoursesRequestBuilder.cs b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Courses/CoursesRequestBuilder.cs index 452d443ee..241d152cf 100644 --- a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Courses/CoursesRequestBuilder.cs +++ b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Courses/CoursesRequestBuilder.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -30,6 +32,7 @@ public partial class CoursesRequestBuilder : BaseRequestBuilder return new global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Courses.Item.CoursesItemRequestBuilder(urlTplParams, RequestAdapter); } } + /// /// Instantiates a new and sets the default values. /// @@ -38,6 +41,7 @@ public partial class CoursesRequestBuilder : BaseRequestBuilder public CoursesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/courses{?query*}", pathParameters) { } + /// /// Instantiates a new and sets the default values. /// @@ -46,6 +50,7 @@ public CoursesRequestBuilder(Dictionary pathParameters, IRequest public CoursesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/courses{?query*}", rawUrl) { } + /// /// Retrieves a collection of courses. /// @@ -53,15 +58,8 @@ public CoursesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba /// Cancellation token to use when cancelling requests /// Configuration for the request such as headers, query parameters, and middleware options. /// When receiving a 400 status code -#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> { @@ -69,23 +67,18 @@ public CoursesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba }; return await RequestAdapter.SendAsync(requestInfo, global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.CourseCollectionResponseDocument.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// /// 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 HeadAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { -#nullable restore -#else - public async Task HeadAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) - { -#endif var requestInfo = ToHeadRequestInformation(requestConfiguration); await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); } + /// /// Creates a new course. /// @@ -97,15 +90,8 @@ public async Task HeadAsync(ActionWhen receiving a 404 status code /// When receiving a 409 status code /// When receiving a 422 status code -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public async Task PostAsync(global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.CreateCourseRequestDocument body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { -#nullable restore -#else - public async Task PostAsync(global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.CreateCourseRequestDocument body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) - { -#endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> @@ -117,58 +103,40 @@ public async Task HeadAsync(Action(requestInfo, global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.CoursePrimaryResponseDocument.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } + /// /// Retrieves a collection of courses. /// /// A /// 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(Method.GET, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/vnd.api+json"); return requestInfo; } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// /// A /// 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 ToHeadRequestInformation(Action>? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToHeadRequestInformation(Action> requestConfiguration = default) - { -#endif var requestInfo = new RequestInformation(Method.HEAD, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); return requestInfo; } + /// /// Creates a new course. /// /// A /// 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(global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.CreateCourseRequestDocument body, Action>? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToPostRequestInformation(global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.CreateCourseRequestDocument body, Action> requestConfiguration = default) - { -#endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); @@ -176,6 +144,7 @@ public RequestInformation ToPostRequestInformation(global::OpenApiKiotaEndToEndT requestInfo.SetContentFromParsable(RequestAdapter, "application/vnd.api+json", body); return requestInfo; } + /// /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. /// @@ -185,6 +154,7 @@ public RequestInformation ToPostRequestInformation(global::OpenApiKiotaEndToEndT { return new global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Courses.CoursesRequestBuilder(rawUrl, RequestAdapter); } + /// /// Retrieves a collection of courses. /// @@ -192,16 +162,10 @@ public RequestInformation ToPostRequestInformation(global::OpenApiKiotaEndToEndT public partial class CoursesRequestBuilderGetQueryParameters { /// For syntax, see the documentation for the [`include`](https://www.jsonapi.net/usage/reading/including-relationships.html)/[`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// @@ -209,16 +173,10 @@ public partial class CoursesRequestBuilderGetQueryParameters public partial class CoursesRequestBuilderHeadQueryParameters { /// For syntax, see the documentation for the [`include`](https://www.jsonapi.net/usage/reading/including-relationships.html)/[`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } + /// /// Creates a new course. /// @@ -226,16 +184,10 @@ public partial class CoursesRequestBuilderHeadQueryParameters public partial class CoursesRequestBuilderPostQueryParameters { /// For syntax, see the documentation for the [`include`](https://www.jsonapi.net/usage/reading/including-relationships.html)/[`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Courses/Item/CoursesItemRequestBuilder.cs b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Courses/Item/CoursesItemRequestBuilder.cs index ac1fce2a9..ea33365b9 100644 --- a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Courses/Item/CoursesItemRequestBuilder.cs +++ b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Courses/Item/CoursesItemRequestBuilder.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -25,16 +27,19 @@ public partial class CoursesItemRequestBuilder : BaseRequestBuilder { get => new global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Courses.Item.Enrollments.EnrollmentsRequestBuilder(PathParameters, RequestAdapter); } + /// The relationships property public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Courses.Item.Relationships.RelationshipsRequestBuilder Relationships { get => new global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Courses.Item.Relationships.RelationshipsRequestBuilder(PathParameters, RequestAdapter); } + /// The taughtBy property public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Courses.Item.TaughtBy.TaughtByRequestBuilder TaughtBy { get => new global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Courses.Item.TaughtBy.TaughtByRequestBuilder(PathParameters, RequestAdapter); } + /// /// Instantiates a new and sets the default values. /// @@ -43,6 +48,7 @@ public partial class CoursesItemRequestBuilder : BaseRequestBuilder public CoursesItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/courses/{id}{?query*}", pathParameters) { } + /// /// Instantiates a new and sets the default values. /// @@ -51,21 +57,15 @@ public CoursesItemRequestBuilder(Dictionary pathParameters, IReq public CoursesItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/courses/{id}{?query*}", rawUrl) { } + /// /// Deletes an existing course by its identifier. /// /// Cancellation token to use when cancelling requests /// Configuration for the request such as headers, query parameters, and middleware options. /// When receiving a 404 status code -#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> { @@ -73,6 +73,7 @@ public async Task DeleteAsync(Action /// Retrieves an individual course by its identifier. /// @@ -81,15 +82,8 @@ public async Task DeleteAsync(ActionConfiguration for the request such as headers, query parameters, and middleware options. /// When receiving a 400 status code /// When receiving a 404 status code -#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> { @@ -98,23 +92,18 @@ public async Task DeleteAsync(Action(requestInfo, global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.CoursePrimaryResponseDocument.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// /// 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 HeadAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { -#nullable restore -#else - public async Task HeadAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) - { -#endif var requestInfo = ToHeadRequestInformation(requestConfiguration); await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); } + /// /// Updates an existing course. /// @@ -126,15 +115,8 @@ public async Task HeadAsync(ActionWhen receiving a 404 status code /// When receiving a 409 status code /// When receiving a 422 status code -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public async Task PatchAsync(global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.UpdateCourseRequestDocument body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { -#nullable restore -#else - public async Task PatchAsync(global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.UpdateCourseRequestDocument body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) - { -#endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> @@ -146,77 +128,53 @@ public async Task HeadAsync(Action(requestInfo, global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.CoursePrimaryResponseDocument.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } + /// /// Deletes an existing course by its identifier. /// /// A /// 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(Method.DELETE, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/vnd.api+json"); return requestInfo; } + /// /// Retrieves an individual course by its identifier. /// /// A /// 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(Method.GET, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/vnd.api+json"); return requestInfo; } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// /// A /// 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 ToHeadRequestInformation(Action>? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToHeadRequestInformation(Action> requestConfiguration = default) - { -#endif var requestInfo = new RequestInformation(Method.HEAD, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); return requestInfo; } + /// /// Updates an existing course. /// /// A /// 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(global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.UpdateCourseRequestDocument body, Action>? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToPatchRequestInformation(global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.UpdateCourseRequestDocument body, Action> requestConfiguration = default) - { -#endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); @@ -224,6 +182,7 @@ public RequestInformation ToPatchRequestInformation(global::OpenApiKiotaEndToEnd requestInfo.SetContentFromParsable(RequestAdapter, "application/vnd.api+json", body); return requestInfo; } + /// /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. /// @@ -233,6 +192,7 @@ public RequestInformation ToPatchRequestInformation(global::OpenApiKiotaEndToEnd { return new global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Courses.Item.CoursesItemRequestBuilder(rawUrl, RequestAdapter); } + /// /// Retrieves an individual course by its identifier. /// @@ -240,16 +200,10 @@ public RequestInformation ToPatchRequestInformation(global::OpenApiKiotaEndToEnd public partial class CoursesItemRequestBuilderGetQueryParameters { /// For syntax, see the documentation for the [`include`](https://www.jsonapi.net/usage/reading/including-relationships.html)/[`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// @@ -257,16 +211,10 @@ public partial class CoursesItemRequestBuilderGetQueryParameters public partial class CoursesItemRequestBuilderHeadQueryParameters { /// For syntax, see the documentation for the [`include`](https://www.jsonapi.net/usage/reading/including-relationships.html)/[`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } + /// /// Updates an existing course. /// @@ -274,16 +222,10 @@ public partial class CoursesItemRequestBuilderHeadQueryParameters public partial class CoursesItemRequestBuilderPatchQueryParameters { /// For syntax, see the documentation for the [`include`](https://www.jsonapi.net/usage/reading/including-relationships.html)/[`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Courses/Item/Enrollments/EnrollmentsRequestBuilder.cs b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Courses/Item/Enrollments/EnrollmentsRequestBuilder.cs index ea4f39747..44d21fd38 100644 --- a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Courses/Item/Enrollments/EnrollmentsRequestBuilder.cs +++ b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Courses/Item/Enrollments/EnrollmentsRequestBuilder.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -25,6 +27,7 @@ public partial class EnrollmentsRequestBuilder : BaseRequestBuilder public EnrollmentsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/courses/{id}/enrollments{?query*}", pathParameters) { } + /// /// Instantiates a new and sets the default values. /// @@ -33,6 +36,7 @@ public EnrollmentsRequestBuilder(Dictionary pathParameters, IReq public EnrollmentsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/courses/{id}/enrollments{?query*}", rawUrl) { } + /// /// Retrieves the related enrollments of an individual course's enrollments relationship. /// @@ -41,15 +45,8 @@ public EnrollmentsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) /// Configuration for the request such as headers, query parameters, and middleware options. /// When receiving a 400 status code /// When receiving a 404 status code -#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> { @@ -58,60 +55,43 @@ public EnrollmentsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) }; return await RequestAdapter.SendAsync(requestInfo, global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.EnrollmentCollectionResponseDocument.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// /// 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 HeadAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { -#nullable restore -#else - public async Task HeadAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) - { -#endif var requestInfo = ToHeadRequestInformation(requestConfiguration); await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); } + /// /// Retrieves the related enrollments of an individual course's enrollments relationship. /// /// A /// 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(Method.GET, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/vnd.api+json"); return requestInfo; } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// /// A /// 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 ToHeadRequestInformation(Action>? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToHeadRequestInformation(Action> requestConfiguration = default) - { -#endif var requestInfo = new RequestInformation(Method.HEAD, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); return requestInfo; } + /// /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. /// @@ -121,6 +101,7 @@ public RequestInformation ToHeadRequestInformation(Action /// Retrieves the related enrollments of an individual course's enrollments relationship. /// @@ -128,16 +109,10 @@ public RequestInformation ToHeadRequestInformation(ActionFor syntax, see the documentation for the [`include`](https://www.jsonapi.net/usage/reading/including-relationships.html)/[`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// @@ -145,16 +120,10 @@ public partial class EnrollmentsRequestBuilderGetQueryParameters public partial class EnrollmentsRequestBuilderHeadQueryParameters { /// For syntax, see the documentation for the [`include`](https://www.jsonapi.net/usage/reading/including-relationships.html)/[`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Courses/Item/Relationships/Enrollments/EnrollmentsRequestBuilder.cs b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Courses/Item/Relationships/Enrollments/EnrollmentsRequestBuilder.cs index 961ae2475..66adf7aa5 100644 --- a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Courses/Item/Relationships/Enrollments/EnrollmentsRequestBuilder.cs +++ b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Courses/Item/Relationships/Enrollments/EnrollmentsRequestBuilder.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -25,6 +27,7 @@ public partial class EnrollmentsRequestBuilder : BaseRequestBuilder public EnrollmentsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/courses/{id}/relationships/enrollments{?query*}", pathParameters) { } + /// /// Instantiates a new and sets the default values. /// @@ -33,6 +36,7 @@ public EnrollmentsRequestBuilder(Dictionary pathParameters, IReq public EnrollmentsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/courses/{id}/relationships/enrollments{?query*}", rawUrl) { } + /// /// Retrieves the related enrollment identities of an individual course's enrollments relationship. /// @@ -41,15 +45,8 @@ public EnrollmentsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) /// Configuration for the request such as headers, query parameters, and middleware options. /// When receiving a 400 status code /// When receiving a 404 status code -#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> { @@ -58,23 +55,18 @@ public EnrollmentsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) }; return await RequestAdapter.SendAsync(requestInfo, global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.EnrollmentIdentifierCollectionResponseDocument.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// /// 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 HeadAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { -#nullable restore -#else - public async Task HeadAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) - { -#endif var requestInfo = ToHeadRequestInformation(requestConfiguration); await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); } + /// /// Assigns existing enrollments to the enrollments relationship of an individual course. /// @@ -84,15 +76,8 @@ public async Task HeadAsync(ActionWhen receiving a 400 status code /// When receiving a 404 status code /// When receiving a 409 status code -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public async Task PatchAsync(global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.ToManyEnrollmentInRequest body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { -#nullable restore -#else - public async Task PatchAsync(global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.ToManyEnrollmentInRequest body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) - { -#endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> @@ -103,6 +88,7 @@ public async Task PatchAsync(global::OpenApiKiotaEndToEndTests.AtomicOperations. }; await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); } + /// /// Adds existing enrollments to the enrollments relationship of an individual course. /// @@ -112,15 +98,8 @@ public async Task PatchAsync(global::OpenApiKiotaEndToEndTests.AtomicOperations. /// When receiving a 400 status code /// When receiving a 404 status code /// When receiving a 409 status code -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public async Task PostAsync(global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.ToManyEnrollmentInRequest body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { -#nullable restore -#else - public async Task PostAsync(global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.ToManyEnrollmentInRequest body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) - { -#endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> @@ -131,58 +110,40 @@ public async Task PostAsync(global::OpenApiKiotaEndToEndTests.AtomicOperations.G }; await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); } + /// /// Retrieves the related enrollment identities of an individual course's enrollments relationship. /// /// A /// 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(Method.GET, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/vnd.api+json"); return requestInfo; } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// /// A /// 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 ToHeadRequestInformation(Action>? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToHeadRequestInformation(Action> requestConfiguration = default) - { -#endif var requestInfo = new RequestInformation(Method.HEAD, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); return requestInfo; } + /// /// Assigns existing enrollments to the enrollments relationship of an individual course. /// /// A /// 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(global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.ToManyEnrollmentInRequest body, Action>? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToPatchRequestInformation(global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.ToManyEnrollmentInRequest body, Action> requestConfiguration = default) - { -#endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); @@ -190,21 +151,15 @@ public RequestInformation ToPatchRequestInformation(global::OpenApiKiotaEndToEnd requestInfo.SetContentFromParsable(RequestAdapter, "application/vnd.api+json", body); return requestInfo; } + /// /// Adds existing enrollments to the enrollments relationship of an individual course. /// /// A /// 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(global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.ToManyEnrollmentInRequest body, Action>? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToPostRequestInformation(global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.ToManyEnrollmentInRequest body, Action> requestConfiguration = default) - { -#endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); @@ -212,6 +167,7 @@ public RequestInformation ToPostRequestInformation(global::OpenApiKiotaEndToEndT requestInfo.SetContentFromParsable(RequestAdapter, "application/vnd.api+json", body); return requestInfo; } + /// /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. /// @@ -221,6 +177,7 @@ public RequestInformation ToPostRequestInformation(global::OpenApiKiotaEndToEndT { return new global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Courses.Item.Relationships.Enrollments.EnrollmentsRequestBuilder(rawUrl, RequestAdapter); } + /// /// Retrieves the related enrollment identities of an individual course's enrollments relationship. /// @@ -228,16 +185,10 @@ public RequestInformation ToPostRequestInformation(global::OpenApiKiotaEndToEndT public partial class EnrollmentsRequestBuilderGetQueryParameters { /// For syntax, see the documentation for the [`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// @@ -245,16 +196,10 @@ public partial class EnrollmentsRequestBuilderGetQueryParameters public partial class EnrollmentsRequestBuilderHeadQueryParameters { /// For syntax, see the documentation for the [`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Courses/Item/Relationships/RelationshipsRequestBuilder.cs b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Courses/Item/Relationships/RelationshipsRequestBuilder.cs index 511f0b46a..addf114d2 100644 --- a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Courses/Item/Relationships/RelationshipsRequestBuilder.cs +++ b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Courses/Item/Relationships/RelationshipsRequestBuilder.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions; @@ -21,11 +23,13 @@ public partial class RelationshipsRequestBuilder : BaseRequestBuilder { get => new global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Courses.Item.Relationships.Enrollments.EnrollmentsRequestBuilder(PathParameters, RequestAdapter); } + /// The taughtBy property public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Courses.Item.Relationships.TaughtBy.TaughtByRequestBuilder TaughtBy { get => new global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Courses.Item.Relationships.TaughtBy.TaughtByRequestBuilder(PathParameters, RequestAdapter); } + /// /// Instantiates a new and sets the default values. /// @@ -34,6 +38,7 @@ public partial class RelationshipsRequestBuilder : BaseRequestBuilder public RelationshipsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/courses/{id}/relationships", pathParameters) { } + /// /// Instantiates a new and sets the default values. /// @@ -45,3 +50,4 @@ public RelationshipsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Courses/Item/Relationships/TaughtBy/TaughtByRequestBuilder.cs b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Courses/Item/Relationships/TaughtBy/TaughtByRequestBuilder.cs index aabf51cb4..fda616cd7 100644 --- a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Courses/Item/Relationships/TaughtBy/TaughtByRequestBuilder.cs +++ b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Courses/Item/Relationships/TaughtBy/TaughtByRequestBuilder.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -25,6 +27,7 @@ public partial class TaughtByRequestBuilder : BaseRequestBuilder public TaughtByRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/courses/{id}/relationships/taughtBy{?query*}", pathParameters) { } + /// /// Instantiates a new and sets the default values. /// @@ -33,6 +36,7 @@ public TaughtByRequestBuilder(Dictionary pathParameters, IReques public TaughtByRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/courses/{id}/relationships/taughtBy{?query*}", rawUrl) { } + /// /// Retrieves the related teacher identities of an individual course's taughtBy relationship. /// @@ -41,15 +45,8 @@ public TaughtByRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b /// Configuration for the request such as headers, query parameters, and middleware options. /// When receiving a 400 status code /// When receiving a 404 status code -#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> { @@ -58,23 +55,18 @@ public TaughtByRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b }; return await RequestAdapter.SendAsync(requestInfo, global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.TeacherIdentifierCollectionResponseDocument.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// /// 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 HeadAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { -#nullable restore -#else - public async Task HeadAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) - { -#endif var requestInfo = ToHeadRequestInformation(requestConfiguration); await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); } + /// /// Assigns existing teachers to the taughtBy relationship of an individual course. /// @@ -84,15 +76,8 @@ public async Task HeadAsync(ActionWhen receiving a 400 status code /// When receiving a 404 status code /// When receiving a 409 status code -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public async Task PatchAsync(global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.ToManyTeacherInRequest body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { -#nullable restore -#else - public async Task PatchAsync(global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.ToManyTeacherInRequest body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) - { -#endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> @@ -103,6 +88,7 @@ public async Task PatchAsync(global::OpenApiKiotaEndToEndTests.AtomicOperations. }; await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); } + /// /// Adds existing teachers to the taughtBy relationship of an individual course. /// @@ -112,15 +98,8 @@ public async Task PatchAsync(global::OpenApiKiotaEndToEndTests.AtomicOperations. /// When receiving a 400 status code /// When receiving a 404 status code /// When receiving a 409 status code -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public async Task PostAsync(global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.ToManyTeacherInRequest body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { -#nullable restore -#else - public async Task PostAsync(global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.ToManyTeacherInRequest body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) - { -#endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> @@ -131,58 +110,40 @@ public async Task PostAsync(global::OpenApiKiotaEndToEndTests.AtomicOperations.G }; await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); } + /// /// Retrieves the related teacher identities of an individual course's taughtBy relationship. /// /// A /// 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(Method.GET, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/vnd.api+json"); return requestInfo; } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// /// A /// 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 ToHeadRequestInformation(Action>? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToHeadRequestInformation(Action> requestConfiguration = default) - { -#endif var requestInfo = new RequestInformation(Method.HEAD, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); return requestInfo; } + /// /// Assigns existing teachers to the taughtBy relationship of an individual course. /// /// A /// 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(global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.ToManyTeacherInRequest body, Action>? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToPatchRequestInformation(global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.ToManyTeacherInRequest body, Action> requestConfiguration = default) - { -#endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); @@ -190,21 +151,15 @@ public RequestInformation ToPatchRequestInformation(global::OpenApiKiotaEndToEnd requestInfo.SetContentFromParsable(RequestAdapter, "application/vnd.api+json", body); return requestInfo; } + /// /// Adds existing teachers to the taughtBy relationship of an individual course. /// /// A /// 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(global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.ToManyTeacherInRequest body, Action>? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToPostRequestInformation(global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.ToManyTeacherInRequest body, Action> requestConfiguration = default) - { -#endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); @@ -212,6 +167,7 @@ public RequestInformation ToPostRequestInformation(global::OpenApiKiotaEndToEndT requestInfo.SetContentFromParsable(RequestAdapter, "application/vnd.api+json", body); return requestInfo; } + /// /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. /// @@ -221,6 +177,7 @@ public RequestInformation ToPostRequestInformation(global::OpenApiKiotaEndToEndT { return new global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Courses.Item.Relationships.TaughtBy.TaughtByRequestBuilder(rawUrl, RequestAdapter); } + /// /// Retrieves the related teacher identities of an individual course's taughtBy relationship. /// @@ -228,16 +185,10 @@ public RequestInformation ToPostRequestInformation(global::OpenApiKiotaEndToEndT public partial class TaughtByRequestBuilderGetQueryParameters { /// For syntax, see the documentation for the [`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// @@ -245,16 +196,10 @@ public partial class TaughtByRequestBuilderGetQueryParameters public partial class TaughtByRequestBuilderHeadQueryParameters { /// For syntax, see the documentation for the [`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Courses/Item/TaughtBy/TaughtByRequestBuilder.cs b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Courses/Item/TaughtBy/TaughtByRequestBuilder.cs index a151fd67e..43b270ca4 100644 --- a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Courses/Item/TaughtBy/TaughtByRequestBuilder.cs +++ b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Courses/Item/TaughtBy/TaughtByRequestBuilder.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -25,6 +27,7 @@ public partial class TaughtByRequestBuilder : BaseRequestBuilder public TaughtByRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/courses/{id}/taughtBy{?query*}", pathParameters) { } + /// /// Instantiates a new and sets the default values. /// @@ -33,6 +36,7 @@ public TaughtByRequestBuilder(Dictionary pathParameters, IReques public TaughtByRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/courses/{id}/taughtBy{?query*}", rawUrl) { } + /// /// Retrieves the related teachers of an individual course's taughtBy relationship. /// @@ -41,15 +45,8 @@ public TaughtByRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b /// Configuration for the request such as headers, query parameters, and middleware options. /// When receiving a 400 status code /// When receiving a 404 status code -#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> { @@ -58,60 +55,43 @@ public TaughtByRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b }; return await RequestAdapter.SendAsync(requestInfo, global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.TeacherCollectionResponseDocument.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// /// 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 HeadAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { -#nullable restore -#else - public async Task HeadAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) - { -#endif var requestInfo = ToHeadRequestInformation(requestConfiguration); await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); } + /// /// Retrieves the related teachers of an individual course's taughtBy relationship. /// /// A /// 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(Method.GET, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/vnd.api+json"); return requestInfo; } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// /// A /// 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 ToHeadRequestInformation(Action>? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToHeadRequestInformation(Action> requestConfiguration = default) - { -#endif var requestInfo = new RequestInformation(Method.HEAD, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); return requestInfo; } + /// /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. /// @@ -121,6 +101,7 @@ public RequestInformation ToHeadRequestInformation(Action /// Retrieves the related teachers of an individual course's taughtBy relationship. /// @@ -128,16 +109,10 @@ public RequestInformation ToHeadRequestInformation(ActionFor syntax, see the documentation for the [`include`](https://www.jsonapi.net/usage/reading/including-relationships.html)/[`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// @@ -145,16 +120,10 @@ public partial class TaughtByRequestBuilderGetQueryParameters public partial class TaughtByRequestBuilderHeadQueryParameters { /// For syntax, see the documentation for the [`include`](https://www.jsonapi.net/usage/reading/including-relationships.html)/[`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Enrollments/EnrollmentsRequestBuilder.cs b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Enrollments/EnrollmentsRequestBuilder.cs index 2cbf652ec..7df682914 100644 --- a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Enrollments/EnrollmentsRequestBuilder.cs +++ b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Enrollments/EnrollmentsRequestBuilder.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -30,6 +32,7 @@ public partial class EnrollmentsRequestBuilder : BaseRequestBuilder return new global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Enrollments.Item.EnrollmentsItemRequestBuilder(urlTplParams, RequestAdapter); } } + /// /// Instantiates a new and sets the default values. /// @@ -38,6 +41,7 @@ public partial class EnrollmentsRequestBuilder : BaseRequestBuilder public EnrollmentsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/enrollments{?query*}", pathParameters) { } + /// /// Instantiates a new and sets the default values. /// @@ -46,6 +50,7 @@ public EnrollmentsRequestBuilder(Dictionary pathParameters, IReq public EnrollmentsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/enrollments{?query*}", rawUrl) { } + /// /// Retrieves a collection of enrollments. /// @@ -53,15 +58,8 @@ public EnrollmentsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) /// Cancellation token to use when cancelling requests /// Configuration for the request such as headers, query parameters, and middleware options. /// When receiving a 400 status code -#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> { @@ -69,23 +67,18 @@ public EnrollmentsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) }; return await RequestAdapter.SendAsync(requestInfo, global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.EnrollmentCollectionResponseDocument.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// /// 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 HeadAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { -#nullable restore -#else - public async Task HeadAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) - { -#endif var requestInfo = ToHeadRequestInformation(requestConfiguration); await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); } + /// /// Creates a new enrollment. /// @@ -98,15 +91,8 @@ public async Task HeadAsync(ActionWhen receiving a 404 status code /// When receiving a 409 status code /// When receiving a 422 status code -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public async Task PostAsync(global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.CreateEnrollmentRequestDocument body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { -#nullable restore -#else - public async Task PostAsync(global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.CreateEnrollmentRequestDocument body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) - { -#endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> @@ -119,58 +105,40 @@ public async Task HeadAsync(Action(requestInfo, global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.EnrollmentPrimaryResponseDocument.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } + /// /// Retrieves a collection of enrollments. /// /// A /// 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(Method.GET, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/vnd.api+json"); return requestInfo; } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// /// A /// 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 ToHeadRequestInformation(Action>? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToHeadRequestInformation(Action> requestConfiguration = default) - { -#endif var requestInfo = new RequestInformation(Method.HEAD, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); return requestInfo; } + /// /// Creates a new enrollment. /// /// A /// 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(global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.CreateEnrollmentRequestDocument body, Action>? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToPostRequestInformation(global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.CreateEnrollmentRequestDocument body, Action> requestConfiguration = default) - { -#endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); @@ -178,6 +146,7 @@ public RequestInformation ToPostRequestInformation(global::OpenApiKiotaEndToEndT requestInfo.SetContentFromParsable(RequestAdapter, "application/vnd.api+json", body); return requestInfo; } + /// /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. /// @@ -187,6 +156,7 @@ public RequestInformation ToPostRequestInformation(global::OpenApiKiotaEndToEndT { return new global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Enrollments.EnrollmentsRequestBuilder(rawUrl, RequestAdapter); } + /// /// Retrieves a collection of enrollments. /// @@ -194,16 +164,10 @@ public RequestInformation ToPostRequestInformation(global::OpenApiKiotaEndToEndT public partial class EnrollmentsRequestBuilderGetQueryParameters { /// For syntax, see the documentation for the [`include`](https://www.jsonapi.net/usage/reading/including-relationships.html)/[`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// @@ -211,16 +175,10 @@ public partial class EnrollmentsRequestBuilderGetQueryParameters public partial class EnrollmentsRequestBuilderHeadQueryParameters { /// For syntax, see the documentation for the [`include`](https://www.jsonapi.net/usage/reading/including-relationships.html)/[`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } + /// /// Creates a new enrollment. /// @@ -228,16 +186,10 @@ public partial class EnrollmentsRequestBuilderHeadQueryParameters public partial class EnrollmentsRequestBuilderPostQueryParameters { /// For syntax, see the documentation for the [`include`](https://www.jsonapi.net/usage/reading/including-relationships.html)/[`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Enrollments/Item/Course/CourseRequestBuilder.cs b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Enrollments/Item/Course/CourseRequestBuilder.cs index c827d6f5f..2c8f3fc89 100644 --- a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Enrollments/Item/Course/CourseRequestBuilder.cs +++ b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Enrollments/Item/Course/CourseRequestBuilder.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -25,6 +27,7 @@ public partial class CourseRequestBuilder : BaseRequestBuilder public CourseRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/enrollments/{id}/course{?query*}", pathParameters) { } + /// /// Instantiates a new and sets the default values. /// @@ -33,6 +36,7 @@ public CourseRequestBuilder(Dictionary pathParameters, IRequestA public CourseRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/enrollments/{id}/course{?query*}", rawUrl) { } + /// /// Retrieves the related course of an individual enrollment's course relationship. /// @@ -41,15 +45,8 @@ public CourseRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas /// Configuration for the request such as headers, query parameters, and middleware options. /// When receiving a 400 status code /// When receiving a 404 status code -#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> { @@ -58,60 +55,43 @@ public CourseRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas }; return await RequestAdapter.SendAsync(requestInfo, global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.CourseSecondaryResponseDocument.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// /// 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 HeadAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { -#nullable restore -#else - public async Task HeadAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) - { -#endif var requestInfo = ToHeadRequestInformation(requestConfiguration); await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); } + /// /// Retrieves the related course of an individual enrollment's course relationship. /// /// A /// 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(Method.GET, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/vnd.api+json"); return requestInfo; } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// /// A /// 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 ToHeadRequestInformation(Action>? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToHeadRequestInformation(Action> requestConfiguration = default) - { -#endif var requestInfo = new RequestInformation(Method.HEAD, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); return requestInfo; } + /// /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. /// @@ -121,6 +101,7 @@ public RequestInformation ToHeadRequestInformation(Action /// Retrieves the related course of an individual enrollment's course relationship. /// @@ -128,16 +109,10 @@ public RequestInformation ToHeadRequestInformation(ActionFor syntax, see the documentation for the [`include`](https://www.jsonapi.net/usage/reading/including-relationships.html)/[`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// @@ -145,16 +120,10 @@ public partial class CourseRequestBuilderGetQueryParameters public partial class CourseRequestBuilderHeadQueryParameters { /// For syntax, see the documentation for the [`include`](https://www.jsonapi.net/usage/reading/including-relationships.html)/[`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Enrollments/Item/EnrollmentsItemRequestBuilder.cs b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Enrollments/Item/EnrollmentsItemRequestBuilder.cs index d34423bd3..7b2acdeee 100644 --- a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Enrollments/Item/EnrollmentsItemRequestBuilder.cs +++ b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Enrollments/Item/EnrollmentsItemRequestBuilder.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -25,16 +27,19 @@ public partial class EnrollmentsItemRequestBuilder : BaseRequestBuilder { get => new global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Enrollments.Item.Course.CourseRequestBuilder(PathParameters, RequestAdapter); } + /// The relationships property public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Enrollments.Item.Relationships.RelationshipsRequestBuilder Relationships { get => new global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Enrollments.Item.Relationships.RelationshipsRequestBuilder(PathParameters, RequestAdapter); } + /// The student property public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Enrollments.Item.Student.StudentRequestBuilder Student { get => new global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Enrollments.Item.Student.StudentRequestBuilder(PathParameters, RequestAdapter); } + /// /// Instantiates a new and sets the default values. /// @@ -43,6 +48,7 @@ public partial class EnrollmentsItemRequestBuilder : BaseRequestBuilder public EnrollmentsItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/enrollments/{id}{?query*}", pathParameters) { } + /// /// Instantiates a new and sets the default values. /// @@ -51,21 +57,15 @@ public EnrollmentsItemRequestBuilder(Dictionary pathParameters, public EnrollmentsItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/enrollments/{id}{?query*}", rawUrl) { } + /// /// Deletes an existing enrollment by its identifier. /// /// Cancellation token to use when cancelling requests /// Configuration for the request such as headers, query parameters, and middleware options. /// When receiving a 404 status code -#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> { @@ -73,6 +73,7 @@ public async Task DeleteAsync(Action /// Retrieves an individual enrollment by its identifier. /// @@ -81,15 +82,8 @@ public async Task DeleteAsync(ActionConfiguration for the request such as headers, query parameters, and middleware options. /// When receiving a 400 status code /// When receiving a 404 status code -#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> { @@ -98,23 +92,18 @@ public async Task DeleteAsync(Action(requestInfo, global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.EnrollmentPrimaryResponseDocument.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// /// 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 HeadAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { -#nullable restore -#else - public async Task HeadAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) - { -#endif var requestInfo = ToHeadRequestInformation(requestConfiguration); await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); } + /// /// Updates an existing enrollment. /// @@ -126,15 +115,8 @@ public async Task HeadAsync(ActionWhen receiving a 404 status code /// When receiving a 409 status code /// When receiving a 422 status code -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public async Task PatchAsync(global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.UpdateEnrollmentRequestDocument body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { -#nullable restore -#else - public async Task PatchAsync(global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.UpdateEnrollmentRequestDocument body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) - { -#endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> @@ -146,77 +128,53 @@ public async Task HeadAsync(Action(requestInfo, global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.EnrollmentPrimaryResponseDocument.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } + /// /// Deletes an existing enrollment by its identifier. /// /// A /// 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(Method.DELETE, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/vnd.api+json"); return requestInfo; } + /// /// Retrieves an individual enrollment by its identifier. /// /// A /// 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(Method.GET, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/vnd.api+json"); return requestInfo; } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// /// A /// 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 ToHeadRequestInformation(Action>? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToHeadRequestInformation(Action> requestConfiguration = default) - { -#endif var requestInfo = new RequestInformation(Method.HEAD, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); return requestInfo; } + /// /// Updates an existing enrollment. /// /// A /// 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(global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.UpdateEnrollmentRequestDocument body, Action>? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToPatchRequestInformation(global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.UpdateEnrollmentRequestDocument body, Action> requestConfiguration = default) - { -#endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); @@ -224,6 +182,7 @@ public RequestInformation ToPatchRequestInformation(global::OpenApiKiotaEndToEnd requestInfo.SetContentFromParsable(RequestAdapter, "application/vnd.api+json", body); return requestInfo; } + /// /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. /// @@ -233,6 +192,7 @@ public RequestInformation ToPatchRequestInformation(global::OpenApiKiotaEndToEnd { return new global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Enrollments.Item.EnrollmentsItemRequestBuilder(rawUrl, RequestAdapter); } + /// /// Retrieves an individual enrollment by its identifier. /// @@ -240,16 +200,10 @@ public RequestInformation ToPatchRequestInformation(global::OpenApiKiotaEndToEnd public partial class EnrollmentsItemRequestBuilderGetQueryParameters { /// For syntax, see the documentation for the [`include`](https://www.jsonapi.net/usage/reading/including-relationships.html)/[`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// @@ -257,16 +211,10 @@ public partial class EnrollmentsItemRequestBuilderGetQueryParameters public partial class EnrollmentsItemRequestBuilderHeadQueryParameters { /// For syntax, see the documentation for the [`include`](https://www.jsonapi.net/usage/reading/including-relationships.html)/[`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } + /// /// Updates an existing enrollment. /// @@ -274,16 +222,10 @@ public partial class EnrollmentsItemRequestBuilderHeadQueryParameters public partial class EnrollmentsItemRequestBuilderPatchQueryParameters { /// For syntax, see the documentation for the [`include`](https://www.jsonapi.net/usage/reading/including-relationships.html)/[`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Enrollments/Item/Relationships/Course/CourseRequestBuilder.cs b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Enrollments/Item/Relationships/Course/CourseRequestBuilder.cs index cca37e533..8bcfc55d7 100644 --- a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Enrollments/Item/Relationships/Course/CourseRequestBuilder.cs +++ b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Enrollments/Item/Relationships/Course/CourseRequestBuilder.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -25,6 +27,7 @@ public partial class CourseRequestBuilder : BaseRequestBuilder public CourseRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/enrollments/{id}/relationships/course{?query*}", pathParameters) { } + /// /// Instantiates a new and sets the default values. /// @@ -33,6 +36,7 @@ public CourseRequestBuilder(Dictionary pathParameters, IRequestA public CourseRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/enrollments/{id}/relationships/course{?query*}", rawUrl) { } + /// /// Retrieves the related course identity of an individual enrollment's course relationship. /// @@ -41,15 +45,8 @@ public CourseRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas /// Configuration for the request such as headers, query parameters, and middleware options. /// When receiving a 400 status code /// When receiving a 404 status code -#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> { @@ -58,23 +55,18 @@ public CourseRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas }; return await RequestAdapter.SendAsync(requestInfo, global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.CourseIdentifierResponseDocument.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// /// 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 HeadAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { -#nullable restore -#else - public async Task HeadAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) - { -#endif var requestInfo = ToHeadRequestInformation(requestConfiguration); await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); } + /// /// Assigns an existing course to the course relationship of an individual enrollment. /// @@ -84,15 +76,8 @@ public async Task HeadAsync(ActionWhen receiving a 400 status code /// When receiving a 404 status code /// When receiving a 409 status code -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public async Task PatchAsync(global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.ToOneCourseInRequest body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { -#nullable restore -#else - public async Task PatchAsync(global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.ToOneCourseInRequest body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) - { -#endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> @@ -103,58 +88,40 @@ public async Task PatchAsync(global::OpenApiKiotaEndToEndTests.AtomicOperations. }; await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); } + /// /// Retrieves the related course identity of an individual enrollment's course relationship. /// /// A /// 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(Method.GET, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/vnd.api+json"); return requestInfo; } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// /// A /// 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 ToHeadRequestInformation(Action>? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToHeadRequestInformation(Action> requestConfiguration = default) - { -#endif var requestInfo = new RequestInformation(Method.HEAD, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); return requestInfo; } + /// /// Assigns an existing course to the course relationship of an individual enrollment. /// /// A /// 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(global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.ToOneCourseInRequest body, Action>? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToPatchRequestInformation(global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.ToOneCourseInRequest body, Action> requestConfiguration = default) - { -#endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); @@ -162,6 +129,7 @@ public RequestInformation ToPatchRequestInformation(global::OpenApiKiotaEndToEnd requestInfo.SetContentFromParsable(RequestAdapter, "application/vnd.api+json", body); return requestInfo; } + /// /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. /// @@ -171,6 +139,7 @@ public RequestInformation ToPatchRequestInformation(global::OpenApiKiotaEndToEnd { return new global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Enrollments.Item.Relationships.Course.CourseRequestBuilder(rawUrl, RequestAdapter); } + /// /// Retrieves the related course identity of an individual enrollment's course relationship. /// @@ -178,16 +147,10 @@ public RequestInformation ToPatchRequestInformation(global::OpenApiKiotaEndToEnd public partial class CourseRequestBuilderGetQueryParameters { /// For syntax, see the documentation for the [`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// @@ -195,16 +158,10 @@ public partial class CourseRequestBuilderGetQueryParameters public partial class CourseRequestBuilderHeadQueryParameters { /// For syntax, see the documentation for the [`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Enrollments/Item/Relationships/RelationshipsRequestBuilder.cs b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Enrollments/Item/Relationships/RelationshipsRequestBuilder.cs index 340ae083f..f9f925870 100644 --- a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Enrollments/Item/Relationships/RelationshipsRequestBuilder.cs +++ b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Enrollments/Item/Relationships/RelationshipsRequestBuilder.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions; @@ -21,11 +23,13 @@ public partial class RelationshipsRequestBuilder : BaseRequestBuilder { get => new global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Enrollments.Item.Relationships.Course.CourseRequestBuilder(PathParameters, RequestAdapter); } + /// The student property public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Enrollments.Item.Relationships.Student.StudentRequestBuilder Student { get => new global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Enrollments.Item.Relationships.Student.StudentRequestBuilder(PathParameters, RequestAdapter); } + /// /// Instantiates a new and sets the default values. /// @@ -34,6 +38,7 @@ public partial class RelationshipsRequestBuilder : BaseRequestBuilder public RelationshipsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/enrollments/{id}/relationships", pathParameters) { } + /// /// Instantiates a new and sets the default values. /// @@ -45,3 +50,4 @@ public RelationshipsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Enrollments/Item/Relationships/Student/StudentRequestBuilder.cs b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Enrollments/Item/Relationships/Student/StudentRequestBuilder.cs index 7d553f4b0..4e53f8351 100644 --- a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Enrollments/Item/Relationships/Student/StudentRequestBuilder.cs +++ b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Enrollments/Item/Relationships/Student/StudentRequestBuilder.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -25,6 +27,7 @@ public partial class StudentRequestBuilder : BaseRequestBuilder public StudentRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/enrollments/{id}/relationships/student{?query*}", pathParameters) { } + /// /// Instantiates a new and sets the default values. /// @@ -33,6 +36,7 @@ public StudentRequestBuilder(Dictionary pathParameters, IRequest public StudentRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/enrollments/{id}/relationships/student{?query*}", rawUrl) { } + /// /// Retrieves the related student identity of an individual enrollment's student relationship. /// @@ -41,15 +45,8 @@ public StudentRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba /// Configuration for the request such as headers, query parameters, and middleware options. /// When receiving a 400 status code /// When receiving a 404 status code -#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> { @@ -58,23 +55,18 @@ public StudentRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba }; return await RequestAdapter.SendAsync(requestInfo, global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.StudentIdentifierResponseDocument.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// /// 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 HeadAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { -#nullable restore -#else - public async Task HeadAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) - { -#endif var requestInfo = ToHeadRequestInformation(requestConfiguration); await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); } + /// /// Assigns an existing student to the student relationship of an individual enrollment. /// @@ -84,15 +76,8 @@ public async Task HeadAsync(ActionWhen receiving a 400 status code /// When receiving a 404 status code /// When receiving a 409 status code -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public async Task PatchAsync(global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.ToOneStudentInRequest body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { -#nullable restore -#else - public async Task PatchAsync(global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.ToOneStudentInRequest body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) - { -#endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> @@ -103,58 +88,40 @@ public async Task PatchAsync(global::OpenApiKiotaEndToEndTests.AtomicOperations. }; await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); } + /// /// Retrieves the related student identity of an individual enrollment's student relationship. /// /// A /// 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(Method.GET, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/vnd.api+json"); return requestInfo; } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// /// A /// 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 ToHeadRequestInformation(Action>? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToHeadRequestInformation(Action> requestConfiguration = default) - { -#endif var requestInfo = new RequestInformation(Method.HEAD, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); return requestInfo; } + /// /// Assigns an existing student to the student relationship of an individual enrollment. /// /// A /// 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(global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.ToOneStudentInRequest body, Action>? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToPatchRequestInformation(global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.ToOneStudentInRequest body, Action> requestConfiguration = default) - { -#endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); @@ -162,6 +129,7 @@ public RequestInformation ToPatchRequestInformation(global::OpenApiKiotaEndToEnd requestInfo.SetContentFromParsable(RequestAdapter, "application/vnd.api+json", body); return requestInfo; } + /// /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. /// @@ -171,6 +139,7 @@ public RequestInformation ToPatchRequestInformation(global::OpenApiKiotaEndToEnd { return new global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Enrollments.Item.Relationships.Student.StudentRequestBuilder(rawUrl, RequestAdapter); } + /// /// Retrieves the related student identity of an individual enrollment's student relationship. /// @@ -178,16 +147,10 @@ public RequestInformation ToPatchRequestInformation(global::OpenApiKiotaEndToEnd public partial class StudentRequestBuilderGetQueryParameters { /// For syntax, see the documentation for the [`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// @@ -195,16 +158,10 @@ public partial class StudentRequestBuilderGetQueryParameters public partial class StudentRequestBuilderHeadQueryParameters { /// For syntax, see the documentation for the [`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Enrollments/Item/Student/StudentRequestBuilder.cs b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Enrollments/Item/Student/StudentRequestBuilder.cs index 252aab84b..c49207af0 100644 --- a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Enrollments/Item/Student/StudentRequestBuilder.cs +++ b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Enrollments/Item/Student/StudentRequestBuilder.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -25,6 +27,7 @@ public partial class StudentRequestBuilder : BaseRequestBuilder public StudentRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/enrollments/{id}/student{?query*}", pathParameters) { } + /// /// Instantiates a new and sets the default values. /// @@ -33,6 +36,7 @@ public StudentRequestBuilder(Dictionary pathParameters, IRequest public StudentRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/enrollments/{id}/student{?query*}", rawUrl) { } + /// /// Retrieves the related student of an individual enrollment's student relationship. /// @@ -41,15 +45,8 @@ public StudentRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba /// Configuration for the request such as headers, query parameters, and middleware options. /// When receiving a 400 status code /// When receiving a 404 status code -#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> { @@ -58,60 +55,43 @@ public StudentRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba }; return await RequestAdapter.SendAsync(requestInfo, global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.StudentSecondaryResponseDocument.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// /// 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 HeadAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { -#nullable restore -#else - public async Task HeadAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) - { -#endif var requestInfo = ToHeadRequestInformation(requestConfiguration); await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); } + /// /// Retrieves the related student of an individual enrollment's student relationship. /// /// A /// 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(Method.GET, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/vnd.api+json"); return requestInfo; } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// /// A /// 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 ToHeadRequestInformation(Action>? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToHeadRequestInformation(Action> requestConfiguration = default) - { -#endif var requestInfo = new RequestInformation(Method.HEAD, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); return requestInfo; } + /// /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. /// @@ -121,6 +101,7 @@ public RequestInformation ToHeadRequestInformation(Action /// Retrieves the related student of an individual enrollment's student relationship. /// @@ -128,16 +109,10 @@ public RequestInformation ToHeadRequestInformation(ActionFor syntax, see the documentation for the [`include`](https://www.jsonapi.net/usage/reading/including-relationships.html)/[`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// @@ -145,16 +120,10 @@ public partial class StudentRequestBuilderGetQueryParameters public partial class StudentRequestBuilderHeadQueryParameters { /// For syntax, see the documentation for the [`include`](https://www.jsonapi.net/usage/reading/including-relationships.html)/[`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/AddOperationCode.cs b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/AddOperationCode.cs index 1171c5165..e38d2e16d 100644 --- a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/AddOperationCode.cs +++ b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/AddOperationCode.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 using System.Runtime.Serialization; using System; namespace OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models @@ -14,3 +16,4 @@ public enum AddOperationCode #pragma warning restore CS1591 } } + diff --git a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/AddToCourseEnrollmentsRelationshipOperation.cs b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/AddToCourseEnrollmentsRelationshipOperation.cs index c3382af45..f36c0116b 100644 --- a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/AddToCourseEnrollmentsRelationshipOperation.cs +++ b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/AddToCourseEnrollmentsRelationshipOperation.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -13,43 +15,26 @@ public partial class AddToCourseEnrollmentsRelationshipOperation : global::OpenA #pragma warning restore CS1591 { /// The data property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public List? Data { get { return BackingStore?.Get?>("data"); } set { BackingStore?.Set("data", value); } } -#nullable restore -#else - public List Data - { - get { return BackingStore?.Get>("data"); } - set { BackingStore?.Set("data", value); } - } -#endif + /// The op property public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.AddOperationCode? Op { get { return BackingStore?.Get("op"); } set { BackingStore?.Set("op", value); } } + /// The ref property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.CourseEnrollmentsRelationshipIdentifier? Ref { get { return BackingStore?.Get("ref"); } set { BackingStore?.Set("ref", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.CourseEnrollmentsRelationshipIdentifier Ref - { - get { return BackingStore?.Get("ref"); } - set { BackingStore?.Set("ref", value); } - } -#endif + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -60,6 +45,7 @@ public partial class AddToCourseEnrollmentsRelationshipOperation : global::OpenA _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.AddToCourseEnrollmentsRelationshipOperation(); } + /// /// The deserialization information for the current model /// @@ -73,6 +59,7 @@ public override IDictionary> GetFieldDeserializers() { "ref", n => { Ref = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.CourseEnrollmentsRelationshipIdentifier.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -88,3 +75,4 @@ public override void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/AddToCourseTaughtByRelationshipOperation.cs b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/AddToCourseTaughtByRelationshipOperation.cs index 65bd668f5..9d42073cd 100644 --- a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/AddToCourseTaughtByRelationshipOperation.cs +++ b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/AddToCourseTaughtByRelationshipOperation.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -13,43 +15,26 @@ public partial class AddToCourseTaughtByRelationshipOperation : global::OpenApiK #pragma warning restore CS1591 { /// The data property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public List? Data { get { return BackingStore?.Get?>("data"); } set { BackingStore?.Set("data", value); } } -#nullable restore -#else - public List Data - { - get { return BackingStore?.Get>("data"); } - set { BackingStore?.Set("data", value); } - } -#endif + /// The op property public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.AddOperationCode? Op { get { return BackingStore?.Get("op"); } set { BackingStore?.Set("op", value); } } + /// The ref property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.CourseTaughtByRelationshipIdentifier? Ref { get { return BackingStore?.Get("ref"); } set { BackingStore?.Set("ref", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.CourseTaughtByRelationshipIdentifier Ref - { - get { return BackingStore?.Get("ref"); } - set { BackingStore?.Set("ref", value); } - } -#endif + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -60,6 +45,7 @@ public partial class AddToCourseTaughtByRelationshipOperation : global::OpenApiK _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.AddToCourseTaughtByRelationshipOperation(); } + /// /// The deserialization information for the current model /// @@ -73,6 +59,7 @@ public override IDictionary> GetFieldDeserializers() { "ref", n => { Ref = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.CourseTaughtByRelationshipIdentifier.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -88,3 +75,4 @@ public override void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/AddToStudentEnrollmentsRelationshipOperation.cs b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/AddToStudentEnrollmentsRelationshipOperation.cs index 87e43670b..86eb5fa95 100644 --- a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/AddToStudentEnrollmentsRelationshipOperation.cs +++ b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/AddToStudentEnrollmentsRelationshipOperation.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -13,43 +15,26 @@ public partial class AddToStudentEnrollmentsRelationshipOperation : global::Open #pragma warning restore CS1591 { /// The data property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public List? Data { get { return BackingStore?.Get?>("data"); } set { BackingStore?.Set("data", value); } } -#nullable restore -#else - public List Data - { - get { return BackingStore?.Get>("data"); } - set { BackingStore?.Set("data", value); } - } -#endif + /// The op property public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.AddOperationCode? Op { get { return BackingStore?.Get("op"); } set { BackingStore?.Set("op", value); } } + /// The ref property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.StudentEnrollmentsRelationshipIdentifier? Ref { get { return BackingStore?.Get("ref"); } set { BackingStore?.Set("ref", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.StudentEnrollmentsRelationshipIdentifier Ref - { - get { return BackingStore?.Get("ref"); } - set { BackingStore?.Set("ref", value); } - } -#endif + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -60,6 +45,7 @@ public partial class AddToStudentEnrollmentsRelationshipOperation : global::Open _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.AddToStudentEnrollmentsRelationshipOperation(); } + /// /// The deserialization information for the current model /// @@ -73,6 +59,7 @@ public override IDictionary> GetFieldDeserializers() { "ref", n => { Ref = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.StudentEnrollmentsRelationshipIdentifier.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -88,3 +75,4 @@ public override void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/AddToTeacherMentorsRelationshipOperation.cs b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/AddToTeacherMentorsRelationshipOperation.cs index 624c6a4ab..35c9a59dc 100644 --- a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/AddToTeacherMentorsRelationshipOperation.cs +++ b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/AddToTeacherMentorsRelationshipOperation.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -13,43 +15,26 @@ public partial class AddToTeacherMentorsRelationshipOperation : global::OpenApiK #pragma warning restore CS1591 { /// The data property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public List? Data { get { return BackingStore?.Get?>("data"); } set { BackingStore?.Set("data", value); } } -#nullable restore -#else - public List Data - { - get { return BackingStore?.Get>("data"); } - set { BackingStore?.Set("data", value); } - } -#endif + /// The op property public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.AddOperationCode? Op { get { return BackingStore?.Get("op"); } set { BackingStore?.Set("op", value); } } + /// The ref property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.TeacherMentorsRelationshipIdentifier? Ref { get { return BackingStore?.Get("ref"); } set { BackingStore?.Set("ref", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.TeacherMentorsRelationshipIdentifier Ref - { - get { return BackingStore?.Get("ref"); } - set { BackingStore?.Set("ref", value); } - } -#endif + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -60,6 +45,7 @@ public partial class AddToTeacherMentorsRelationshipOperation : global::OpenApiK _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.AddToTeacherMentorsRelationshipOperation(); } + /// /// The deserialization information for the current model /// @@ -73,6 +59,7 @@ public override IDictionary> GetFieldDeserializers() { "ref", n => { Ref = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.TeacherMentorsRelationshipIdentifier.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -88,3 +75,4 @@ public override void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/AddToTeacherTeachesRelationshipOperation.cs b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/AddToTeacherTeachesRelationshipOperation.cs index 0a86b76fa..d54954b31 100644 --- a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/AddToTeacherTeachesRelationshipOperation.cs +++ b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/AddToTeacherTeachesRelationshipOperation.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -13,43 +15,26 @@ public partial class AddToTeacherTeachesRelationshipOperation : global::OpenApiK #pragma warning restore CS1591 { /// The data property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public List? Data { get { return BackingStore?.Get?>("data"); } set { BackingStore?.Set("data", value); } } -#nullable restore -#else - public List Data - { - get { return BackingStore?.Get>("data"); } - set { BackingStore?.Set("data", value); } - } -#endif + /// The op property public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.AddOperationCode? Op { get { return BackingStore?.Get("op"); } set { BackingStore?.Set("op", value); } } + /// The ref property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.TeacherTeachesRelationshipIdentifier? Ref { get { return BackingStore?.Get("ref"); } set { BackingStore?.Set("ref", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.TeacherTeachesRelationshipIdentifier Ref - { - get { return BackingStore?.Get("ref"); } - set { BackingStore?.Set("ref", value); } - } -#endif + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -60,6 +45,7 @@ public partial class AddToTeacherTeachesRelationshipOperation : global::OpenApiK _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.AddToTeacherTeachesRelationshipOperation(); } + /// /// The deserialization information for the current model /// @@ -73,6 +59,7 @@ public override IDictionary> GetFieldDeserializers() { "ref", n => { Ref = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.TeacherTeachesRelationshipIdentifier.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -88,3 +75,4 @@ public override void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/AtomicOperation.cs b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/AtomicOperation.cs index 32c434fb1..4eb7506fd 100644 --- a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/AtomicOperation.cs +++ b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/AtomicOperation.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,38 +17,21 @@ public partial class AtomicOperation : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// The openapiDiscriminator property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? OpenapiDiscriminator { get { return BackingStore?.Get("openapi:discriminator"); } set { BackingStore?.Set("openapi:discriminator", value); } } -#nullable restore -#else - public string OpenapiDiscriminator - { - get { return BackingStore?.Get("openapi:discriminator"); } - set { BackingStore?.Set("openapi:discriminator", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -54,6 +39,7 @@ public AtomicOperation() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -94,6 +80,7 @@ public AtomicOperation() _ => new global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.AtomicOperation(), }; } + /// /// The deserialization information for the current model /// @@ -106,6 +93,7 @@ public virtual IDictionary> GetFieldDeserializers() { "openapi:discriminator", n => { OpenapiDiscriminator = n.GetStringValue(); } }, }; } + /// /// Serializes information the current object /// @@ -119,3 +107,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/AtomicResult.cs b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/AtomicResult.cs index 917b31782..a5b667e2d 100644 --- a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/AtomicResult.cs +++ b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/AtomicResult.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,38 +17,21 @@ public partial class AtomicResult : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The data property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.DataInResponse? Data { get { return BackingStore?.Get("data"); } set { BackingStore?.Set("data", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.DataInResponse Data - { - get { return BackingStore?.Get("data"); } - set { BackingStore?.Set("data", value); } - } -#endif + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -54,6 +39,7 @@ public AtomicResult() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -64,6 +50,7 @@ public AtomicResult() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.AtomicResult(); } + /// /// The deserialization information for the current model /// @@ -76,6 +63,7 @@ public virtual IDictionary> GetFieldDeserializers() { "meta", n => { Meta = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Meta.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -89,3 +77,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/AttributesInCreateCourseRequest.cs b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/AttributesInCreateCourseRequest.cs index 65391b63e..13574c783 100644 --- a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/AttributesInCreateCourseRequest.cs +++ b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/AttributesInCreateCourseRequest.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,38 +17,21 @@ public partial class AttributesInCreateCourseRequest : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The description property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Description { get { return BackingStore?.Get("description"); } set { BackingStore?.Set("description", value); } } -#nullable restore -#else - public string Description - { - get { return BackingStore?.Get("description"); } - set { BackingStore?.Set("description", value); } - } -#endif + /// The subject property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Subject { get { return BackingStore?.Get("subject"); } set { BackingStore?.Set("subject", value); } } -#nullable restore -#else - public string Subject - { - get { return BackingStore?.Get("subject"); } - set { BackingStore?.Set("subject", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -54,6 +39,7 @@ public AttributesInCreateCourseRequest() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -64,6 +50,7 @@ public AttributesInCreateCourseRequest() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.AttributesInCreateCourseRequest(); } + /// /// The deserialization information for the current model /// @@ -76,6 +63,7 @@ public virtual IDictionary> GetFieldDeserializers() { "subject", n => { Subject = n.GetStringValue(); } }, }; } + /// /// Serializes information the current object /// @@ -89,3 +77,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/AttributesInCreateEnrollmentRequest.cs b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/AttributesInCreateEnrollmentRequest.cs index a9926a8f4..13c7293f5 100644 --- a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/AttributesInCreateEnrollmentRequest.cs +++ b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/AttributesInCreateEnrollmentRequest.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -16,18 +18,21 @@ public partial class AttributesInCreateEnrollmentRequest : IBackedModel, IParsab { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The enrolledAt property public Date? EnrolledAt { get { return BackingStore?.Get("enrolledAt"); } set { BackingStore?.Set("enrolledAt", value); } } + /// The graduatedAt property public Date? GraduatedAt { get { return BackingStore?.Get("graduatedAt"); } set { BackingStore?.Set("graduatedAt", value); } } + /// /// Instantiates a new and sets the default values. /// @@ -35,6 +40,7 @@ public AttributesInCreateEnrollmentRequest() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -45,6 +51,7 @@ public AttributesInCreateEnrollmentRequest() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.AttributesInCreateEnrollmentRequest(); } + /// /// The deserialization information for the current model /// @@ -57,6 +64,7 @@ public virtual IDictionary> GetFieldDeserializers() { "graduatedAt", n => { GraduatedAt = n.GetDateValue(); } }, }; } + /// /// Serializes information the current object /// @@ -70,3 +78,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/AttributesInCreateStudentRequest.cs b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/AttributesInCreateStudentRequest.cs index be16cb05d..851b29a07 100644 --- a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/AttributesInCreateStudentRequest.cs +++ b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/AttributesInCreateStudentRequest.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,38 +17,21 @@ public partial class AttributesInCreateStudentRequest : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The emailAddress property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? EmailAddress { get { return BackingStore?.Get("emailAddress"); } set { BackingStore?.Set("emailAddress", value); } } -#nullable restore -#else - public string EmailAddress - { - get { return BackingStore?.Get("emailAddress"); } - set { BackingStore?.Set("emailAddress", value); } - } -#endif + /// The name property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Name { get { return BackingStore?.Get("name"); } set { BackingStore?.Set("name", value); } } -#nullable restore -#else - public string Name - { - get { return BackingStore?.Get("name"); } - set { BackingStore?.Set("name", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -54,6 +39,7 @@ public AttributesInCreateStudentRequest() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -64,6 +50,7 @@ public AttributesInCreateStudentRequest() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.AttributesInCreateStudentRequest(); } + /// /// The deserialization information for the current model /// @@ -76,6 +63,7 @@ public virtual IDictionary> GetFieldDeserializers() { "name", n => { Name = n.GetStringValue(); } }, }; } + /// /// Serializes information the current object /// @@ -89,3 +77,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/AttributesInCreateTeacherRequest.cs b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/AttributesInCreateTeacherRequest.cs index 271696677..016c0acd0 100644 --- a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/AttributesInCreateTeacherRequest.cs +++ b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/AttributesInCreateTeacherRequest.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,38 +17,21 @@ public partial class AttributesInCreateTeacherRequest : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The emailAddress property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? EmailAddress { get { return BackingStore?.Get("emailAddress"); } set { BackingStore?.Set("emailAddress", value); } } -#nullable restore -#else - public string EmailAddress - { - get { return BackingStore?.Get("emailAddress"); } - set { BackingStore?.Set("emailAddress", value); } - } -#endif + /// The name property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Name { get { return BackingStore?.Get("name"); } set { BackingStore?.Set("name", value); } } -#nullable restore -#else - public string Name - { - get { return BackingStore?.Get("name"); } - set { BackingStore?.Set("name", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -54,6 +39,7 @@ public AttributesInCreateTeacherRequest() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -64,6 +50,7 @@ public AttributesInCreateTeacherRequest() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.AttributesInCreateTeacherRequest(); } + /// /// The deserialization information for the current model /// @@ -76,6 +63,7 @@ public virtual IDictionary> GetFieldDeserializers() { "name", n => { Name = n.GetStringValue(); } }, }; } + /// /// Serializes information the current object /// @@ -89,3 +77,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/AttributesInUpdateCourseRequest.cs b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/AttributesInUpdateCourseRequest.cs index bfae42884..0355b58b7 100644 --- a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/AttributesInUpdateCourseRequest.cs +++ b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/AttributesInUpdateCourseRequest.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,38 +17,21 @@ public partial class AttributesInUpdateCourseRequest : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The description property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Description { get { return BackingStore?.Get("description"); } set { BackingStore?.Set("description", value); } } -#nullable restore -#else - public string Description - { - get { return BackingStore?.Get("description"); } - set { BackingStore?.Set("description", value); } - } -#endif + /// The subject property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Subject { get { return BackingStore?.Get("subject"); } set { BackingStore?.Set("subject", value); } } -#nullable restore -#else - public string Subject - { - get { return BackingStore?.Get("subject"); } - set { BackingStore?.Set("subject", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -54,6 +39,7 @@ public AttributesInUpdateCourseRequest() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -64,6 +50,7 @@ public AttributesInUpdateCourseRequest() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.AttributesInUpdateCourseRequest(); } + /// /// The deserialization information for the current model /// @@ -76,6 +63,7 @@ public virtual IDictionary> GetFieldDeserializers() { "subject", n => { Subject = n.GetStringValue(); } }, }; } + /// /// Serializes information the current object /// @@ -89,3 +77,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/AttributesInUpdateEnrollmentRequest.cs b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/AttributesInUpdateEnrollmentRequest.cs index 1559784eb..1b2c79c5d 100644 --- a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/AttributesInUpdateEnrollmentRequest.cs +++ b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/AttributesInUpdateEnrollmentRequest.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -16,18 +18,21 @@ public partial class AttributesInUpdateEnrollmentRequest : IBackedModel, IParsab { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The enrolledAt property public Date? EnrolledAt { get { return BackingStore?.Get("enrolledAt"); } set { BackingStore?.Set("enrolledAt", value); } } + /// The graduatedAt property public Date? GraduatedAt { get { return BackingStore?.Get("graduatedAt"); } set { BackingStore?.Set("graduatedAt", value); } } + /// /// Instantiates a new and sets the default values. /// @@ -35,6 +40,7 @@ public AttributesInUpdateEnrollmentRequest() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -45,6 +51,7 @@ public AttributesInUpdateEnrollmentRequest() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.AttributesInUpdateEnrollmentRequest(); } + /// /// The deserialization information for the current model /// @@ -57,6 +64,7 @@ public virtual IDictionary> GetFieldDeserializers() { "graduatedAt", n => { GraduatedAt = n.GetDateValue(); } }, }; } + /// /// Serializes information the current object /// @@ -70,3 +78,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/AttributesInUpdateStudentRequest.cs b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/AttributesInUpdateStudentRequest.cs index 8f13ec5af..2e29e2dc1 100644 --- a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/AttributesInUpdateStudentRequest.cs +++ b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/AttributesInUpdateStudentRequest.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,38 +17,21 @@ public partial class AttributesInUpdateStudentRequest : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The emailAddress property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? EmailAddress { get { return BackingStore?.Get("emailAddress"); } set { BackingStore?.Set("emailAddress", value); } } -#nullable restore -#else - public string EmailAddress - { - get { return BackingStore?.Get("emailAddress"); } - set { BackingStore?.Set("emailAddress", value); } - } -#endif + /// The name property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Name { get { return BackingStore?.Get("name"); } set { BackingStore?.Set("name", value); } } -#nullable restore -#else - public string Name - { - get { return BackingStore?.Get("name"); } - set { BackingStore?.Set("name", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -54,6 +39,7 @@ public AttributesInUpdateStudentRequest() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -64,6 +50,7 @@ public AttributesInUpdateStudentRequest() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.AttributesInUpdateStudentRequest(); } + /// /// The deserialization information for the current model /// @@ -76,6 +63,7 @@ public virtual IDictionary> GetFieldDeserializers() { "name", n => { Name = n.GetStringValue(); } }, }; } + /// /// Serializes information the current object /// @@ -89,3 +77,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/AttributesInUpdateTeacherRequest.cs b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/AttributesInUpdateTeacherRequest.cs index 608229e52..2f2ee30f1 100644 --- a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/AttributesInUpdateTeacherRequest.cs +++ b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/AttributesInUpdateTeacherRequest.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,38 +17,21 @@ public partial class AttributesInUpdateTeacherRequest : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The emailAddress property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? EmailAddress { get { return BackingStore?.Get("emailAddress"); } set { BackingStore?.Set("emailAddress", value); } } -#nullable restore -#else - public string EmailAddress - { - get { return BackingStore?.Get("emailAddress"); } - set { BackingStore?.Set("emailAddress", value); } - } -#endif + /// The name property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Name { get { return BackingStore?.Get("name"); } set { BackingStore?.Set("name", value); } } -#nullable restore -#else - public string Name - { - get { return BackingStore?.Get("name"); } - set { BackingStore?.Set("name", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -54,6 +39,7 @@ public AttributesInUpdateTeacherRequest() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -64,6 +50,7 @@ public AttributesInUpdateTeacherRequest() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.AttributesInUpdateTeacherRequest(); } + /// /// The deserialization information for the current model /// @@ -76,6 +63,7 @@ public virtual IDictionary> GetFieldDeserializers() { "name", n => { Name = n.GetStringValue(); } }, }; } + /// /// Serializes information the current object /// @@ -89,3 +77,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/CourseAttributesInResponse.cs b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/CourseAttributesInResponse.cs index 8f7869188..3e9919ece 100644 --- a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/CourseAttributesInResponse.cs +++ b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/CourseAttributesInResponse.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,38 +17,21 @@ public partial class CourseAttributesInResponse : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The description property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Description { get { return BackingStore?.Get("description"); } set { BackingStore?.Set("description", value); } } -#nullable restore -#else - public string Description - { - get { return BackingStore?.Get("description"); } - set { BackingStore?.Set("description", value); } - } -#endif + /// The subject property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Subject { get { return BackingStore?.Get("subject"); } set { BackingStore?.Set("subject", value); } } -#nullable restore -#else - public string Subject - { - get { return BackingStore?.Get("subject"); } - set { BackingStore?.Set("subject", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -54,6 +39,7 @@ public CourseAttributesInResponse() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -64,6 +50,7 @@ public CourseAttributesInResponse() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.CourseAttributesInResponse(); } + /// /// The deserialization information for the current model /// @@ -76,6 +63,7 @@ public virtual IDictionary> GetFieldDeserializers() { "subject", n => { Subject = n.GetStringValue(); } }, }; } + /// /// Serializes information the current object /// @@ -89,3 +77,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/CourseCollectionResponseDocument.cs b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/CourseCollectionResponseDocument.cs index 643271236..b1c024225 100644 --- a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/CourseCollectionResponseDocument.cs +++ b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/CourseCollectionResponseDocument.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,86 +17,42 @@ public partial class CourseCollectionResponseDocument : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The data property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public List? Data { get { return BackingStore?.Get?>("data"); } set { BackingStore?.Set("data", value); } } -#nullable restore -#else - public List Data - { - get { return BackingStore?.Get>("data"); } - set { BackingStore?.Set("data", value); } - } -#endif + /// The included property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public List? Included { get { return BackingStore?.Get?>("included"); } set { BackingStore?.Set("included", value); } } -#nullable restore -#else - public List Included - { - get { return BackingStore?.Get>("included"); } - set { BackingStore?.Set("included", value); } - } -#endif + /// The jsonapi property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Jsonapi? Jsonapi { get { return BackingStore?.Get("jsonapi"); } set { BackingStore?.Set("jsonapi", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Jsonapi Jsonapi - { - get { return BackingStore?.Get("jsonapi"); } - set { BackingStore?.Set("jsonapi", value); } - } -#endif + /// The links property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.ResourceCollectionTopLevelLinks? Links { get { return BackingStore?.Get("links"); } set { BackingStore?.Set("links", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.ResourceCollectionTopLevelLinks Links - { - get { return BackingStore?.Get("links"); } - set { BackingStore?.Set("links", value); } - } -#endif + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -102,6 +60,7 @@ public CourseCollectionResponseDocument() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -112,6 +71,7 @@ public CourseCollectionResponseDocument() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.CourseCollectionResponseDocument(); } + /// /// The deserialization information for the current model /// @@ -127,6 +87,7 @@ public virtual IDictionary> GetFieldDeserializers() { "meta", n => { Meta = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Meta.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -143,3 +104,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/CourseDataInResponse.cs b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/CourseDataInResponse.cs index d37a48219..49976205a 100644 --- a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/CourseDataInResponse.cs +++ b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/CourseDataInResponse.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -13,59 +15,33 @@ public partial class CourseDataInResponse : global::OpenApiKiotaEndToEndTests.At #pragma warning restore CS1591 { /// The attributes property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.CourseAttributesInResponse? Attributes { get { return BackingStore?.Get("attributes"); } set { BackingStore?.Set("attributes", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.CourseAttributesInResponse Attributes - { - get { return BackingStore?.Get("attributes"); } - set { BackingStore?.Set("attributes", value); } - } -#endif + /// The id property public Guid? Id { get { return BackingStore?.Get("id"); } set { BackingStore?.Set("id", value); } } + /// The links property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.ResourceLinks? Links { get { return BackingStore?.Get("links"); } set { BackingStore?.Set("links", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.ResourceLinks Links - { - get { return BackingStore?.Get("links"); } - set { BackingStore?.Set("links", value); } - } -#endif + /// The relationships property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.CourseRelationshipsInResponse? Relationships { get { return BackingStore?.Get("relationships"); } set { BackingStore?.Set("relationships", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.CourseRelationshipsInResponse Relationships - { - get { return BackingStore?.Get("relationships"); } - set { BackingStore?.Set("relationships", value); } - } -#endif + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -76,6 +52,7 @@ public Guid? Id _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.CourseDataInResponse(); } + /// /// The deserialization information for the current model /// @@ -90,6 +67,7 @@ public override IDictionary> GetFieldDeserializers() { "relationships", n => { Relationships = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.CourseRelationshipsInResponse.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -106,3 +84,4 @@ public override void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/CourseEnrollmentsRelationshipIdentifier.cs b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/CourseEnrollmentsRelationshipIdentifier.cs index 8b0e598fb..86fc652ba 100644 --- a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/CourseEnrollmentsRelationshipIdentifier.cs +++ b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/CourseEnrollmentsRelationshipIdentifier.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,40 +17,35 @@ public partial class CourseEnrollmentsRelationshipIdentifier : IBackedModel, IPa { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The id property public Guid? Id { get { return BackingStore?.Get("id"); } set { BackingStore?.Set("id", value); } } + /// The lid property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Lid { get { return BackingStore?.Get("lid"); } set { BackingStore?.Set("lid", value); } } -#nullable restore -#else - public string Lid - { - get { return BackingStore?.Get("lid"); } - set { BackingStore?.Set("lid", value); } - } -#endif + /// The relationship property public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.CourseEnrollmentsRelationshipName? Relationship { get { return BackingStore?.Get("relationship"); } set { BackingStore?.Set("relationship", value); } } + /// The type property public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.CourseResourceType? Type { get { return BackingStore?.Get("type"); } set { BackingStore?.Set("type", value); } } + /// /// Instantiates a new and sets the default values. /// @@ -56,6 +53,7 @@ public CourseEnrollmentsRelationshipIdentifier() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -66,6 +64,7 @@ public CourseEnrollmentsRelationshipIdentifier() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.CourseEnrollmentsRelationshipIdentifier(); } + /// /// The deserialization information for the current model /// @@ -80,6 +79,7 @@ public virtual IDictionary> GetFieldDeserializers() { "type", n => { Type = n.GetEnumValue(); } }, }; } + /// /// Serializes information the current object /// @@ -95,3 +95,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/CourseEnrollmentsRelationshipName.cs b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/CourseEnrollmentsRelationshipName.cs index 17ef41e3c..dff42eaca 100644 --- a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/CourseEnrollmentsRelationshipName.cs +++ b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/CourseEnrollmentsRelationshipName.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 using System.Runtime.Serialization; using System; namespace OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models @@ -14,3 +16,4 @@ public enum CourseEnrollmentsRelationshipName #pragma warning restore CS1591 } } + diff --git a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/CourseIdentifierCollectionResponseDocument.cs b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/CourseIdentifierCollectionResponseDocument.cs index 3febce546..aee8687fd 100644 --- a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/CourseIdentifierCollectionResponseDocument.cs +++ b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/CourseIdentifierCollectionResponseDocument.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,70 +17,35 @@ public partial class CourseIdentifierCollectionResponseDocument : IBackedModel, { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The data property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public List? Data { get { return BackingStore?.Get?>("data"); } set { BackingStore?.Set("data", value); } } -#nullable restore -#else - public List Data - { - get { return BackingStore?.Get>("data"); } - set { BackingStore?.Set("data", value); } - } -#endif + /// The jsonapi property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Jsonapi? Jsonapi { get { return BackingStore?.Get("jsonapi"); } set { BackingStore?.Set("jsonapi", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Jsonapi Jsonapi - { - get { return BackingStore?.Get("jsonapi"); } - set { BackingStore?.Set("jsonapi", value); } - } -#endif + /// The links property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.ResourceIdentifierCollectionTopLevelLinks? Links { get { return BackingStore?.Get("links"); } set { BackingStore?.Set("links", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.ResourceIdentifierCollectionTopLevelLinks Links - { - get { return BackingStore?.Get("links"); } - set { BackingStore?.Set("links", value); } - } -#endif + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -86,6 +53,7 @@ public CourseIdentifierCollectionResponseDocument() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -96,6 +64,7 @@ public CourseIdentifierCollectionResponseDocument() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.CourseIdentifierCollectionResponseDocument(); } + /// /// The deserialization information for the current model /// @@ -110,6 +79,7 @@ public virtual IDictionary> GetFieldDeserializers() { "meta", n => { Meta = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Meta.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -125,3 +95,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/CourseIdentifierInRequest.cs b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/CourseIdentifierInRequest.cs index 51e411f85..6ccb7fb95 100644 --- a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/CourseIdentifierInRequest.cs +++ b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/CourseIdentifierInRequest.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,50 +17,35 @@ public partial class CourseIdentifierInRequest : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The id property public Guid? Id { get { return BackingStore?.Get("id"); } set { BackingStore?.Set("id", value); } } + /// The lid property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Lid { get { return BackingStore?.Get("lid"); } set { BackingStore?.Set("lid", value); } } -#nullable restore -#else - public string Lid - { - get { return BackingStore?.Get("lid"); } - set { BackingStore?.Set("lid", value); } - } -#endif + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// The type property public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.CourseResourceType? Type { get { return BackingStore?.Get("type"); } set { BackingStore?.Set("type", value); } } + /// /// Instantiates a new and sets the default values. /// @@ -66,6 +53,7 @@ public CourseIdentifierInRequest() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -76,6 +64,7 @@ public CourseIdentifierInRequest() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.CourseIdentifierInRequest(); } + /// /// The deserialization information for the current model /// @@ -90,6 +79,7 @@ public virtual IDictionary> GetFieldDeserializers() { "type", n => { Type = n.GetEnumValue(); } }, }; } + /// /// Serializes information the current object /// @@ -105,3 +95,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/CourseIdentifierInResponse.cs b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/CourseIdentifierInResponse.cs index 7077d9f5e..e55a5c4de 100644 --- a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/CourseIdentifierInResponse.cs +++ b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/CourseIdentifierInResponse.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,34 +17,28 @@ public partial class CourseIdentifierInResponse : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The id property public Guid? Id { get { return BackingStore?.Get("id"); } set { BackingStore?.Set("id", value); } } + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// The type property public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.CourseResourceType? Type { get { return BackingStore?.Get("type"); } set { BackingStore?.Set("type", value); } } + /// /// Instantiates a new and sets the default values. /// @@ -50,6 +46,7 @@ public CourseIdentifierInResponse() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -60,6 +57,7 @@ public CourseIdentifierInResponse() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.CourseIdentifierInResponse(); } + /// /// The deserialization information for the current model /// @@ -73,6 +71,7 @@ public virtual IDictionary> GetFieldDeserializers() { "type", n => { Type = n.GetEnumValue(); } }, }; } + /// /// Serializes information the current object /// @@ -87,3 +86,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/CourseIdentifierResponseDocument.cs b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/CourseIdentifierResponseDocument.cs index 69c44a2de..784dfac2f 100644 --- a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/CourseIdentifierResponseDocument.cs +++ b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/CourseIdentifierResponseDocument.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,70 +17,35 @@ public partial class CourseIdentifierResponseDocument : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The data property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.CourseIdentifierInResponse? Data { get { return BackingStore?.Get("data"); } set { BackingStore?.Set("data", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.CourseIdentifierInResponse Data - { - get { return BackingStore?.Get("data"); } - set { BackingStore?.Set("data", value); } - } -#endif + /// The jsonapi property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Jsonapi? Jsonapi { get { return BackingStore?.Get("jsonapi"); } set { BackingStore?.Set("jsonapi", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Jsonapi Jsonapi - { - get { return BackingStore?.Get("jsonapi"); } - set { BackingStore?.Set("jsonapi", value); } - } -#endif + /// The links property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.ResourceIdentifierTopLevelLinks? Links { get { return BackingStore?.Get("links"); } set { BackingStore?.Set("links", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.ResourceIdentifierTopLevelLinks Links - { - get { return BackingStore?.Get("links"); } - set { BackingStore?.Set("links", value); } - } -#endif + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -86,6 +53,7 @@ public CourseIdentifierResponseDocument() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -96,6 +64,7 @@ public CourseIdentifierResponseDocument() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.CourseIdentifierResponseDocument(); } + /// /// The deserialization information for the current model /// @@ -110,6 +79,7 @@ public virtual IDictionary> GetFieldDeserializers() { "meta", n => { Meta = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Meta.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -125,3 +95,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/CoursePrimaryResponseDocument.cs b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/CoursePrimaryResponseDocument.cs index 1061dbd3e..165bd4b56 100644 --- a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/CoursePrimaryResponseDocument.cs +++ b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/CoursePrimaryResponseDocument.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,86 +17,42 @@ public partial class CoursePrimaryResponseDocument : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The data property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.CourseDataInResponse? Data { get { return BackingStore?.Get("data"); } set { BackingStore?.Set("data", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.CourseDataInResponse Data - { - get { return BackingStore?.Get("data"); } - set { BackingStore?.Set("data", value); } - } -#endif + /// The included property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public List? Included { get { return BackingStore?.Get?>("included"); } set { BackingStore?.Set("included", value); } } -#nullable restore -#else - public List Included - { - get { return BackingStore?.Get>("included"); } - set { BackingStore?.Set("included", value); } - } -#endif + /// The jsonapi property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Jsonapi? Jsonapi { get { return BackingStore?.Get("jsonapi"); } set { BackingStore?.Set("jsonapi", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Jsonapi Jsonapi - { - get { return BackingStore?.Get("jsonapi"); } - set { BackingStore?.Set("jsonapi", value); } - } -#endif + /// The links property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.ResourceTopLevelLinks? Links { get { return BackingStore?.Get("links"); } set { BackingStore?.Set("links", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.ResourceTopLevelLinks Links - { - get { return BackingStore?.Get("links"); } - set { BackingStore?.Set("links", value); } - } -#endif + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -102,6 +60,7 @@ public CoursePrimaryResponseDocument() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -112,6 +71,7 @@ public CoursePrimaryResponseDocument() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.CoursePrimaryResponseDocument(); } + /// /// The deserialization information for the current model /// @@ -127,6 +87,7 @@ public virtual IDictionary> GetFieldDeserializers() { "meta", n => { Meta = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Meta.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -143,3 +104,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/CourseRelationshipsInResponse.cs b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/CourseRelationshipsInResponse.cs index c80cc8268..e6ae41f7c 100644 --- a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/CourseRelationshipsInResponse.cs +++ b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/CourseRelationshipsInResponse.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,38 +17,21 @@ public partial class CourseRelationshipsInResponse : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The enrollments property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.ToManyEnrollmentInResponse? Enrollments { get { return BackingStore?.Get("enrollments"); } set { BackingStore?.Set("enrollments", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.ToManyEnrollmentInResponse Enrollments - { - get { return BackingStore?.Get("enrollments"); } - set { BackingStore?.Set("enrollments", value); } - } -#endif + /// The taughtBy property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.ToManyTeacherInResponse? TaughtBy { get { return BackingStore?.Get("taughtBy"); } set { BackingStore?.Set("taughtBy", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.ToManyTeacherInResponse TaughtBy - { - get { return BackingStore?.Get("taughtBy"); } - set { BackingStore?.Set("taughtBy", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -54,6 +39,7 @@ public CourseRelationshipsInResponse() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -64,6 +50,7 @@ public CourseRelationshipsInResponse() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.CourseRelationshipsInResponse(); } + /// /// The deserialization information for the current model /// @@ -76,6 +63,7 @@ public virtual IDictionary> GetFieldDeserializers() { "taughtBy", n => { TaughtBy = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.ToManyTeacherInResponse.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -89,3 +77,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/CourseResourceType.cs b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/CourseResourceType.cs index a5d893b5d..55ccc9b95 100644 --- a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/CourseResourceType.cs +++ b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/CourseResourceType.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 using System.Runtime.Serialization; using System; namespace OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models @@ -14,3 +16,4 @@ public enum CourseResourceType #pragma warning restore CS1591 } } + diff --git a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/CourseSecondaryResponseDocument.cs b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/CourseSecondaryResponseDocument.cs index 20bdf5cb1..46498d3ed 100644 --- a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/CourseSecondaryResponseDocument.cs +++ b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/CourseSecondaryResponseDocument.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,86 +17,42 @@ public partial class CourseSecondaryResponseDocument : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The data property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.CourseDataInResponse? Data { get { return BackingStore?.Get("data"); } set { BackingStore?.Set("data", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.CourseDataInResponse Data - { - get { return BackingStore?.Get("data"); } - set { BackingStore?.Set("data", value); } - } -#endif + /// The included property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public List? Included { get { return BackingStore?.Get?>("included"); } set { BackingStore?.Set("included", value); } } -#nullable restore -#else - public List Included - { - get { return BackingStore?.Get>("included"); } - set { BackingStore?.Set("included", value); } - } -#endif + /// The jsonapi property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Jsonapi? Jsonapi { get { return BackingStore?.Get("jsonapi"); } set { BackingStore?.Set("jsonapi", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Jsonapi Jsonapi - { - get { return BackingStore?.Get("jsonapi"); } - set { BackingStore?.Set("jsonapi", value); } - } -#endif + /// The links property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.ResourceTopLevelLinks? Links { get { return BackingStore?.Get("links"); } set { BackingStore?.Set("links", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.ResourceTopLevelLinks Links - { - get { return BackingStore?.Get("links"); } - set { BackingStore?.Set("links", value); } - } -#endif + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -102,6 +60,7 @@ public CourseSecondaryResponseDocument() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -112,6 +71,7 @@ public CourseSecondaryResponseDocument() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.CourseSecondaryResponseDocument(); } + /// /// The deserialization information for the current model /// @@ -127,6 +87,7 @@ public virtual IDictionary> GetFieldDeserializers() { "meta", n => { Meta = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Meta.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -143,3 +104,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/CourseTaughtByRelationshipIdentifier.cs b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/CourseTaughtByRelationshipIdentifier.cs index d6ac82176..3dfaf6ff3 100644 --- a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/CourseTaughtByRelationshipIdentifier.cs +++ b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/CourseTaughtByRelationshipIdentifier.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,40 +17,35 @@ public partial class CourseTaughtByRelationshipIdentifier : IBackedModel, IParsa { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The id property public Guid? Id { get { return BackingStore?.Get("id"); } set { BackingStore?.Set("id", value); } } + /// The lid property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Lid { get { return BackingStore?.Get("lid"); } set { BackingStore?.Set("lid", value); } } -#nullable restore -#else - public string Lid - { - get { return BackingStore?.Get("lid"); } - set { BackingStore?.Set("lid", value); } - } -#endif + /// The relationship property public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.CourseTaughtByRelationshipName? Relationship { get { return BackingStore?.Get("relationship"); } set { BackingStore?.Set("relationship", value); } } + /// The type property public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.CourseResourceType? Type { get { return BackingStore?.Get("type"); } set { BackingStore?.Set("type", value); } } + /// /// Instantiates a new and sets the default values. /// @@ -56,6 +53,7 @@ public CourseTaughtByRelationshipIdentifier() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -66,6 +64,7 @@ public CourseTaughtByRelationshipIdentifier() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.CourseTaughtByRelationshipIdentifier(); } + /// /// The deserialization information for the current model /// @@ -80,6 +79,7 @@ public virtual IDictionary> GetFieldDeserializers() { "type", n => { Type = n.GetEnumValue(); } }, }; } + /// /// Serializes information the current object /// @@ -95,3 +95,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/CourseTaughtByRelationshipName.cs b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/CourseTaughtByRelationshipName.cs index f487ee982..cb1f3f500 100644 --- a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/CourseTaughtByRelationshipName.cs +++ b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/CourseTaughtByRelationshipName.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 using System.Runtime.Serialization; using System; namespace OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models @@ -14,3 +16,4 @@ public enum CourseTaughtByRelationshipName #pragma warning restore CS1591 } } + diff --git a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/CreateCourseOperation.cs b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/CreateCourseOperation.cs index 5d27bb595..b356245e8 100644 --- a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/CreateCourseOperation.cs +++ b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/CreateCourseOperation.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -13,27 +15,19 @@ public partial class CreateCourseOperation : global::OpenApiKiotaEndToEndTests.A #pragma warning restore CS1591 { /// The data property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.DataInCreateCourseRequest? Data { get { return BackingStore?.Get("data"); } set { BackingStore?.Set("data", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.DataInCreateCourseRequest Data - { - get { return BackingStore?.Get("data"); } - set { BackingStore?.Set("data", value); } - } -#endif + /// The op property public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.AddOperationCode? Op { get { return BackingStore?.Get("op"); } set { BackingStore?.Set("op", value); } } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -44,6 +38,7 @@ public partial class CreateCourseOperation : global::OpenApiKiotaEndToEndTests.A _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.CreateCourseOperation(); } + /// /// The deserialization information for the current model /// @@ -56,6 +51,7 @@ public override IDictionary> GetFieldDeserializers() { "op", n => { Op = n.GetEnumValue(); } }, }; } + /// /// Serializes information the current object /// @@ -70,3 +66,4 @@ public override void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/CreateCourseRequestDocument.cs b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/CreateCourseRequestDocument.cs index 64df9c3fe..08241f9be 100644 --- a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/CreateCourseRequestDocument.cs +++ b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/CreateCourseRequestDocument.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,38 +17,21 @@ public partial class CreateCourseRequestDocument : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The data property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.DataInCreateCourseRequest? Data { get { return BackingStore?.Get("data"); } set { BackingStore?.Set("data", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.DataInCreateCourseRequest Data - { - get { return BackingStore?.Get("data"); } - set { BackingStore?.Set("data", value); } - } -#endif + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -54,6 +39,7 @@ public CreateCourseRequestDocument() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -64,6 +50,7 @@ public CreateCourseRequestDocument() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.CreateCourseRequestDocument(); } + /// /// The deserialization information for the current model /// @@ -76,6 +63,7 @@ public virtual IDictionary> GetFieldDeserializers() { "meta", n => { Meta = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Meta.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -89,3 +77,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/CreateEnrollmentOperation.cs b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/CreateEnrollmentOperation.cs index 32c0eeae3..6c8d53297 100644 --- a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/CreateEnrollmentOperation.cs +++ b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/CreateEnrollmentOperation.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -13,27 +15,19 @@ public partial class CreateEnrollmentOperation : global::OpenApiKiotaEndToEndTes #pragma warning restore CS1591 { /// The data property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.DataInCreateEnrollmentRequest? Data { get { return BackingStore?.Get("data"); } set { BackingStore?.Set("data", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.DataInCreateEnrollmentRequest Data - { - get { return BackingStore?.Get("data"); } - set { BackingStore?.Set("data", value); } - } -#endif + /// The op property public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.AddOperationCode? Op { get { return BackingStore?.Get("op"); } set { BackingStore?.Set("op", value); } } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -44,6 +38,7 @@ public partial class CreateEnrollmentOperation : global::OpenApiKiotaEndToEndTes _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.CreateEnrollmentOperation(); } + /// /// The deserialization information for the current model /// @@ -56,6 +51,7 @@ public override IDictionary> GetFieldDeserializers() { "op", n => { Op = n.GetEnumValue(); } }, }; } + /// /// Serializes information the current object /// @@ -70,3 +66,4 @@ public override void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/CreateEnrollmentRequestDocument.cs b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/CreateEnrollmentRequestDocument.cs index 5aee9b725..e3d875a83 100644 --- a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/CreateEnrollmentRequestDocument.cs +++ b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/CreateEnrollmentRequestDocument.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,38 +17,21 @@ public partial class CreateEnrollmentRequestDocument : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The data property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.DataInCreateEnrollmentRequest? Data { get { return BackingStore?.Get("data"); } set { BackingStore?.Set("data", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.DataInCreateEnrollmentRequest Data - { - get { return BackingStore?.Get("data"); } - set { BackingStore?.Set("data", value); } - } -#endif + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -54,6 +39,7 @@ public CreateEnrollmentRequestDocument() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -64,6 +50,7 @@ public CreateEnrollmentRequestDocument() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.CreateEnrollmentRequestDocument(); } + /// /// The deserialization information for the current model /// @@ -76,6 +63,7 @@ public virtual IDictionary> GetFieldDeserializers() { "meta", n => { Meta = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Meta.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -89,3 +77,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/CreateStudentOperation.cs b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/CreateStudentOperation.cs index 9f9f894dc..47597b6cd 100644 --- a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/CreateStudentOperation.cs +++ b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/CreateStudentOperation.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -13,27 +15,19 @@ public partial class CreateStudentOperation : global::OpenApiKiotaEndToEndTests. #pragma warning restore CS1591 { /// The data property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.DataInCreateStudentRequest? Data { get { return BackingStore?.Get("data"); } set { BackingStore?.Set("data", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.DataInCreateStudentRequest Data - { - get { return BackingStore?.Get("data"); } - set { BackingStore?.Set("data", value); } - } -#endif + /// The op property public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.AddOperationCode? Op { get { return BackingStore?.Get("op"); } set { BackingStore?.Set("op", value); } } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -44,6 +38,7 @@ public partial class CreateStudentOperation : global::OpenApiKiotaEndToEndTests. _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.CreateStudentOperation(); } + /// /// The deserialization information for the current model /// @@ -56,6 +51,7 @@ public override IDictionary> GetFieldDeserializers() { "op", n => { Op = n.GetEnumValue(); } }, }; } + /// /// Serializes information the current object /// @@ -70,3 +66,4 @@ public override void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/CreateStudentRequestDocument.cs b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/CreateStudentRequestDocument.cs index d4cd43578..6f0369442 100644 --- a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/CreateStudentRequestDocument.cs +++ b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/CreateStudentRequestDocument.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,38 +17,21 @@ public partial class CreateStudentRequestDocument : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The data property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.DataInCreateStudentRequest? Data { get { return BackingStore?.Get("data"); } set { BackingStore?.Set("data", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.DataInCreateStudentRequest Data - { - get { return BackingStore?.Get("data"); } - set { BackingStore?.Set("data", value); } - } -#endif + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -54,6 +39,7 @@ public CreateStudentRequestDocument() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -64,6 +50,7 @@ public CreateStudentRequestDocument() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.CreateStudentRequestDocument(); } + /// /// The deserialization information for the current model /// @@ -76,6 +63,7 @@ public virtual IDictionary> GetFieldDeserializers() { "meta", n => { Meta = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Meta.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -89,3 +77,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/CreateTeacherOperation.cs b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/CreateTeacherOperation.cs index 1762b40cb..a7cec8d50 100644 --- a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/CreateTeacherOperation.cs +++ b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/CreateTeacherOperation.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -13,27 +15,19 @@ public partial class CreateTeacherOperation : global::OpenApiKiotaEndToEndTests. #pragma warning restore CS1591 { /// The data property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.DataInCreateTeacherRequest? Data { get { return BackingStore?.Get("data"); } set { BackingStore?.Set("data", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.DataInCreateTeacherRequest Data - { - get { return BackingStore?.Get("data"); } - set { BackingStore?.Set("data", value); } - } -#endif + /// The op property public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.AddOperationCode? Op { get { return BackingStore?.Get("op"); } set { BackingStore?.Set("op", value); } } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -44,6 +38,7 @@ public partial class CreateTeacherOperation : global::OpenApiKiotaEndToEndTests. _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.CreateTeacherOperation(); } + /// /// The deserialization information for the current model /// @@ -56,6 +51,7 @@ public override IDictionary> GetFieldDeserializers() { "op", n => { Op = n.GetEnumValue(); } }, }; } + /// /// Serializes information the current object /// @@ -70,3 +66,4 @@ public override void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/CreateTeacherRequestDocument.cs b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/CreateTeacherRequestDocument.cs index 8ff49fd38..06c68caa5 100644 --- a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/CreateTeacherRequestDocument.cs +++ b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/CreateTeacherRequestDocument.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,38 +17,21 @@ public partial class CreateTeacherRequestDocument : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The data property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.DataInCreateTeacherRequest? Data { get { return BackingStore?.Get("data"); } set { BackingStore?.Set("data", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.DataInCreateTeacherRequest Data - { - get { return BackingStore?.Get("data"); } - set { BackingStore?.Set("data", value); } - } -#endif + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -54,6 +39,7 @@ public CreateTeacherRequestDocument() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -64,6 +50,7 @@ public CreateTeacherRequestDocument() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.CreateTeacherRequestDocument(); } + /// /// The deserialization information for the current model /// @@ -76,6 +63,7 @@ public virtual IDictionary> GetFieldDeserializers() { "meta", n => { Meta = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Meta.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -89,3 +77,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/DataInCreateCourseRequest.cs b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/DataInCreateCourseRequest.cs index c70efa0b3..75d6f5abd 100644 --- a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/DataInCreateCourseRequest.cs +++ b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/DataInCreateCourseRequest.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -14,67 +16,43 @@ public partial class DataInCreateCourseRequest : IBackedModel, IParsable #pragma warning restore CS1591 { /// The attributes property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.AttributesInCreateCourseRequest? Attributes { get { return BackingStore?.Get("attributes"); } set { BackingStore?.Set("attributes", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.AttributesInCreateCourseRequest Attributes - { - get { return BackingStore?.Get("attributes"); } - set { BackingStore?.Set("attributes", value); } - } -#endif + /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The id property public Guid? Id { get { return BackingStore?.Get("id"); } set { BackingStore?.Set("id", value); } } + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// The relationships property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.RelationshipsInCreateCourseRequest? Relationships { get { return BackingStore?.Get("relationships"); } set { BackingStore?.Set("relationships", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.RelationshipsInCreateCourseRequest Relationships - { - get { return BackingStore?.Get("relationships"); } - set { BackingStore?.Set("relationships", value); } - } -#endif + /// The type property public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.CourseResourceType? Type { get { return BackingStore?.Get("type"); } set { BackingStore?.Set("type", value); } } + /// /// Instantiates a new and sets the default values. /// @@ -82,6 +60,7 @@ public DataInCreateCourseRequest() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -92,6 +71,7 @@ public DataInCreateCourseRequest() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.DataInCreateCourseRequest(); } + /// /// The deserialization information for the current model /// @@ -107,6 +87,7 @@ public virtual IDictionary> GetFieldDeserializers() { "type", n => { Type = n.GetEnumValue(); } }, }; } + /// /// Serializes information the current object /// @@ -123,3 +104,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/DataInCreateEnrollmentRequest.cs b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/DataInCreateEnrollmentRequest.cs index 5dc96eb3d..e6f11a6da 100644 --- a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/DataInCreateEnrollmentRequest.cs +++ b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/DataInCreateEnrollmentRequest.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -14,77 +16,43 @@ public partial class DataInCreateEnrollmentRequest : IBackedModel, IParsable #pragma warning restore CS1591 { /// The attributes property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.AttributesInCreateEnrollmentRequest? Attributes { get { return BackingStore?.Get("attributes"); } set { BackingStore?.Set("attributes", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.AttributesInCreateEnrollmentRequest Attributes - { - get { return BackingStore?.Get("attributes"); } - set { BackingStore?.Set("attributes", value); } - } -#endif + /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The lid property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Lid { get { return BackingStore?.Get("lid"); } set { BackingStore?.Set("lid", value); } } -#nullable restore -#else - public string Lid - { - get { return BackingStore?.Get("lid"); } - set { BackingStore?.Set("lid", value); } - } -#endif + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// The relationships property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.RelationshipsInCreateEnrollmentRequest? Relationships { get { return BackingStore?.Get("relationships"); } set { BackingStore?.Set("relationships", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.RelationshipsInCreateEnrollmentRequest Relationships - { - get { return BackingStore?.Get("relationships"); } - set { BackingStore?.Set("relationships", value); } - } -#endif + /// The type property public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.EnrollmentResourceType? Type { get { return BackingStore?.Get("type"); } set { BackingStore?.Set("type", value); } } + /// /// Instantiates a new and sets the default values. /// @@ -92,6 +60,7 @@ public DataInCreateEnrollmentRequest() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -102,6 +71,7 @@ public DataInCreateEnrollmentRequest() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.DataInCreateEnrollmentRequest(); } + /// /// The deserialization information for the current model /// @@ -117,6 +87,7 @@ public virtual IDictionary> GetFieldDeserializers() { "type", n => { Type = n.GetEnumValue(); } }, }; } + /// /// Serializes information the current object /// @@ -133,3 +104,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/DataInCreateStudentRequest.cs b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/DataInCreateStudentRequest.cs index 1c7076216..135982c27 100644 --- a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/DataInCreateStudentRequest.cs +++ b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/DataInCreateStudentRequest.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -14,77 +16,43 @@ public partial class DataInCreateStudentRequest : IBackedModel, IParsable #pragma warning restore CS1591 { /// The attributes property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.AttributesInCreateStudentRequest? Attributes { get { return BackingStore?.Get("attributes"); } set { BackingStore?.Set("attributes", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.AttributesInCreateStudentRequest Attributes - { - get { return BackingStore?.Get("attributes"); } - set { BackingStore?.Set("attributes", value); } - } -#endif + /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The lid property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Lid { get { return BackingStore?.Get("lid"); } set { BackingStore?.Set("lid", value); } } -#nullable restore -#else - public string Lid - { - get { return BackingStore?.Get("lid"); } - set { BackingStore?.Set("lid", value); } - } -#endif + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// The relationships property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.RelationshipsInCreateStudentRequest? Relationships { get { return BackingStore?.Get("relationships"); } set { BackingStore?.Set("relationships", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.RelationshipsInCreateStudentRequest Relationships - { - get { return BackingStore?.Get("relationships"); } - set { BackingStore?.Set("relationships", value); } - } -#endif + /// The type property public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.StudentResourceType? Type { get { return BackingStore?.Get("type"); } set { BackingStore?.Set("type", value); } } + /// /// Instantiates a new and sets the default values. /// @@ -92,6 +60,7 @@ public DataInCreateStudentRequest() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -102,6 +71,7 @@ public DataInCreateStudentRequest() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.DataInCreateStudentRequest(); } + /// /// The deserialization information for the current model /// @@ -117,6 +87,7 @@ public virtual IDictionary> GetFieldDeserializers() { "type", n => { Type = n.GetEnumValue(); } }, }; } + /// /// Serializes information the current object /// @@ -133,3 +104,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/DataInCreateTeacherRequest.cs b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/DataInCreateTeacherRequest.cs index 12799c3e5..3db4c4f12 100644 --- a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/DataInCreateTeacherRequest.cs +++ b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/DataInCreateTeacherRequest.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -14,77 +16,43 @@ public partial class DataInCreateTeacherRequest : IBackedModel, IParsable #pragma warning restore CS1591 { /// The attributes property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.AttributesInCreateTeacherRequest? Attributes { get { return BackingStore?.Get("attributes"); } set { BackingStore?.Set("attributes", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.AttributesInCreateTeacherRequest Attributes - { - get { return BackingStore?.Get("attributes"); } - set { BackingStore?.Set("attributes", value); } - } -#endif + /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The lid property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Lid { get { return BackingStore?.Get("lid"); } set { BackingStore?.Set("lid", value); } } -#nullable restore -#else - public string Lid - { - get { return BackingStore?.Get("lid"); } - set { BackingStore?.Set("lid", value); } - } -#endif + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// The relationships property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.RelationshipsInCreateTeacherRequest? Relationships { get { return BackingStore?.Get("relationships"); } set { BackingStore?.Set("relationships", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.RelationshipsInCreateTeacherRequest Relationships - { - get { return BackingStore?.Get("relationships"); } - set { BackingStore?.Set("relationships", value); } - } -#endif + /// The type property public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.TeacherResourceType? Type { get { return BackingStore?.Get("type"); } set { BackingStore?.Set("type", value); } } + /// /// Instantiates a new and sets the default values. /// @@ -92,6 +60,7 @@ public DataInCreateTeacherRequest() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -102,6 +71,7 @@ public DataInCreateTeacherRequest() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.DataInCreateTeacherRequest(); } + /// /// The deserialization information for the current model /// @@ -117,6 +87,7 @@ public virtual IDictionary> GetFieldDeserializers() { "type", n => { Type = n.GetEnumValue(); } }, }; } + /// /// Serializes information the current object /// @@ -133,3 +104,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/DataInResponse.cs b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/DataInResponse.cs index e929b56c3..f820c9da0 100644 --- a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/DataInResponse.cs +++ b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/DataInResponse.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,28 +17,21 @@ public partial class DataInResponse : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// The type property public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.ResourceType? Type { get { return BackingStore?.Get("type"); } set { BackingStore?.Set("type", value); } } + /// /// Instantiates a new and sets the default values. /// @@ -44,6 +39,7 @@ public DataInResponse() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -62,6 +58,7 @@ public DataInResponse() _ => new global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.DataInResponse(), }; } + /// /// The deserialization information for the current model /// @@ -74,6 +71,7 @@ public virtual IDictionary> GetFieldDeserializers() { "type", n => { Type = n.GetEnumValue(); } }, }; } + /// /// Serializes information the current object /// @@ -87,3 +85,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/DataInUpdateCourseRequest.cs b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/DataInUpdateCourseRequest.cs index 66f067541..114f36c4f 100644 --- a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/DataInUpdateCourseRequest.cs +++ b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/DataInUpdateCourseRequest.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -14,83 +16,50 @@ public partial class DataInUpdateCourseRequest : IBackedModel, IParsable #pragma warning restore CS1591 { /// The attributes property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.AttributesInUpdateCourseRequest? Attributes { get { return BackingStore?.Get("attributes"); } set { BackingStore?.Set("attributes", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.AttributesInUpdateCourseRequest Attributes - { - get { return BackingStore?.Get("attributes"); } - set { BackingStore?.Set("attributes", value); } - } -#endif + /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The id property public Guid? Id { get { return BackingStore?.Get("id"); } set { BackingStore?.Set("id", value); } } + /// The lid property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Lid { get { return BackingStore?.Get("lid"); } set { BackingStore?.Set("lid", value); } } -#nullable restore -#else - public string Lid - { - get { return BackingStore?.Get("lid"); } - set { BackingStore?.Set("lid", value); } - } -#endif + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// The relationships property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.RelationshipsInUpdateCourseRequest? Relationships { get { return BackingStore?.Get("relationships"); } set { BackingStore?.Set("relationships", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.RelationshipsInUpdateCourseRequest Relationships - { - get { return BackingStore?.Get("relationships"); } - set { BackingStore?.Set("relationships", value); } - } -#endif + /// The type property public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.CourseResourceType? Type { get { return BackingStore?.Get("type"); } set { BackingStore?.Set("type", value); } } + /// /// Instantiates a new and sets the default values. /// @@ -98,6 +67,7 @@ public DataInUpdateCourseRequest() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -108,6 +78,7 @@ public DataInUpdateCourseRequest() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.DataInUpdateCourseRequest(); } + /// /// The deserialization information for the current model /// @@ -124,6 +95,7 @@ public virtual IDictionary> GetFieldDeserializers() { "type", n => { Type = n.GetEnumValue(); } }, }; } + /// /// Serializes information the current object /// @@ -141,3 +113,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/DataInUpdateEnrollmentRequest.cs b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/DataInUpdateEnrollmentRequest.cs index 1d6e6daeb..64c134ea8 100644 --- a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/DataInUpdateEnrollmentRequest.cs +++ b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/DataInUpdateEnrollmentRequest.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -14,93 +16,50 @@ public partial class DataInUpdateEnrollmentRequest : IBackedModel, IParsable #pragma warning restore CS1591 { /// The attributes property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.AttributesInUpdateEnrollmentRequest? Attributes { get { return BackingStore?.Get("attributes"); } set { BackingStore?.Set("attributes", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.AttributesInUpdateEnrollmentRequest Attributes - { - get { return BackingStore?.Get("attributes"); } - set { BackingStore?.Set("attributes", value); } - } -#endif + /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The id property -#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 lid property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Lid { get { return BackingStore?.Get("lid"); } set { BackingStore?.Set("lid", value); } } -#nullable restore -#else - public string Lid - { - get { return BackingStore?.Get("lid"); } - set { BackingStore?.Set("lid", value); } - } -#endif + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// The relationships property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.RelationshipsInUpdateEnrollmentRequest? Relationships { get { return BackingStore?.Get("relationships"); } set { BackingStore?.Set("relationships", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.RelationshipsInUpdateEnrollmentRequest Relationships - { - get { return BackingStore?.Get("relationships"); } - set { BackingStore?.Set("relationships", value); } - } -#endif + /// The type property public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.EnrollmentResourceType? Type { get { return BackingStore?.Get("type"); } set { BackingStore?.Set("type", value); } } + /// /// Instantiates a new and sets the default values. /// @@ -108,6 +67,7 @@ public DataInUpdateEnrollmentRequest() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -118,6 +78,7 @@ public DataInUpdateEnrollmentRequest() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.DataInUpdateEnrollmentRequest(); } + /// /// The deserialization information for the current model /// @@ -134,6 +95,7 @@ public virtual IDictionary> GetFieldDeserializers() { "type", n => { Type = n.GetEnumValue(); } }, }; } + /// /// Serializes information the current object /// @@ -151,3 +113,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/DataInUpdateStudentRequest.cs b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/DataInUpdateStudentRequest.cs index 96e5f5a28..531d46ddc 100644 --- a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/DataInUpdateStudentRequest.cs +++ b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/DataInUpdateStudentRequest.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -14,93 +16,50 @@ public partial class DataInUpdateStudentRequest : IBackedModel, IParsable #pragma warning restore CS1591 { /// The attributes property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.AttributesInUpdateStudentRequest? Attributes { get { return BackingStore?.Get("attributes"); } set { BackingStore?.Set("attributes", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.AttributesInUpdateStudentRequest Attributes - { - get { return BackingStore?.Get("attributes"); } - set { BackingStore?.Set("attributes", value); } - } -#endif + /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The id property -#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 lid property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Lid { get { return BackingStore?.Get("lid"); } set { BackingStore?.Set("lid", value); } } -#nullable restore -#else - public string Lid - { - get { return BackingStore?.Get("lid"); } - set { BackingStore?.Set("lid", value); } - } -#endif + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// The relationships property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.RelationshipsInUpdateStudentRequest? Relationships { get { return BackingStore?.Get("relationships"); } set { BackingStore?.Set("relationships", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.RelationshipsInUpdateStudentRequest Relationships - { - get { return BackingStore?.Get("relationships"); } - set { BackingStore?.Set("relationships", value); } - } -#endif + /// The type property public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.StudentResourceType? Type { get { return BackingStore?.Get("type"); } set { BackingStore?.Set("type", value); } } + /// /// Instantiates a new and sets the default values. /// @@ -108,6 +67,7 @@ public DataInUpdateStudentRequest() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -118,6 +78,7 @@ public DataInUpdateStudentRequest() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.DataInUpdateStudentRequest(); } + /// /// The deserialization information for the current model /// @@ -134,6 +95,7 @@ public virtual IDictionary> GetFieldDeserializers() { "type", n => { Type = n.GetEnumValue(); } }, }; } + /// /// Serializes information the current object /// @@ -151,3 +113,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/DataInUpdateTeacherRequest.cs b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/DataInUpdateTeacherRequest.cs index 97cd1f410..c086472ae 100644 --- a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/DataInUpdateTeacherRequest.cs +++ b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/DataInUpdateTeacherRequest.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -14,93 +16,50 @@ public partial class DataInUpdateTeacherRequest : IBackedModel, IParsable #pragma warning restore CS1591 { /// The attributes property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.AttributesInUpdateTeacherRequest? Attributes { get { return BackingStore?.Get("attributes"); } set { BackingStore?.Set("attributes", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.AttributesInUpdateTeacherRequest Attributes - { - get { return BackingStore?.Get("attributes"); } - set { BackingStore?.Set("attributes", value); } - } -#endif + /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The id property -#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 lid property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Lid { get { return BackingStore?.Get("lid"); } set { BackingStore?.Set("lid", value); } } -#nullable restore -#else - public string Lid - { - get { return BackingStore?.Get("lid"); } - set { BackingStore?.Set("lid", value); } - } -#endif + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// The relationships property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.RelationshipsInUpdateTeacherRequest? Relationships { get { return BackingStore?.Get("relationships"); } set { BackingStore?.Set("relationships", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.RelationshipsInUpdateTeacherRequest Relationships - { - get { return BackingStore?.Get("relationships"); } - set { BackingStore?.Set("relationships", value); } - } -#endif + /// The type property public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.TeacherResourceType? Type { get { return BackingStore?.Get("type"); } set { BackingStore?.Set("type", value); } } + /// /// Instantiates a new and sets the default values. /// @@ -108,6 +67,7 @@ public DataInUpdateTeacherRequest() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -118,6 +78,7 @@ public DataInUpdateTeacherRequest() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.DataInUpdateTeacherRequest(); } + /// /// The deserialization information for the current model /// @@ -134,6 +95,7 @@ public virtual IDictionary> GetFieldDeserializers() { "type", n => { Type = n.GetEnumValue(); } }, }; } + /// /// Serializes information the current object /// @@ -151,3 +113,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/DeleteCourseOperation.cs b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/DeleteCourseOperation.cs index fc805bfc3..e3948ae73 100644 --- a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/DeleteCourseOperation.cs +++ b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/DeleteCourseOperation.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -18,22 +20,14 @@ public partial class DeleteCourseOperation : global::OpenApiKiotaEndToEndTests.A get { return BackingStore?.Get("op"); } set { BackingStore?.Set("op", value); } } + /// The ref property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.CourseIdentifierInRequest? Ref { get { return BackingStore?.Get("ref"); } set { BackingStore?.Set("ref", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.CourseIdentifierInRequest Ref - { - get { return BackingStore?.Get("ref"); } - set { BackingStore?.Set("ref", value); } - } -#endif + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -44,6 +38,7 @@ public partial class DeleteCourseOperation : global::OpenApiKiotaEndToEndTests.A _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.DeleteCourseOperation(); } + /// /// The deserialization information for the current model /// @@ -56,6 +51,7 @@ public override IDictionary> GetFieldDeserializers() { "ref", n => { Ref = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.CourseIdentifierInRequest.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -70,3 +66,4 @@ public override void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/DeleteEnrollmentOperation.cs b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/DeleteEnrollmentOperation.cs index 8cdb4a5fc..78f2f485d 100644 --- a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/DeleteEnrollmentOperation.cs +++ b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/DeleteEnrollmentOperation.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -18,22 +20,14 @@ public partial class DeleteEnrollmentOperation : global::OpenApiKiotaEndToEndTes get { return BackingStore?.Get("op"); } set { BackingStore?.Set("op", value); } } + /// The ref property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.EnrollmentIdentifierInRequest? Ref { get { return BackingStore?.Get("ref"); } set { BackingStore?.Set("ref", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.EnrollmentIdentifierInRequest Ref - { - get { return BackingStore?.Get("ref"); } - set { BackingStore?.Set("ref", value); } - } -#endif + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -44,6 +38,7 @@ public partial class DeleteEnrollmentOperation : global::OpenApiKiotaEndToEndTes _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.DeleteEnrollmentOperation(); } + /// /// The deserialization information for the current model /// @@ -56,6 +51,7 @@ public override IDictionary> GetFieldDeserializers() { "ref", n => { Ref = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.EnrollmentIdentifierInRequest.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -70,3 +66,4 @@ public override void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/DeleteTeacherOperation.cs b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/DeleteTeacherOperation.cs index db7946b9d..22975b23d 100644 --- a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/DeleteTeacherOperation.cs +++ b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/DeleteTeacherOperation.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -18,22 +20,14 @@ public partial class DeleteTeacherOperation : global::OpenApiKiotaEndToEndTests. get { return BackingStore?.Get("op"); } set { BackingStore?.Set("op", value); } } + /// The ref property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.TeacherIdentifierInRequest? Ref { get { return BackingStore?.Get("ref"); } set { BackingStore?.Set("ref", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.TeacherIdentifierInRequest Ref - { - get { return BackingStore?.Get("ref"); } - set { BackingStore?.Set("ref", value); } - } -#endif + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -44,6 +38,7 @@ public partial class DeleteTeacherOperation : global::OpenApiKiotaEndToEndTests. _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.DeleteTeacherOperation(); } + /// /// The deserialization information for the current model /// @@ -56,6 +51,7 @@ public override IDictionary> GetFieldDeserializers() { "ref", n => { Ref = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.TeacherIdentifierInRequest.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -70,3 +66,4 @@ public override void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/EnrollmentAttributesInResponse.cs b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/EnrollmentAttributesInResponse.cs index 0fff776ec..1d779c219 100644 --- a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/EnrollmentAttributesInResponse.cs +++ b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/EnrollmentAttributesInResponse.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -16,24 +18,28 @@ public partial class EnrollmentAttributesInResponse : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The enrolledAt property public Date? EnrolledAt { get { return BackingStore?.Get("enrolledAt"); } set { BackingStore?.Set("enrolledAt", value); } } + /// The graduatedAt property public Date? GraduatedAt { get { return BackingStore?.Get("graduatedAt"); } set { BackingStore?.Set("graduatedAt", value); } } + /// The hasGraduated property public bool? HasGraduated { get { return BackingStore?.Get("hasGraduated"); } set { BackingStore?.Set("hasGraduated", value); } } + /// /// Instantiates a new and sets the default values. /// @@ -41,6 +47,7 @@ public EnrollmentAttributesInResponse() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -51,6 +58,7 @@ public EnrollmentAttributesInResponse() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.EnrollmentAttributesInResponse(); } + /// /// The deserialization information for the current model /// @@ -64,6 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() { "hasGraduated", n => { HasGraduated = n.GetBoolValue(); } }, }; } + /// /// Serializes information the current object /// @@ -77,3 +86,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/EnrollmentCollectionResponseDocument.cs b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/EnrollmentCollectionResponseDocument.cs index 52fd2d168..a25937f55 100644 --- a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/EnrollmentCollectionResponseDocument.cs +++ b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/EnrollmentCollectionResponseDocument.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,86 +17,42 @@ public partial class EnrollmentCollectionResponseDocument : IBackedModel, IParsa { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The data property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public List? Data { get { return BackingStore?.Get?>("data"); } set { BackingStore?.Set("data", value); } } -#nullable restore -#else - public List Data - { - get { return BackingStore?.Get>("data"); } - set { BackingStore?.Set("data", value); } - } -#endif + /// The included property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public List? Included { get { return BackingStore?.Get?>("included"); } set { BackingStore?.Set("included", value); } } -#nullable restore -#else - public List Included - { - get { return BackingStore?.Get>("included"); } - set { BackingStore?.Set("included", value); } - } -#endif + /// The jsonapi property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Jsonapi? Jsonapi { get { return BackingStore?.Get("jsonapi"); } set { BackingStore?.Set("jsonapi", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Jsonapi Jsonapi - { - get { return BackingStore?.Get("jsonapi"); } - set { BackingStore?.Set("jsonapi", value); } - } -#endif + /// The links property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.ResourceCollectionTopLevelLinks? Links { get { return BackingStore?.Get("links"); } set { BackingStore?.Set("links", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.ResourceCollectionTopLevelLinks Links - { - get { return BackingStore?.Get("links"); } - set { BackingStore?.Set("links", value); } - } -#endif + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -102,6 +60,7 @@ public EnrollmentCollectionResponseDocument() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -112,6 +71,7 @@ public EnrollmentCollectionResponseDocument() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.EnrollmentCollectionResponseDocument(); } + /// /// The deserialization information for the current model /// @@ -127,6 +87,7 @@ public virtual IDictionary> GetFieldDeserializers() { "meta", n => { Meta = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Meta.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -143,3 +104,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/EnrollmentCourseRelationshipIdentifier.cs b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/EnrollmentCourseRelationshipIdentifier.cs index c804f92c2..46b2c2245 100644 --- a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/EnrollmentCourseRelationshipIdentifier.cs +++ b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/EnrollmentCourseRelationshipIdentifier.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,50 +17,35 @@ public partial class EnrollmentCourseRelationshipIdentifier : IBackedModel, IPar { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The id property -#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 lid property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Lid { get { return BackingStore?.Get("lid"); } set { BackingStore?.Set("lid", value); } } -#nullable restore -#else - public string Lid - { - get { return BackingStore?.Get("lid"); } - set { BackingStore?.Set("lid", value); } - } -#endif + /// The relationship property public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.EnrollmentCourseRelationshipName? Relationship { get { return BackingStore?.Get("relationship"); } set { BackingStore?.Set("relationship", value); } } + /// The type property public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.EnrollmentResourceType? Type { get { return BackingStore?.Get("type"); } set { BackingStore?.Set("type", value); } } + /// /// Instantiates a new and sets the default values. /// @@ -66,6 +53,7 @@ public EnrollmentCourseRelationshipIdentifier() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -76,6 +64,7 @@ public EnrollmentCourseRelationshipIdentifier() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.EnrollmentCourseRelationshipIdentifier(); } + /// /// The deserialization information for the current model /// @@ -90,6 +79,7 @@ public virtual IDictionary> GetFieldDeserializers() { "type", n => { Type = n.GetEnumValue(); } }, }; } + /// /// Serializes information the current object /// @@ -105,3 +95,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/EnrollmentCourseRelationshipName.cs b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/EnrollmentCourseRelationshipName.cs index 1b850fb23..d6cdbd02a 100644 --- a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/EnrollmentCourseRelationshipName.cs +++ b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/EnrollmentCourseRelationshipName.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 using System.Runtime.Serialization; using System; namespace OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models @@ -14,3 +16,4 @@ public enum EnrollmentCourseRelationshipName #pragma warning restore CS1591 } } + diff --git a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/EnrollmentDataInResponse.cs b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/EnrollmentDataInResponse.cs index 4879f3201..26ff58ac0 100644 --- a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/EnrollmentDataInResponse.cs +++ b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/EnrollmentDataInResponse.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -13,69 +15,33 @@ public partial class EnrollmentDataInResponse : global::OpenApiKiotaEndToEndTest #pragma warning restore CS1591 { /// The attributes property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.EnrollmentAttributesInResponse? Attributes { get { return BackingStore?.Get("attributes"); } set { BackingStore?.Set("attributes", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.EnrollmentAttributesInResponse Attributes - { - get { return BackingStore?.Get("attributes"); } - set { BackingStore?.Set("attributes", value); } - } -#endif + /// The id property -#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 links property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.ResourceLinks? Links { get { return BackingStore?.Get("links"); } set { BackingStore?.Set("links", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.ResourceLinks Links - { - get { return BackingStore?.Get("links"); } - set { BackingStore?.Set("links", value); } - } -#endif + /// The relationships property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.EnrollmentRelationshipsInResponse? Relationships { get { return BackingStore?.Get("relationships"); } set { BackingStore?.Set("relationships", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.EnrollmentRelationshipsInResponse Relationships - { - get { return BackingStore?.Get("relationships"); } - set { BackingStore?.Set("relationships", value); } - } -#endif + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -86,6 +52,7 @@ public string Id _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.EnrollmentDataInResponse(); } + /// /// The deserialization information for the current model /// @@ -100,6 +67,7 @@ public override IDictionary> GetFieldDeserializers() { "relationships", n => { Relationships = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.EnrollmentRelationshipsInResponse.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -116,3 +84,4 @@ public override void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/EnrollmentIdentifierCollectionResponseDocument.cs b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/EnrollmentIdentifierCollectionResponseDocument.cs index 50d979f79..8b217a7de 100644 --- a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/EnrollmentIdentifierCollectionResponseDocument.cs +++ b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/EnrollmentIdentifierCollectionResponseDocument.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,70 +17,35 @@ public partial class EnrollmentIdentifierCollectionResponseDocument : IBackedMod { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The data property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public List? Data { get { return BackingStore?.Get?>("data"); } set { BackingStore?.Set("data", value); } } -#nullable restore -#else - public List Data - { - get { return BackingStore?.Get>("data"); } - set { BackingStore?.Set("data", value); } - } -#endif + /// The jsonapi property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Jsonapi? Jsonapi { get { return BackingStore?.Get("jsonapi"); } set { BackingStore?.Set("jsonapi", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Jsonapi Jsonapi - { - get { return BackingStore?.Get("jsonapi"); } - set { BackingStore?.Set("jsonapi", value); } - } -#endif + /// The links property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.ResourceIdentifierCollectionTopLevelLinks? Links { get { return BackingStore?.Get("links"); } set { BackingStore?.Set("links", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.ResourceIdentifierCollectionTopLevelLinks Links - { - get { return BackingStore?.Get("links"); } - set { BackingStore?.Set("links", value); } - } -#endif + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -86,6 +53,7 @@ public EnrollmentIdentifierCollectionResponseDocument() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -96,6 +64,7 @@ public EnrollmentIdentifierCollectionResponseDocument() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.EnrollmentIdentifierCollectionResponseDocument(); } + /// /// The deserialization information for the current model /// @@ -110,6 +79,7 @@ public virtual IDictionary> GetFieldDeserializers() { "meta", n => { Meta = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Meta.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -125,3 +95,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/EnrollmentIdentifierInRequest.cs b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/EnrollmentIdentifierInRequest.cs index cbc2b7ca6..f3b2c26f9 100644 --- a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/EnrollmentIdentifierInRequest.cs +++ b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/EnrollmentIdentifierInRequest.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,60 +17,35 @@ public partial class EnrollmentIdentifierInRequest : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The id property -#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 lid property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Lid { get { return BackingStore?.Get("lid"); } set { BackingStore?.Set("lid", value); } } -#nullable restore -#else - public string Lid - { - get { return BackingStore?.Get("lid"); } - set { BackingStore?.Set("lid", value); } - } -#endif + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// The type property public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.EnrollmentResourceType? Type { get { return BackingStore?.Get("type"); } set { BackingStore?.Set("type", value); } } + /// /// Instantiates a new and sets the default values. /// @@ -76,6 +53,7 @@ public EnrollmentIdentifierInRequest() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -86,6 +64,7 @@ public EnrollmentIdentifierInRequest() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.EnrollmentIdentifierInRequest(); } + /// /// The deserialization information for the current model /// @@ -100,6 +79,7 @@ public virtual IDictionary> GetFieldDeserializers() { "type", n => { Type = n.GetEnumValue(); } }, }; } + /// /// Serializes information the current object /// @@ -115,3 +95,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/EnrollmentIdentifierInResponse.cs b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/EnrollmentIdentifierInResponse.cs index 182dd60f9..d22a468fa 100644 --- a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/EnrollmentIdentifierInResponse.cs +++ b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/EnrollmentIdentifierInResponse.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,44 +17,28 @@ public partial class EnrollmentIdentifierInResponse : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The id property -#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 meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// The type property public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.EnrollmentResourceType? Type { get { return BackingStore?.Get("type"); } set { BackingStore?.Set("type", value); } } + /// /// Instantiates a new and sets the default values. /// @@ -60,6 +46,7 @@ public EnrollmentIdentifierInResponse() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -70,6 +57,7 @@ public EnrollmentIdentifierInResponse() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.EnrollmentIdentifierInResponse(); } + /// /// The deserialization information for the current model /// @@ -83,6 +71,7 @@ public virtual IDictionary> GetFieldDeserializers() { "type", n => { Type = n.GetEnumValue(); } }, }; } + /// /// Serializes information the current object /// @@ -97,3 +86,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/EnrollmentPrimaryResponseDocument.cs b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/EnrollmentPrimaryResponseDocument.cs index 2dd8badc3..bd7d7bbf8 100644 --- a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/EnrollmentPrimaryResponseDocument.cs +++ b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/EnrollmentPrimaryResponseDocument.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,86 +17,42 @@ public partial class EnrollmentPrimaryResponseDocument : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The data property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.EnrollmentDataInResponse? Data { get { return BackingStore?.Get("data"); } set { BackingStore?.Set("data", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.EnrollmentDataInResponse Data - { - get { return BackingStore?.Get("data"); } - set { BackingStore?.Set("data", value); } - } -#endif + /// The included property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public List? Included { get { return BackingStore?.Get?>("included"); } set { BackingStore?.Set("included", value); } } -#nullable restore -#else - public List Included - { - get { return BackingStore?.Get>("included"); } - set { BackingStore?.Set("included", value); } - } -#endif + /// The jsonapi property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Jsonapi? Jsonapi { get { return BackingStore?.Get("jsonapi"); } set { BackingStore?.Set("jsonapi", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Jsonapi Jsonapi - { - get { return BackingStore?.Get("jsonapi"); } - set { BackingStore?.Set("jsonapi", value); } - } -#endif + /// The links property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.ResourceTopLevelLinks? Links { get { return BackingStore?.Get("links"); } set { BackingStore?.Set("links", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.ResourceTopLevelLinks Links - { - get { return BackingStore?.Get("links"); } - set { BackingStore?.Set("links", value); } - } -#endif + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -102,6 +60,7 @@ public EnrollmentPrimaryResponseDocument() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -112,6 +71,7 @@ public EnrollmentPrimaryResponseDocument() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.EnrollmentPrimaryResponseDocument(); } + /// /// The deserialization information for the current model /// @@ -127,6 +87,7 @@ public virtual IDictionary> GetFieldDeserializers() { "meta", n => { Meta = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Meta.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -143,3 +104,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/EnrollmentRelationshipsInResponse.cs b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/EnrollmentRelationshipsInResponse.cs index 33eed5271..00504dc7c 100644 --- a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/EnrollmentRelationshipsInResponse.cs +++ b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/EnrollmentRelationshipsInResponse.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,38 +17,21 @@ public partial class EnrollmentRelationshipsInResponse : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The course property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.ToOneCourseInResponse? Course { get { return BackingStore?.Get("course"); } set { BackingStore?.Set("course", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.ToOneCourseInResponse Course - { - get { return BackingStore?.Get("course"); } - set { BackingStore?.Set("course", value); } - } -#endif + /// The student property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.ToOneStudentInResponse? Student { get { return BackingStore?.Get("student"); } set { BackingStore?.Set("student", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.ToOneStudentInResponse Student - { - get { return BackingStore?.Get("student"); } - set { BackingStore?.Set("student", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -54,6 +39,7 @@ public EnrollmentRelationshipsInResponse() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -64,6 +50,7 @@ public EnrollmentRelationshipsInResponse() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.EnrollmentRelationshipsInResponse(); } + /// /// The deserialization information for the current model /// @@ -76,6 +63,7 @@ public virtual IDictionary> GetFieldDeserializers() { "student", n => { Student = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.ToOneStudentInResponse.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -89,3 +77,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/EnrollmentResourceType.cs b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/EnrollmentResourceType.cs index 25e5cd876..b7f9042c6 100644 --- a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/EnrollmentResourceType.cs +++ b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/EnrollmentResourceType.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 using System.Runtime.Serialization; using System; namespace OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models @@ -14,3 +16,4 @@ public enum EnrollmentResourceType #pragma warning restore CS1591 } } + diff --git a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/EnrollmentStudentRelationshipIdentifier.cs b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/EnrollmentStudentRelationshipIdentifier.cs index 7cfd83f98..c8090b0cc 100644 --- a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/EnrollmentStudentRelationshipIdentifier.cs +++ b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/EnrollmentStudentRelationshipIdentifier.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,50 +17,35 @@ public partial class EnrollmentStudentRelationshipIdentifier : IBackedModel, IPa { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The id property -#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 lid property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Lid { get { return BackingStore?.Get("lid"); } set { BackingStore?.Set("lid", value); } } -#nullable restore -#else - public string Lid - { - get { return BackingStore?.Get("lid"); } - set { BackingStore?.Set("lid", value); } - } -#endif + /// The relationship property public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.EnrollmentStudentRelationshipName? Relationship { get { return BackingStore?.Get("relationship"); } set { BackingStore?.Set("relationship", value); } } + /// The type property public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.EnrollmentResourceType? Type { get { return BackingStore?.Get("type"); } set { BackingStore?.Set("type", value); } } + /// /// Instantiates a new and sets the default values. /// @@ -66,6 +53,7 @@ public EnrollmentStudentRelationshipIdentifier() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -76,6 +64,7 @@ public EnrollmentStudentRelationshipIdentifier() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.EnrollmentStudentRelationshipIdentifier(); } + /// /// The deserialization information for the current model /// @@ -90,6 +79,7 @@ public virtual IDictionary> GetFieldDeserializers() { "type", n => { Type = n.GetEnumValue(); } }, }; } + /// /// Serializes information the current object /// @@ -105,3 +95,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/EnrollmentStudentRelationshipName.cs b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/EnrollmentStudentRelationshipName.cs index 3eee66703..bc5512872 100644 --- a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/EnrollmentStudentRelationshipName.cs +++ b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/EnrollmentStudentRelationshipName.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 using System.Runtime.Serialization; using System; namespace OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models @@ -14,3 +16,4 @@ public enum EnrollmentStudentRelationshipName #pragma warning restore CS1591 } } + diff --git a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/ErrorLinks.cs b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/ErrorLinks.cs index 4744fabf6..d4f7048dd 100644 --- a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/ErrorLinks.cs +++ b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/ErrorLinks.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -14,39 +16,22 @@ public partial class ErrorLinks : IBackedModel, IParsable #pragma warning restore CS1591 { /// The about property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? About { get { return BackingStore?.Get("about"); } set { BackingStore?.Set("about", value); } } -#nullable restore -#else - public string About - { - get { return BackingStore?.Get("about"); } - set { BackingStore?.Set("about", value); } - } -#endif + /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// 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 and sets the default values. /// @@ -54,6 +39,7 @@ public ErrorLinks() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -64,6 +50,7 @@ public ErrorLinks() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.ErrorLinks(); } + /// /// The deserialization information for the current model /// @@ -76,6 +63,7 @@ public virtual IDictionary> GetFieldDeserializers() { "type", n => { Type = n.GetStringValue(); } }, }; } + /// /// Serializes information the current object /// @@ -89,3 +77,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/ErrorObject.cs b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/ErrorObject.cs index ba0a56cc9..085dd6d4d 100644 --- a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/ErrorObject.cs +++ b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/ErrorObject.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,134 +17,63 @@ public partial class ErrorObject : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The code property -#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 detail property -#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 id property -#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 links property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.ErrorLinks? Links { get { return BackingStore?.Get("links"); } set { BackingStore?.Set("links", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.ErrorLinks Links - { - get { return BackingStore?.Get("links"); } - set { BackingStore?.Set("links", value); } - } -#endif + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// The source property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.ErrorSource? Source { get { return BackingStore?.Get("source"); } set { BackingStore?.Set("source", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.ErrorSource Source - { - get { return BackingStore?.Get("source"); } - set { BackingStore?.Set("source", value); } - } -#endif + /// The status property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Status { get { return BackingStore?.Get("status"); } set { BackingStore?.Set("status", value); } } -#nullable restore -#else - public string Status - { - get { return BackingStore?.Get("status"); } - set { BackingStore?.Set("status", value); } - } -#endif + /// The title property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Title { get { return BackingStore?.Get("title"); } set { BackingStore?.Set("title", value); } } -#nullable restore -#else - public string Title - { - get { return BackingStore?.Get("title"); } - set { BackingStore?.Set("title", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -150,6 +81,7 @@ public ErrorObject() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -160,6 +92,7 @@ public ErrorObject() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.ErrorObject(); } + /// /// The deserialization information for the current model /// @@ -178,6 +111,7 @@ public virtual IDictionary> GetFieldDeserializers() { "title", n => { Title = n.GetStringValue(); } }, }; } + /// /// Serializes information the current object /// @@ -197,3 +131,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/ErrorResponseDocument.cs b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/ErrorResponseDocument.cs index d7c963534..35a830b4d 100644 --- a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/ErrorResponseDocument.cs +++ b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/ErrorResponseDocument.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -16,72 +18,38 @@ public partial class ErrorResponseDocument : ApiException, IBackedModel, IParsab { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The errors property -#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 + /// The jsonapi property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Jsonapi? Jsonapi { get { return BackingStore?.Get("jsonapi"); } set { BackingStore?.Set("jsonapi", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Jsonapi Jsonapi - { - get { return BackingStore?.Get("jsonapi"); } - set { BackingStore?.Set("jsonapi", value); } - } -#endif + /// The links property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.ErrorTopLevelLinks? Links { get { return BackingStore?.Get("links"); } set { BackingStore?.Set("links", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.ErrorTopLevelLinks Links - { - get { return BackingStore?.Get("links"); } - set { BackingStore?.Set("links", value); } - } -#endif + /// The primary error message. public override string Message { get => base.Message; } + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -89,6 +57,7 @@ public ErrorResponseDocument() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -99,6 +68,7 @@ public ErrorResponseDocument() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.ErrorResponseDocument(); } + /// /// The deserialization information for the current model /// @@ -113,6 +83,7 @@ public virtual IDictionary> GetFieldDeserializers() { "meta", n => { Meta = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Meta.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -128,3 +99,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/ErrorSource.cs b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/ErrorSource.cs index 298d9606e..33bfbc9f2 100644 --- a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/ErrorSource.cs +++ b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/ErrorSource.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,54 +17,28 @@ public partial class ErrorSource : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The header property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Header { get { return BackingStore?.Get("header"); } set { BackingStore?.Set("header", value); } } -#nullable restore -#else - public string Header - { - get { return BackingStore?.Get("header"); } - set { BackingStore?.Set("header", value); } - } -#endif + /// The parameter property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Parameter { get { return BackingStore?.Get("parameter"); } set { BackingStore?.Set("parameter", value); } } -#nullable restore -#else - public string Parameter - { - get { return BackingStore?.Get("parameter"); } - set { BackingStore?.Set("parameter", value); } - } -#endif + /// The pointer property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Pointer { get { return BackingStore?.Get("pointer"); } set { BackingStore?.Set("pointer", value); } } -#nullable restore -#else - public string Pointer - { - get { return BackingStore?.Get("pointer"); } - set { BackingStore?.Set("pointer", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -70,6 +46,7 @@ public ErrorSource() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -80,6 +57,7 @@ public ErrorSource() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.ErrorSource(); } + /// /// The deserialization information for the current model /// @@ -93,6 +71,7 @@ public virtual IDictionary> GetFieldDeserializers() { "pointer", n => { Pointer = n.GetStringValue(); } }, }; } + /// /// Serializes information the current object /// @@ -107,3 +86,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/ErrorTopLevelLinks.cs b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/ErrorTopLevelLinks.cs index 6fb089e56..e598de0c3 100644 --- a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/ErrorTopLevelLinks.cs +++ b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/ErrorTopLevelLinks.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,38 +17,21 @@ public partial class ErrorTopLevelLinks : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The describedby property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Describedby { get { return BackingStore?.Get("describedby"); } set { BackingStore?.Set("describedby", value); } } -#nullable restore -#else - public string Describedby - { - get { return BackingStore?.Get("describedby"); } - set { BackingStore?.Set("describedby", value); } - } -#endif + /// The self property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Self { get { return BackingStore?.Get("self"); } set { BackingStore?.Set("self", value); } } -#nullable restore -#else - public string Self - { - get { return BackingStore?.Get("self"); } - set { BackingStore?.Set("self", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -54,6 +39,7 @@ public ErrorTopLevelLinks() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -64,6 +50,7 @@ public ErrorTopLevelLinks() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.ErrorTopLevelLinks(); } + /// /// The deserialization information for the current model /// @@ -76,6 +63,7 @@ public virtual IDictionary> GetFieldDeserializers() { "self", n => { Self = n.GetStringValue(); } }, }; } + /// /// Serializes information the current object /// @@ -89,3 +77,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/Jsonapi.cs b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/Jsonapi.cs index c162d632f..d8d4f2a90 100644 --- a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/Jsonapi.cs +++ b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/Jsonapi.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,70 +17,35 @@ public partial class Jsonapi : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The ext property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public List? Ext { get { return BackingStore?.Get?>("ext"); } set { BackingStore?.Set("ext", value); } } -#nullable restore -#else - public List Ext - { - get { return BackingStore?.Get>("ext"); } - set { BackingStore?.Set("ext", value); } - } -#endif + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// The profile property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public List? Profile { get { return BackingStore?.Get?>("profile"); } set { BackingStore?.Set("profile", value); } } -#nullable restore -#else - public List Profile - { - get { return BackingStore?.Get>("profile"); } - set { BackingStore?.Set("profile", value); } - } -#endif + /// The version property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Version { get { return BackingStore?.Get("version"); } set { BackingStore?.Set("version", value); } } -#nullable restore -#else - public string Version - { - get { return BackingStore?.Get("version"); } - set { BackingStore?.Set("version", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -86,6 +53,7 @@ public Jsonapi() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -96,6 +64,7 @@ public Jsonapi() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Jsonapi(); } + /// /// The deserialization information for the current model /// @@ -110,6 +79,7 @@ public virtual IDictionary> GetFieldDeserializers() { "version", n => { Version = n.GetStringValue(); } }, }; } + /// /// Serializes information the current object /// @@ -125,3 +95,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/Meta.cs b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/Meta.cs index dfbd860dc..0d084489f 100644 --- a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/Meta.cs +++ b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/Meta.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -19,8 +21,10 @@ public IDictionary AdditionalData get { return BackingStore.Get>("AdditionalData") ?? new Dictionary(); } set { BackingStore.Set("AdditionalData", value); } } + /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// /// Instantiates a new and sets the default values. /// @@ -29,6 +33,7 @@ public Meta() BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); AdditionalData = new Dictionary(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -39,6 +44,7 @@ public Meta() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Meta(); } + /// /// The deserialization information for the current model /// @@ -49,6 +55,7 @@ public virtual IDictionary> GetFieldDeserializers() { }; } + /// /// Serializes information the current object /// @@ -61,3 +68,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/NullableTeacherIdentifierResponseDocument.cs b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/NullableTeacherIdentifierResponseDocument.cs index 14dc9756c..da4e2b451 100644 --- a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/NullableTeacherIdentifierResponseDocument.cs +++ b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/NullableTeacherIdentifierResponseDocument.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,70 +17,35 @@ public partial class NullableTeacherIdentifierResponseDocument : IBackedModel, I { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The data property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.TeacherIdentifierInResponse? Data { get { return BackingStore?.Get("data"); } set { BackingStore?.Set("data", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.TeacherIdentifierInResponse Data - { - get { return BackingStore?.Get("data"); } - set { BackingStore?.Set("data", value); } - } -#endif + /// The jsonapi property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Jsonapi? Jsonapi { get { return BackingStore?.Get("jsonapi"); } set { BackingStore?.Set("jsonapi", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Jsonapi Jsonapi - { - get { return BackingStore?.Get("jsonapi"); } - set { BackingStore?.Set("jsonapi", value); } - } -#endif + /// The links property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.ResourceIdentifierTopLevelLinks? Links { get { return BackingStore?.Get("links"); } set { BackingStore?.Set("links", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.ResourceIdentifierTopLevelLinks Links - { - get { return BackingStore?.Get("links"); } - set { BackingStore?.Set("links", value); } - } -#endif + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -86,6 +53,7 @@ public NullableTeacherIdentifierResponseDocument() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -96,6 +64,7 @@ public NullableTeacherIdentifierResponseDocument() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.NullableTeacherIdentifierResponseDocument(); } + /// /// The deserialization information for the current model /// @@ -110,6 +79,7 @@ public virtual IDictionary> GetFieldDeserializers() { "meta", n => { Meta = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Meta.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -125,3 +95,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/NullableTeacherSecondaryResponseDocument.cs b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/NullableTeacherSecondaryResponseDocument.cs index 679c7012c..58bff1c11 100644 --- a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/NullableTeacherSecondaryResponseDocument.cs +++ b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/NullableTeacherSecondaryResponseDocument.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,86 +17,42 @@ public partial class NullableTeacherSecondaryResponseDocument : IBackedModel, IP { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The data property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.TeacherDataInResponse? Data { get { return BackingStore?.Get("data"); } set { BackingStore?.Set("data", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.TeacherDataInResponse Data - { - get { return BackingStore?.Get("data"); } - set { BackingStore?.Set("data", value); } - } -#endif + /// The included property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public List? Included { get { return BackingStore?.Get?>("included"); } set { BackingStore?.Set("included", value); } } -#nullable restore -#else - public List Included - { - get { return BackingStore?.Get>("included"); } - set { BackingStore?.Set("included", value); } - } -#endif + /// The jsonapi property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Jsonapi? Jsonapi { get { return BackingStore?.Get("jsonapi"); } set { BackingStore?.Set("jsonapi", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Jsonapi Jsonapi - { - get { return BackingStore?.Get("jsonapi"); } - set { BackingStore?.Set("jsonapi", value); } - } -#endif + /// The links property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.ResourceTopLevelLinks? Links { get { return BackingStore?.Get("links"); } set { BackingStore?.Set("links", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.ResourceTopLevelLinks Links - { - get { return BackingStore?.Get("links"); } - set { BackingStore?.Set("links", value); } - } -#endif + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -102,6 +60,7 @@ public NullableTeacherSecondaryResponseDocument() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -112,6 +71,7 @@ public NullableTeacherSecondaryResponseDocument() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.NullableTeacherSecondaryResponseDocument(); } + /// /// The deserialization information for the current model /// @@ -127,6 +87,7 @@ public virtual IDictionary> GetFieldDeserializers() { "meta", n => { Meta = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Meta.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -143,3 +104,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/NullableToOneTeacherInRequest.cs b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/NullableToOneTeacherInRequest.cs index 775485150..d4616bd68 100644 --- a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/NullableToOneTeacherInRequest.cs +++ b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/NullableToOneTeacherInRequest.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,38 +17,21 @@ public partial class NullableToOneTeacherInRequest : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The data property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.TeacherIdentifierInRequest? Data { get { return BackingStore?.Get("data"); } set { BackingStore?.Set("data", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.TeacherIdentifierInRequest Data - { - get { return BackingStore?.Get("data"); } - set { BackingStore?.Set("data", value); } - } -#endif + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -54,6 +39,7 @@ public NullableToOneTeacherInRequest() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -64,6 +50,7 @@ public NullableToOneTeacherInRequest() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.NullableToOneTeacherInRequest(); } + /// /// The deserialization information for the current model /// @@ -76,6 +63,7 @@ public virtual IDictionary> GetFieldDeserializers() { "meta", n => { Meta = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Meta.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -89,3 +77,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/NullableToOneTeacherInResponse.cs b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/NullableToOneTeacherInResponse.cs index 2d28b74b5..3f8d8ef52 100644 --- a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/NullableToOneTeacherInResponse.cs +++ b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/NullableToOneTeacherInResponse.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,54 +17,28 @@ public partial class NullableToOneTeacherInResponse : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The data property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.TeacherIdentifierInResponse? Data { get { return BackingStore?.Get("data"); } set { BackingStore?.Set("data", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.TeacherIdentifierInResponse Data - { - get { return BackingStore?.Get("data"); } - set { BackingStore?.Set("data", value); } - } -#endif + /// The links property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.RelationshipLinks? Links { get { return BackingStore?.Get("links"); } set { BackingStore?.Set("links", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.RelationshipLinks Links - { - get { return BackingStore?.Get("links"); } - set { BackingStore?.Set("links", value); } - } -#endif + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -70,6 +46,7 @@ public NullableToOneTeacherInResponse() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -80,6 +57,7 @@ public NullableToOneTeacherInResponse() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.NullableToOneTeacherInResponse(); } + /// /// The deserialization information for the current model /// @@ -93,6 +71,7 @@ public virtual IDictionary> GetFieldDeserializers() { "meta", n => { Meta = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Meta.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -107,3 +86,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/OperationsRequestDocument.cs b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/OperationsRequestDocument.cs index 980a403be..a78faa233 100644 --- a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/OperationsRequestDocument.cs +++ b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/OperationsRequestDocument.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -14,39 +16,22 @@ public partial class OperationsRequestDocument : IBackedModel, IParsable #pragma warning restore CS1591 { /// The atomicOperations property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public List? AtomicOperations { get { return BackingStore?.Get?>("atomic:operations"); } set { BackingStore?.Set("atomic:operations", value); } } -#nullable restore -#else - public List AtomicOperations - { - get { return BackingStore?.Get>("atomic:operations"); } - set { BackingStore?.Set("atomic:operations", value); } - } -#endif + /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -54,6 +39,7 @@ public OperationsRequestDocument() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -64,6 +50,7 @@ public OperationsRequestDocument() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.OperationsRequestDocument(); } + /// /// The deserialization information for the current model /// @@ -76,6 +63,7 @@ public virtual IDictionary> GetFieldDeserializers() { "meta", n => { Meta = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Meta.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -89,3 +77,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/OperationsResponseDocument.cs b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/OperationsResponseDocument.cs index e0ce37083..3bea823a7 100644 --- a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/OperationsResponseDocument.cs +++ b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/OperationsResponseDocument.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -14,71 +16,36 @@ public partial class OperationsResponseDocument : IBackedModel, IParsable #pragma warning restore CS1591 { /// The atomicResults property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public List? AtomicResults { get { return BackingStore?.Get?>("atomic:results"); } set { BackingStore?.Set("atomic:results", value); } } -#nullable restore -#else - public List AtomicResults - { - get { return BackingStore?.Get>("atomic:results"); } - set { BackingStore?.Set("atomic:results", value); } - } -#endif + /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The jsonapi property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Jsonapi? Jsonapi { get { return BackingStore?.Get("jsonapi"); } set { BackingStore?.Set("jsonapi", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Jsonapi Jsonapi - { - get { return BackingStore?.Get("jsonapi"); } - set { BackingStore?.Set("jsonapi", value); } - } -#endif + /// The links property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.ResourceTopLevelLinks? Links { get { return BackingStore?.Get("links"); } set { BackingStore?.Set("links", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.ResourceTopLevelLinks Links - { - get { return BackingStore?.Get("links"); } - set { BackingStore?.Set("links", value); } - } -#endif + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -86,6 +53,7 @@ public OperationsResponseDocument() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -96,6 +64,7 @@ public OperationsResponseDocument() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.OperationsResponseDocument(); } + /// /// The deserialization information for the current model /// @@ -110,6 +79,7 @@ public virtual IDictionary> GetFieldDeserializers() { "meta", n => { Meta = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Meta.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -125,3 +95,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/RelationshipLinks.cs b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/RelationshipLinks.cs index 1d641ea7e..2c62eb0fe 100644 --- a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/RelationshipLinks.cs +++ b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/RelationshipLinks.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,38 +17,21 @@ public partial class RelationshipLinks : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The related property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Related { get { return BackingStore?.Get("related"); } set { BackingStore?.Set("related", value); } } -#nullable restore -#else - public string Related - { - get { return BackingStore?.Get("related"); } - set { BackingStore?.Set("related", value); } - } -#endif + /// The self property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Self { get { return BackingStore?.Get("self"); } set { BackingStore?.Set("self", value); } } -#nullable restore -#else - public string Self - { - get { return BackingStore?.Get("self"); } - set { BackingStore?.Set("self", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -54,6 +39,7 @@ public RelationshipLinks() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -64,6 +50,7 @@ public RelationshipLinks() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.RelationshipLinks(); } + /// /// The deserialization information for the current model /// @@ -76,6 +63,7 @@ public virtual IDictionary> GetFieldDeserializers() { "self", n => { Self = n.GetStringValue(); } }, }; } + /// /// Serializes information the current object /// @@ -89,3 +77,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/RelationshipsInCreateCourseRequest.cs b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/RelationshipsInCreateCourseRequest.cs index 4f556d345..ccd592244 100644 --- a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/RelationshipsInCreateCourseRequest.cs +++ b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/RelationshipsInCreateCourseRequest.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,38 +17,21 @@ public partial class RelationshipsInCreateCourseRequest : IBackedModel, IParsabl { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The enrollments property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.ToManyEnrollmentInRequest? Enrollments { get { return BackingStore?.Get("enrollments"); } set { BackingStore?.Set("enrollments", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.ToManyEnrollmentInRequest Enrollments - { - get { return BackingStore?.Get("enrollments"); } - set { BackingStore?.Set("enrollments", value); } - } -#endif + /// The taughtBy property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.ToManyTeacherInRequest? TaughtBy { get { return BackingStore?.Get("taughtBy"); } set { BackingStore?.Set("taughtBy", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.ToManyTeacherInRequest TaughtBy - { - get { return BackingStore?.Get("taughtBy"); } - set { BackingStore?.Set("taughtBy", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -54,6 +39,7 @@ public RelationshipsInCreateCourseRequest() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -64,6 +50,7 @@ public RelationshipsInCreateCourseRequest() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.RelationshipsInCreateCourseRequest(); } + /// /// The deserialization information for the current model /// @@ -76,6 +63,7 @@ public virtual IDictionary> GetFieldDeserializers() { "taughtBy", n => { TaughtBy = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.ToManyTeacherInRequest.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -89,3 +77,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/RelationshipsInCreateEnrollmentRequest.cs b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/RelationshipsInCreateEnrollmentRequest.cs index 6245540d0..b0d301a72 100644 --- a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/RelationshipsInCreateEnrollmentRequest.cs +++ b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/RelationshipsInCreateEnrollmentRequest.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,38 +17,21 @@ public partial class RelationshipsInCreateEnrollmentRequest : IBackedModel, IPar { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The course property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.ToOneCourseInRequest? Course { get { return BackingStore?.Get("course"); } set { BackingStore?.Set("course", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.ToOneCourseInRequest Course - { - get { return BackingStore?.Get("course"); } - set { BackingStore?.Set("course", value); } - } -#endif + /// The student property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.ToOneStudentInRequest? Student { get { return BackingStore?.Get("student"); } set { BackingStore?.Set("student", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.ToOneStudentInRequest Student - { - get { return BackingStore?.Get("student"); } - set { BackingStore?.Set("student", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -54,6 +39,7 @@ public RelationshipsInCreateEnrollmentRequest() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -64,6 +50,7 @@ public RelationshipsInCreateEnrollmentRequest() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.RelationshipsInCreateEnrollmentRequest(); } + /// /// The deserialization information for the current model /// @@ -76,6 +63,7 @@ public virtual IDictionary> GetFieldDeserializers() { "student", n => { Student = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.ToOneStudentInRequest.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -89,3 +77,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/RelationshipsInCreateStudentRequest.cs b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/RelationshipsInCreateStudentRequest.cs index 4a7030a5b..0dbc37187 100644 --- a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/RelationshipsInCreateStudentRequest.cs +++ b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/RelationshipsInCreateStudentRequest.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,38 +17,21 @@ public partial class RelationshipsInCreateStudentRequest : IBackedModel, IParsab { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The enrollments property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.ToManyEnrollmentInRequest? Enrollments { get { return BackingStore?.Get("enrollments"); } set { BackingStore?.Set("enrollments", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.ToManyEnrollmentInRequest Enrollments - { - get { return BackingStore?.Get("enrollments"); } - set { BackingStore?.Set("enrollments", value); } - } -#endif + /// The mentor property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.NullableToOneTeacherInRequest? Mentor { get { return BackingStore?.Get("mentor"); } set { BackingStore?.Set("mentor", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.NullableToOneTeacherInRequest Mentor - { - get { return BackingStore?.Get("mentor"); } - set { BackingStore?.Set("mentor", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -54,6 +39,7 @@ public RelationshipsInCreateStudentRequest() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -64,6 +50,7 @@ public RelationshipsInCreateStudentRequest() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.RelationshipsInCreateStudentRequest(); } + /// /// The deserialization information for the current model /// @@ -76,6 +63,7 @@ public virtual IDictionary> GetFieldDeserializers() { "mentor", n => { Mentor = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.NullableToOneTeacherInRequest.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -89,3 +77,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/RelationshipsInCreateTeacherRequest.cs b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/RelationshipsInCreateTeacherRequest.cs index 0a7752382..d7f1ea9fb 100644 --- a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/RelationshipsInCreateTeacherRequest.cs +++ b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/RelationshipsInCreateTeacherRequest.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,38 +17,21 @@ public partial class RelationshipsInCreateTeacherRequest : IBackedModel, IParsab { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The mentors property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.ToManyStudentInRequest? Mentors { get { return BackingStore?.Get("mentors"); } set { BackingStore?.Set("mentors", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.ToManyStudentInRequest Mentors - { - get { return BackingStore?.Get("mentors"); } - set { BackingStore?.Set("mentors", value); } - } -#endif + /// The teaches property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.ToManyCourseInRequest? Teaches { get { return BackingStore?.Get("teaches"); } set { BackingStore?.Set("teaches", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.ToManyCourseInRequest Teaches - { - get { return BackingStore?.Get("teaches"); } - set { BackingStore?.Set("teaches", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -54,6 +39,7 @@ public RelationshipsInCreateTeacherRequest() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -64,6 +50,7 @@ public RelationshipsInCreateTeacherRequest() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.RelationshipsInCreateTeacherRequest(); } + /// /// The deserialization information for the current model /// @@ -76,6 +63,7 @@ public virtual IDictionary> GetFieldDeserializers() { "teaches", n => { Teaches = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.ToManyCourseInRequest.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -89,3 +77,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/RelationshipsInUpdateCourseRequest.cs b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/RelationshipsInUpdateCourseRequest.cs index 315c17303..a9671f53e 100644 --- a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/RelationshipsInUpdateCourseRequest.cs +++ b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/RelationshipsInUpdateCourseRequest.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,38 +17,21 @@ public partial class RelationshipsInUpdateCourseRequest : IBackedModel, IParsabl { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The enrollments property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.ToManyEnrollmentInRequest? Enrollments { get { return BackingStore?.Get("enrollments"); } set { BackingStore?.Set("enrollments", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.ToManyEnrollmentInRequest Enrollments - { - get { return BackingStore?.Get("enrollments"); } - set { BackingStore?.Set("enrollments", value); } - } -#endif + /// The taughtBy property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.ToManyTeacherInRequest? TaughtBy { get { return BackingStore?.Get("taughtBy"); } set { BackingStore?.Set("taughtBy", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.ToManyTeacherInRequest TaughtBy - { - get { return BackingStore?.Get("taughtBy"); } - set { BackingStore?.Set("taughtBy", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -54,6 +39,7 @@ public RelationshipsInUpdateCourseRequest() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -64,6 +50,7 @@ public RelationshipsInUpdateCourseRequest() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.RelationshipsInUpdateCourseRequest(); } + /// /// The deserialization information for the current model /// @@ -76,6 +63,7 @@ public virtual IDictionary> GetFieldDeserializers() { "taughtBy", n => { TaughtBy = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.ToManyTeacherInRequest.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -89,3 +77,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/RelationshipsInUpdateEnrollmentRequest.cs b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/RelationshipsInUpdateEnrollmentRequest.cs index e3b24e69a..dba9afa54 100644 --- a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/RelationshipsInUpdateEnrollmentRequest.cs +++ b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/RelationshipsInUpdateEnrollmentRequest.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,38 +17,21 @@ public partial class RelationshipsInUpdateEnrollmentRequest : IBackedModel, IPar { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The course property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.ToOneCourseInRequest? Course { get { return BackingStore?.Get("course"); } set { BackingStore?.Set("course", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.ToOneCourseInRequest Course - { - get { return BackingStore?.Get("course"); } - set { BackingStore?.Set("course", value); } - } -#endif + /// The student property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.ToOneStudentInRequest? Student { get { return BackingStore?.Get("student"); } set { BackingStore?.Set("student", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.ToOneStudentInRequest Student - { - get { return BackingStore?.Get("student"); } - set { BackingStore?.Set("student", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -54,6 +39,7 @@ public RelationshipsInUpdateEnrollmentRequest() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -64,6 +50,7 @@ public RelationshipsInUpdateEnrollmentRequest() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.RelationshipsInUpdateEnrollmentRequest(); } + /// /// The deserialization information for the current model /// @@ -76,6 +63,7 @@ public virtual IDictionary> GetFieldDeserializers() { "student", n => { Student = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.ToOneStudentInRequest.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -89,3 +77,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/RelationshipsInUpdateStudentRequest.cs b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/RelationshipsInUpdateStudentRequest.cs index 7eca3a965..f42b49656 100644 --- a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/RelationshipsInUpdateStudentRequest.cs +++ b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/RelationshipsInUpdateStudentRequest.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,38 +17,21 @@ public partial class RelationshipsInUpdateStudentRequest : IBackedModel, IParsab { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The enrollments property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.ToManyEnrollmentInRequest? Enrollments { get { return BackingStore?.Get("enrollments"); } set { BackingStore?.Set("enrollments", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.ToManyEnrollmentInRequest Enrollments - { - get { return BackingStore?.Get("enrollments"); } - set { BackingStore?.Set("enrollments", value); } - } -#endif + /// The mentor property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.NullableToOneTeacherInRequest? Mentor { get { return BackingStore?.Get("mentor"); } set { BackingStore?.Set("mentor", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.NullableToOneTeacherInRequest Mentor - { - get { return BackingStore?.Get("mentor"); } - set { BackingStore?.Set("mentor", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -54,6 +39,7 @@ public RelationshipsInUpdateStudentRequest() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -64,6 +50,7 @@ public RelationshipsInUpdateStudentRequest() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.RelationshipsInUpdateStudentRequest(); } + /// /// The deserialization information for the current model /// @@ -76,6 +63,7 @@ public virtual IDictionary> GetFieldDeserializers() { "mentor", n => { Mentor = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.NullableToOneTeacherInRequest.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -89,3 +77,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/RelationshipsInUpdateTeacherRequest.cs b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/RelationshipsInUpdateTeacherRequest.cs index 28b3c4513..af08d4ebb 100644 --- a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/RelationshipsInUpdateTeacherRequest.cs +++ b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/RelationshipsInUpdateTeacherRequest.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,38 +17,21 @@ public partial class RelationshipsInUpdateTeacherRequest : IBackedModel, IParsab { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The mentors property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.ToManyStudentInRequest? Mentors { get { return BackingStore?.Get("mentors"); } set { BackingStore?.Set("mentors", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.ToManyStudentInRequest Mentors - { - get { return BackingStore?.Get("mentors"); } - set { BackingStore?.Set("mentors", value); } - } -#endif + /// The teaches property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.ToManyCourseInRequest? Teaches { get { return BackingStore?.Get("teaches"); } set { BackingStore?.Set("teaches", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.ToManyCourseInRequest Teaches - { - get { return BackingStore?.Get("teaches"); } - set { BackingStore?.Set("teaches", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -54,6 +39,7 @@ public RelationshipsInUpdateTeacherRequest() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -64,6 +50,7 @@ public RelationshipsInUpdateTeacherRequest() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.RelationshipsInUpdateTeacherRequest(); } + /// /// The deserialization information for the current model /// @@ -76,6 +63,7 @@ public virtual IDictionary> GetFieldDeserializers() { "teaches", n => { Teaches = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.ToManyCourseInRequest.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -89,3 +77,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/RemoveFromStudentEnrollmentsRelationshipOperation.cs b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/RemoveFromStudentEnrollmentsRelationshipOperation.cs index 72d6a97e0..dcc541330 100644 --- a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/RemoveFromStudentEnrollmentsRelationshipOperation.cs +++ b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/RemoveFromStudentEnrollmentsRelationshipOperation.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -13,43 +15,26 @@ public partial class RemoveFromStudentEnrollmentsRelationshipOperation : global: #pragma warning restore CS1591 { /// The data property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public List? Data { get { return BackingStore?.Get?>("data"); } set { BackingStore?.Set("data", value); } } -#nullable restore -#else - public List Data - { - get { return BackingStore?.Get>("data"); } - set { BackingStore?.Set("data", value); } - } -#endif + /// The op property public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.RemoveOperationCode? Op { get { return BackingStore?.Get("op"); } set { BackingStore?.Set("op", value); } } + /// The ref property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.StudentEnrollmentsRelationshipIdentifier? Ref { get { return BackingStore?.Get("ref"); } set { BackingStore?.Set("ref", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.StudentEnrollmentsRelationshipIdentifier Ref - { - get { return BackingStore?.Get("ref"); } - set { BackingStore?.Set("ref", value); } - } -#endif + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -60,6 +45,7 @@ public partial class RemoveFromStudentEnrollmentsRelationshipOperation : global: _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.RemoveFromStudentEnrollmentsRelationshipOperation(); } + /// /// The deserialization information for the current model /// @@ -73,6 +59,7 @@ public override IDictionary> GetFieldDeserializers() { "ref", n => { Ref = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.StudentEnrollmentsRelationshipIdentifier.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -88,3 +75,4 @@ public override void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/RemoveFromTeacherMentorsRelationshipOperation.cs b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/RemoveFromTeacherMentorsRelationshipOperation.cs index 6feafae7e..9a3668351 100644 --- a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/RemoveFromTeacherMentorsRelationshipOperation.cs +++ b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/RemoveFromTeacherMentorsRelationshipOperation.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -13,43 +15,26 @@ public partial class RemoveFromTeacherMentorsRelationshipOperation : global::Ope #pragma warning restore CS1591 { /// The data property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public List? Data { get { return BackingStore?.Get?>("data"); } set { BackingStore?.Set("data", value); } } -#nullable restore -#else - public List Data - { - get { return BackingStore?.Get>("data"); } - set { BackingStore?.Set("data", value); } - } -#endif + /// The op property public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.RemoveOperationCode? Op { get { return BackingStore?.Get("op"); } set { BackingStore?.Set("op", value); } } + /// The ref property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.TeacherMentorsRelationshipIdentifier? Ref { get { return BackingStore?.Get("ref"); } set { BackingStore?.Set("ref", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.TeacherMentorsRelationshipIdentifier Ref - { - get { return BackingStore?.Get("ref"); } - set { BackingStore?.Set("ref", value); } - } -#endif + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -60,6 +45,7 @@ public partial class RemoveFromTeacherMentorsRelationshipOperation : global::Ope _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.RemoveFromTeacherMentorsRelationshipOperation(); } + /// /// The deserialization information for the current model /// @@ -73,6 +59,7 @@ public override IDictionary> GetFieldDeserializers() { "ref", n => { Ref = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.TeacherMentorsRelationshipIdentifier.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -88,3 +75,4 @@ public override void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/RemoveFromTeacherTeachesRelationshipOperation.cs b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/RemoveFromTeacherTeachesRelationshipOperation.cs index e923ee3ab..16812fae4 100644 --- a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/RemoveFromTeacherTeachesRelationshipOperation.cs +++ b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/RemoveFromTeacherTeachesRelationshipOperation.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -13,43 +15,26 @@ public partial class RemoveFromTeacherTeachesRelationshipOperation : global::Ope #pragma warning restore CS1591 { /// The data property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public List? Data { get { return BackingStore?.Get?>("data"); } set { BackingStore?.Set("data", value); } } -#nullable restore -#else - public List Data - { - get { return BackingStore?.Get>("data"); } - set { BackingStore?.Set("data", value); } - } -#endif + /// The op property public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.RemoveOperationCode? Op { get { return BackingStore?.Get("op"); } set { BackingStore?.Set("op", value); } } + /// The ref property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.TeacherTeachesRelationshipIdentifier? Ref { get { return BackingStore?.Get("ref"); } set { BackingStore?.Set("ref", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.TeacherTeachesRelationshipIdentifier Ref - { - get { return BackingStore?.Get("ref"); } - set { BackingStore?.Set("ref", value); } - } -#endif + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -60,6 +45,7 @@ public partial class RemoveFromTeacherTeachesRelationshipOperation : global::Ope _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.RemoveFromTeacherTeachesRelationshipOperation(); } + /// /// The deserialization information for the current model /// @@ -73,6 +59,7 @@ public override IDictionary> GetFieldDeserializers() { "ref", n => { Ref = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.TeacherTeachesRelationshipIdentifier.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -88,3 +75,4 @@ public override void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/RemoveOperationCode.cs b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/RemoveOperationCode.cs index e5e55ea0d..6ac92b175 100644 --- a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/RemoveOperationCode.cs +++ b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/RemoveOperationCode.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 using System.Runtime.Serialization; using System; namespace OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models @@ -14,3 +16,4 @@ public enum RemoveOperationCode #pragma warning restore CS1591 } } + diff --git a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/ResourceCollectionTopLevelLinks.cs b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/ResourceCollectionTopLevelLinks.cs index 413b26766..991bdf486 100644 --- a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/ResourceCollectionTopLevelLinks.cs +++ b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/ResourceCollectionTopLevelLinks.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,102 +17,49 @@ public partial class ResourceCollectionTopLevelLinks : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The describedby property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Describedby { get { return BackingStore?.Get("describedby"); } set { BackingStore?.Set("describedby", value); } } -#nullable restore -#else - public string Describedby - { - get { return BackingStore?.Get("describedby"); } - set { BackingStore?.Set("describedby", value); } - } -#endif + /// The first property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? First { get { return BackingStore?.Get("first"); } set { BackingStore?.Set("first", value); } } -#nullable restore -#else - public string First - { - get { return BackingStore?.Get("first"); } - set { BackingStore?.Set("first", value); } - } -#endif + /// The last property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Last { get { return BackingStore?.Get("last"); } set { BackingStore?.Set("last", value); } } -#nullable restore -#else - public string Last - { - get { return BackingStore?.Get("last"); } - set { BackingStore?.Set("last", value); } - } -#endif + /// The next property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Next { get { return BackingStore?.Get("next"); } set { BackingStore?.Set("next", value); } } -#nullable restore -#else - public string Next - { - get { return BackingStore?.Get("next"); } - set { BackingStore?.Set("next", value); } - } -#endif + /// The prev property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Prev { get { return BackingStore?.Get("prev"); } set { BackingStore?.Set("prev", value); } } -#nullable restore -#else - public string Prev - { - get { return BackingStore?.Get("prev"); } - set { BackingStore?.Set("prev", value); } - } -#endif + /// The self property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Self { get { return BackingStore?.Get("self"); } set { BackingStore?.Set("self", value); } } -#nullable restore -#else - public string Self - { - get { return BackingStore?.Get("self"); } - set { BackingStore?.Set("self", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -118,6 +67,7 @@ public ResourceCollectionTopLevelLinks() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -128,6 +78,7 @@ public ResourceCollectionTopLevelLinks() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.ResourceCollectionTopLevelLinks(); } + /// /// The deserialization information for the current model /// @@ -144,6 +95,7 @@ public virtual IDictionary> GetFieldDeserializers() { "self", n => { Self = n.GetStringValue(); } }, }; } + /// /// Serializes information the current object /// @@ -161,3 +113,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/ResourceIdentifierCollectionTopLevelLinks.cs b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/ResourceIdentifierCollectionTopLevelLinks.cs index 3c2074737..57c8a83e3 100644 --- a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/ResourceIdentifierCollectionTopLevelLinks.cs +++ b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/ResourceIdentifierCollectionTopLevelLinks.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,118 +17,56 @@ public partial class ResourceIdentifierCollectionTopLevelLinks : IBackedModel, I { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The describedby property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Describedby { get { return BackingStore?.Get("describedby"); } set { BackingStore?.Set("describedby", value); } } -#nullable restore -#else - public string Describedby - { - get { return BackingStore?.Get("describedby"); } - set { BackingStore?.Set("describedby", value); } - } -#endif + /// The first property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? First { get { return BackingStore?.Get("first"); } set { BackingStore?.Set("first", value); } } -#nullable restore -#else - public string First - { - get { return BackingStore?.Get("first"); } - set { BackingStore?.Set("first", value); } - } -#endif + /// The last property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Last { get { return BackingStore?.Get("last"); } set { BackingStore?.Set("last", value); } } -#nullable restore -#else - public string Last - { - get { return BackingStore?.Get("last"); } - set { BackingStore?.Set("last", value); } - } -#endif + /// The next property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Next { get { return BackingStore?.Get("next"); } set { BackingStore?.Set("next", value); } } -#nullable restore -#else - public string Next - { - get { return BackingStore?.Get("next"); } - set { BackingStore?.Set("next", value); } - } -#endif + /// The prev property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Prev { get { return BackingStore?.Get("prev"); } set { BackingStore?.Set("prev", value); } } -#nullable restore -#else - public string Prev - { - get { return BackingStore?.Get("prev"); } - set { BackingStore?.Set("prev", value); } - } -#endif + /// The related property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Related { get { return BackingStore?.Get("related"); } set { BackingStore?.Set("related", value); } } -#nullable restore -#else - public string Related - { - get { return BackingStore?.Get("related"); } - set { BackingStore?.Set("related", value); } - } -#endif + /// The self property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Self { get { return BackingStore?.Get("self"); } set { BackingStore?.Set("self", value); } } -#nullable restore -#else - public string Self - { - get { return BackingStore?.Get("self"); } - set { BackingStore?.Set("self", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -134,6 +74,7 @@ public ResourceIdentifierCollectionTopLevelLinks() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -144,6 +85,7 @@ public ResourceIdentifierCollectionTopLevelLinks() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.ResourceIdentifierCollectionTopLevelLinks(); } + /// /// The deserialization information for the current model /// @@ -161,6 +103,7 @@ public virtual IDictionary> GetFieldDeserializers() { "self", n => { Self = n.GetStringValue(); } }, }; } + /// /// Serializes information the current object /// @@ -179,3 +122,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/ResourceIdentifierTopLevelLinks.cs b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/ResourceIdentifierTopLevelLinks.cs index 585494709..973fb8a63 100644 --- a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/ResourceIdentifierTopLevelLinks.cs +++ b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/ResourceIdentifierTopLevelLinks.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,54 +17,28 @@ public partial class ResourceIdentifierTopLevelLinks : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The describedby property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Describedby { get { return BackingStore?.Get("describedby"); } set { BackingStore?.Set("describedby", value); } } -#nullable restore -#else - public string Describedby - { - get { return BackingStore?.Get("describedby"); } - set { BackingStore?.Set("describedby", value); } - } -#endif + /// The related property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Related { get { return BackingStore?.Get("related"); } set { BackingStore?.Set("related", value); } } -#nullable restore -#else - public string Related - { - get { return BackingStore?.Get("related"); } - set { BackingStore?.Set("related", value); } - } -#endif + /// The self property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Self { get { return BackingStore?.Get("self"); } set { BackingStore?.Set("self", value); } } -#nullable restore -#else - public string Self - { - get { return BackingStore?.Get("self"); } - set { BackingStore?.Set("self", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -70,6 +46,7 @@ public ResourceIdentifierTopLevelLinks() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -80,6 +57,7 @@ public ResourceIdentifierTopLevelLinks() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.ResourceIdentifierTopLevelLinks(); } + /// /// The deserialization information for the current model /// @@ -93,6 +71,7 @@ public virtual IDictionary> GetFieldDeserializers() { "self", n => { Self = n.GetStringValue(); } }, }; } + /// /// Serializes information the current object /// @@ -107,3 +86,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/ResourceLinks.cs b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/ResourceLinks.cs index 7449cb831..874de2454 100644 --- a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/ResourceLinks.cs +++ b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/ResourceLinks.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,22 +17,14 @@ public partial class ResourceLinks : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The self property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Self { get { return BackingStore?.Get("self"); } set { BackingStore?.Set("self", value); } } -#nullable restore -#else - public string Self - { - get { return BackingStore?.Get("self"); } - set { BackingStore?.Set("self", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -38,6 +32,7 @@ public ResourceLinks() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -48,6 +43,7 @@ public ResourceLinks() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.ResourceLinks(); } + /// /// The deserialization information for the current model /// @@ -59,6 +55,7 @@ public virtual IDictionary> GetFieldDeserializers() { "self", n => { Self = n.GetStringValue(); } }, }; } + /// /// Serializes information the current object /// @@ -71,3 +68,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/ResourceTopLevelLinks.cs b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/ResourceTopLevelLinks.cs index dde497182..d66734479 100644 --- a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/ResourceTopLevelLinks.cs +++ b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/ResourceTopLevelLinks.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,38 +17,21 @@ public partial class ResourceTopLevelLinks : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The describedby property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Describedby { get { return BackingStore?.Get("describedby"); } set { BackingStore?.Set("describedby", value); } } -#nullable restore -#else - public string Describedby - { - get { return BackingStore?.Get("describedby"); } - set { BackingStore?.Set("describedby", value); } - } -#endif + /// The self property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Self { get { return BackingStore?.Get("self"); } set { BackingStore?.Set("self", value); } } -#nullable restore -#else - public string Self - { - get { return BackingStore?.Get("self"); } - set { BackingStore?.Set("self", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -54,6 +39,7 @@ public ResourceTopLevelLinks() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -64,6 +50,7 @@ public ResourceTopLevelLinks() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.ResourceTopLevelLinks(); } + /// /// The deserialization information for the current model /// @@ -76,6 +63,7 @@ public virtual IDictionary> GetFieldDeserializers() { "self", n => { Self = n.GetStringValue(); } }, }; } + /// /// Serializes information the current object /// @@ -89,3 +77,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/ResourceType.cs b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/ResourceType.cs index 2bd3d6cfe..e2e09eae7 100644 --- a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/ResourceType.cs +++ b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/ResourceType.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 using System.Runtime.Serialization; using System; namespace OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models @@ -26,3 +28,4 @@ public enum ResourceType #pragma warning restore CS1591 } } + diff --git a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/StudentAttributesInResponse.cs b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/StudentAttributesInResponse.cs index c1f951b87..deea46f41 100644 --- a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/StudentAttributesInResponse.cs +++ b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/StudentAttributesInResponse.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,38 +17,21 @@ public partial class StudentAttributesInResponse : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The emailAddress property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? EmailAddress { get { return BackingStore?.Get("emailAddress"); } set { BackingStore?.Set("emailAddress", value); } } -#nullable restore -#else - public string EmailAddress - { - get { return BackingStore?.Get("emailAddress"); } - set { BackingStore?.Set("emailAddress", value); } - } -#endif + /// The name property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Name { get { return BackingStore?.Get("name"); } set { BackingStore?.Set("name", value); } } -#nullable restore -#else - public string Name - { - get { return BackingStore?.Get("name"); } - set { BackingStore?.Set("name", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -54,6 +39,7 @@ public StudentAttributesInResponse() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -64,6 +50,7 @@ public StudentAttributesInResponse() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.StudentAttributesInResponse(); } + /// /// The deserialization information for the current model /// @@ -76,6 +63,7 @@ public virtual IDictionary> GetFieldDeserializers() { "name", n => { Name = n.GetStringValue(); } }, }; } + /// /// Serializes information the current object /// @@ -89,3 +77,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/StudentCollectionResponseDocument.cs b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/StudentCollectionResponseDocument.cs index 590d4a3aa..f82dd5daf 100644 --- a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/StudentCollectionResponseDocument.cs +++ b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/StudentCollectionResponseDocument.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,86 +17,42 @@ public partial class StudentCollectionResponseDocument : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The data property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public List? Data { get { return BackingStore?.Get?>("data"); } set { BackingStore?.Set("data", value); } } -#nullable restore -#else - public List Data - { - get { return BackingStore?.Get>("data"); } - set { BackingStore?.Set("data", value); } - } -#endif + /// The included property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public List? Included { get { return BackingStore?.Get?>("included"); } set { BackingStore?.Set("included", value); } } -#nullable restore -#else - public List Included - { - get { return BackingStore?.Get>("included"); } - set { BackingStore?.Set("included", value); } - } -#endif + /// The jsonapi property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Jsonapi? Jsonapi { get { return BackingStore?.Get("jsonapi"); } set { BackingStore?.Set("jsonapi", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Jsonapi Jsonapi - { - get { return BackingStore?.Get("jsonapi"); } - set { BackingStore?.Set("jsonapi", value); } - } -#endif + /// The links property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.ResourceCollectionTopLevelLinks? Links { get { return BackingStore?.Get("links"); } set { BackingStore?.Set("links", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.ResourceCollectionTopLevelLinks Links - { - get { return BackingStore?.Get("links"); } - set { BackingStore?.Set("links", value); } - } -#endif + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -102,6 +60,7 @@ public StudentCollectionResponseDocument() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -112,6 +71,7 @@ public StudentCollectionResponseDocument() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.StudentCollectionResponseDocument(); } + /// /// The deserialization information for the current model /// @@ -127,6 +87,7 @@ public virtual IDictionary> GetFieldDeserializers() { "meta", n => { Meta = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Meta.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -143,3 +104,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/StudentDataInResponse.cs b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/StudentDataInResponse.cs index 87f942e8a..2917f1810 100644 --- a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/StudentDataInResponse.cs +++ b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/StudentDataInResponse.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -13,69 +15,33 @@ public partial class StudentDataInResponse : global::OpenApiKiotaEndToEndTests.A #pragma warning restore CS1591 { /// The attributes property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.StudentAttributesInResponse? Attributes { get { return BackingStore?.Get("attributes"); } set { BackingStore?.Set("attributes", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.StudentAttributesInResponse Attributes - { - get { return BackingStore?.Get("attributes"); } - set { BackingStore?.Set("attributes", value); } - } -#endif + /// The id property -#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 links property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.ResourceLinks? Links { get { return BackingStore?.Get("links"); } set { BackingStore?.Set("links", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.ResourceLinks Links - { - get { return BackingStore?.Get("links"); } - set { BackingStore?.Set("links", value); } - } -#endif + /// The relationships property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.StudentRelationshipsInResponse? Relationships { get { return BackingStore?.Get("relationships"); } set { BackingStore?.Set("relationships", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.StudentRelationshipsInResponse Relationships - { - get { return BackingStore?.Get("relationships"); } - set { BackingStore?.Set("relationships", value); } - } -#endif + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -86,6 +52,7 @@ public string Id _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.StudentDataInResponse(); } + /// /// The deserialization information for the current model /// @@ -100,6 +67,7 @@ public override IDictionary> GetFieldDeserializers() { "relationships", n => { Relationships = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.StudentRelationshipsInResponse.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -116,3 +84,4 @@ public override void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/StudentEnrollmentsRelationshipIdentifier.cs b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/StudentEnrollmentsRelationshipIdentifier.cs index 12379c00d..9ce77162f 100644 --- a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/StudentEnrollmentsRelationshipIdentifier.cs +++ b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/StudentEnrollmentsRelationshipIdentifier.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,50 +17,35 @@ public partial class StudentEnrollmentsRelationshipIdentifier : IBackedModel, IP { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The id property -#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 lid property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Lid { get { return BackingStore?.Get("lid"); } set { BackingStore?.Set("lid", value); } } -#nullable restore -#else - public string Lid - { - get { return BackingStore?.Get("lid"); } - set { BackingStore?.Set("lid", value); } - } -#endif + /// The relationship property public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.StudentEnrollmentsRelationshipName? Relationship { get { return BackingStore?.Get("relationship"); } set { BackingStore?.Set("relationship", value); } } + /// The type property public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.StudentResourceType? Type { get { return BackingStore?.Get("type"); } set { BackingStore?.Set("type", value); } } + /// /// Instantiates a new and sets the default values. /// @@ -66,6 +53,7 @@ public StudentEnrollmentsRelationshipIdentifier() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -76,6 +64,7 @@ public StudentEnrollmentsRelationshipIdentifier() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.StudentEnrollmentsRelationshipIdentifier(); } + /// /// The deserialization information for the current model /// @@ -90,6 +79,7 @@ public virtual IDictionary> GetFieldDeserializers() { "type", n => { Type = n.GetEnumValue(); } }, }; } + /// /// Serializes information the current object /// @@ -105,3 +95,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/StudentEnrollmentsRelationshipName.cs b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/StudentEnrollmentsRelationshipName.cs index 4ee25bbe6..b24fbce59 100644 --- a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/StudentEnrollmentsRelationshipName.cs +++ b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/StudentEnrollmentsRelationshipName.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 using System.Runtime.Serialization; using System; namespace OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models @@ -14,3 +16,4 @@ public enum StudentEnrollmentsRelationshipName #pragma warning restore CS1591 } } + diff --git a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/StudentIdentifierCollectionResponseDocument.cs b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/StudentIdentifierCollectionResponseDocument.cs index 2745807e7..aa6f78724 100644 --- a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/StudentIdentifierCollectionResponseDocument.cs +++ b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/StudentIdentifierCollectionResponseDocument.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,70 +17,35 @@ public partial class StudentIdentifierCollectionResponseDocument : IBackedModel, { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The data property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public List? Data { get { return BackingStore?.Get?>("data"); } set { BackingStore?.Set("data", value); } } -#nullable restore -#else - public List Data - { - get { return BackingStore?.Get>("data"); } - set { BackingStore?.Set("data", value); } - } -#endif + /// The jsonapi property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Jsonapi? Jsonapi { get { return BackingStore?.Get("jsonapi"); } set { BackingStore?.Set("jsonapi", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Jsonapi Jsonapi - { - get { return BackingStore?.Get("jsonapi"); } - set { BackingStore?.Set("jsonapi", value); } - } -#endif + /// The links property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.ResourceIdentifierCollectionTopLevelLinks? Links { get { return BackingStore?.Get("links"); } set { BackingStore?.Set("links", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.ResourceIdentifierCollectionTopLevelLinks Links - { - get { return BackingStore?.Get("links"); } - set { BackingStore?.Set("links", value); } - } -#endif + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -86,6 +53,7 @@ public StudentIdentifierCollectionResponseDocument() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -96,6 +64,7 @@ public StudentIdentifierCollectionResponseDocument() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.StudentIdentifierCollectionResponseDocument(); } + /// /// The deserialization information for the current model /// @@ -110,6 +79,7 @@ public virtual IDictionary> GetFieldDeserializers() { "meta", n => { Meta = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Meta.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -125,3 +95,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/StudentIdentifierInRequest.cs b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/StudentIdentifierInRequest.cs index ad1d321a8..b873f8db7 100644 --- a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/StudentIdentifierInRequest.cs +++ b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/StudentIdentifierInRequest.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,60 +17,35 @@ public partial class StudentIdentifierInRequest : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The id property -#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 lid property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Lid { get { return BackingStore?.Get("lid"); } set { BackingStore?.Set("lid", value); } } -#nullable restore -#else - public string Lid - { - get { return BackingStore?.Get("lid"); } - set { BackingStore?.Set("lid", value); } - } -#endif + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// The type property public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.StudentResourceType? Type { get { return BackingStore?.Get("type"); } set { BackingStore?.Set("type", value); } } + /// /// Instantiates a new and sets the default values. /// @@ -76,6 +53,7 @@ public StudentIdentifierInRequest() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -86,6 +64,7 @@ public StudentIdentifierInRequest() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.StudentIdentifierInRequest(); } + /// /// The deserialization information for the current model /// @@ -100,6 +79,7 @@ public virtual IDictionary> GetFieldDeserializers() { "type", n => { Type = n.GetEnumValue(); } }, }; } + /// /// Serializes information the current object /// @@ -115,3 +95,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/StudentIdentifierInResponse.cs b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/StudentIdentifierInResponse.cs index d46136c63..ca2a23550 100644 --- a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/StudentIdentifierInResponse.cs +++ b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/StudentIdentifierInResponse.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,44 +17,28 @@ public partial class StudentIdentifierInResponse : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The id property -#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 meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// The type property public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.StudentResourceType? Type { get { return BackingStore?.Get("type"); } set { BackingStore?.Set("type", value); } } + /// /// Instantiates a new and sets the default values. /// @@ -60,6 +46,7 @@ public StudentIdentifierInResponse() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -70,6 +57,7 @@ public StudentIdentifierInResponse() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.StudentIdentifierInResponse(); } + /// /// The deserialization information for the current model /// @@ -83,6 +71,7 @@ public virtual IDictionary> GetFieldDeserializers() { "type", n => { Type = n.GetEnumValue(); } }, }; } + /// /// Serializes information the current object /// @@ -97,3 +86,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/StudentIdentifierResponseDocument.cs b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/StudentIdentifierResponseDocument.cs index ea69fd261..f37b557d4 100644 --- a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/StudentIdentifierResponseDocument.cs +++ b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/StudentIdentifierResponseDocument.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,70 +17,35 @@ public partial class StudentIdentifierResponseDocument : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The data property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.StudentIdentifierInResponse? Data { get { return BackingStore?.Get("data"); } set { BackingStore?.Set("data", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.StudentIdentifierInResponse Data - { - get { return BackingStore?.Get("data"); } - set { BackingStore?.Set("data", value); } - } -#endif + /// The jsonapi property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Jsonapi? Jsonapi { get { return BackingStore?.Get("jsonapi"); } set { BackingStore?.Set("jsonapi", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Jsonapi Jsonapi - { - get { return BackingStore?.Get("jsonapi"); } - set { BackingStore?.Set("jsonapi", value); } - } -#endif + /// The links property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.ResourceIdentifierTopLevelLinks? Links { get { return BackingStore?.Get("links"); } set { BackingStore?.Set("links", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.ResourceIdentifierTopLevelLinks Links - { - get { return BackingStore?.Get("links"); } - set { BackingStore?.Set("links", value); } - } -#endif + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -86,6 +53,7 @@ public StudentIdentifierResponseDocument() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -96,6 +64,7 @@ public StudentIdentifierResponseDocument() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.StudentIdentifierResponseDocument(); } + /// /// The deserialization information for the current model /// @@ -110,6 +79,7 @@ public virtual IDictionary> GetFieldDeserializers() { "meta", n => { Meta = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Meta.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -125,3 +95,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/StudentMentorRelationshipIdentifier.cs b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/StudentMentorRelationshipIdentifier.cs index 4a394cb88..f7915b0e2 100644 --- a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/StudentMentorRelationshipIdentifier.cs +++ b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/StudentMentorRelationshipIdentifier.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,50 +17,35 @@ public partial class StudentMentorRelationshipIdentifier : IBackedModel, IParsab { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The id property -#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 lid property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Lid { get { return BackingStore?.Get("lid"); } set { BackingStore?.Set("lid", value); } } -#nullable restore -#else - public string Lid - { - get { return BackingStore?.Get("lid"); } - set { BackingStore?.Set("lid", value); } - } -#endif + /// The relationship property public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.StudentMentorRelationshipName? Relationship { get { return BackingStore?.Get("relationship"); } set { BackingStore?.Set("relationship", value); } } + /// The type property public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.StudentResourceType? Type { get { return BackingStore?.Get("type"); } set { BackingStore?.Set("type", value); } } + /// /// Instantiates a new and sets the default values. /// @@ -66,6 +53,7 @@ public StudentMentorRelationshipIdentifier() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -76,6 +64,7 @@ public StudentMentorRelationshipIdentifier() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.StudentMentorRelationshipIdentifier(); } + /// /// The deserialization information for the current model /// @@ -90,6 +79,7 @@ public virtual IDictionary> GetFieldDeserializers() { "type", n => { Type = n.GetEnumValue(); } }, }; } + /// /// Serializes information the current object /// @@ -105,3 +95,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/StudentMentorRelationshipName.cs b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/StudentMentorRelationshipName.cs index 50fe9e522..a8e8a5073 100644 --- a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/StudentMentorRelationshipName.cs +++ b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/StudentMentorRelationshipName.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 using System.Runtime.Serialization; using System; namespace OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models @@ -14,3 +16,4 @@ public enum StudentMentorRelationshipName #pragma warning restore CS1591 } } + diff --git a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/StudentPrimaryResponseDocument.cs b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/StudentPrimaryResponseDocument.cs index 03fb5270e..95e24bbb4 100644 --- a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/StudentPrimaryResponseDocument.cs +++ b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/StudentPrimaryResponseDocument.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,86 +17,42 @@ public partial class StudentPrimaryResponseDocument : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The data property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.StudentDataInResponse? Data { get { return BackingStore?.Get("data"); } set { BackingStore?.Set("data", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.StudentDataInResponse Data - { - get { return BackingStore?.Get("data"); } - set { BackingStore?.Set("data", value); } - } -#endif + /// The included property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public List? Included { get { return BackingStore?.Get?>("included"); } set { BackingStore?.Set("included", value); } } -#nullable restore -#else - public List Included - { - get { return BackingStore?.Get>("included"); } - set { BackingStore?.Set("included", value); } - } -#endif + /// The jsonapi property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Jsonapi? Jsonapi { get { return BackingStore?.Get("jsonapi"); } set { BackingStore?.Set("jsonapi", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Jsonapi Jsonapi - { - get { return BackingStore?.Get("jsonapi"); } - set { BackingStore?.Set("jsonapi", value); } - } -#endif + /// The links property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.ResourceTopLevelLinks? Links { get { return BackingStore?.Get("links"); } set { BackingStore?.Set("links", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.ResourceTopLevelLinks Links - { - get { return BackingStore?.Get("links"); } - set { BackingStore?.Set("links", value); } - } -#endif + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -102,6 +60,7 @@ public StudentPrimaryResponseDocument() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -112,6 +71,7 @@ public StudentPrimaryResponseDocument() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.StudentPrimaryResponseDocument(); } + /// /// The deserialization information for the current model /// @@ -127,6 +87,7 @@ public virtual IDictionary> GetFieldDeserializers() { "meta", n => { Meta = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Meta.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -143,3 +104,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/StudentRelationshipsInResponse.cs b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/StudentRelationshipsInResponse.cs index ac746baa1..246b99af3 100644 --- a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/StudentRelationshipsInResponse.cs +++ b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/StudentRelationshipsInResponse.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,38 +17,21 @@ public partial class StudentRelationshipsInResponse : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The enrollments property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.ToManyEnrollmentInResponse? Enrollments { get { return BackingStore?.Get("enrollments"); } set { BackingStore?.Set("enrollments", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.ToManyEnrollmentInResponse Enrollments - { - get { return BackingStore?.Get("enrollments"); } - set { BackingStore?.Set("enrollments", value); } - } -#endif + /// The mentor property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.NullableToOneTeacherInResponse? Mentor { get { return BackingStore?.Get("mentor"); } set { BackingStore?.Set("mentor", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.NullableToOneTeacherInResponse Mentor - { - get { return BackingStore?.Get("mentor"); } - set { BackingStore?.Set("mentor", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -54,6 +39,7 @@ public StudentRelationshipsInResponse() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -64,6 +50,7 @@ public StudentRelationshipsInResponse() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.StudentRelationshipsInResponse(); } + /// /// The deserialization information for the current model /// @@ -76,6 +63,7 @@ public virtual IDictionary> GetFieldDeserializers() { "mentor", n => { Mentor = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.NullableToOneTeacherInResponse.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -89,3 +77,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/StudentResourceType.cs b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/StudentResourceType.cs index 80a9e06b8..5e65c1c6b 100644 --- a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/StudentResourceType.cs +++ b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/StudentResourceType.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 using System.Runtime.Serialization; using System; namespace OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models @@ -14,3 +16,4 @@ public enum StudentResourceType #pragma warning restore CS1591 } } + diff --git a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/StudentSecondaryResponseDocument.cs b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/StudentSecondaryResponseDocument.cs index db9ed8964..4b56fd5fa 100644 --- a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/StudentSecondaryResponseDocument.cs +++ b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/StudentSecondaryResponseDocument.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,86 +17,42 @@ public partial class StudentSecondaryResponseDocument : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The data property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.StudentDataInResponse? Data { get { return BackingStore?.Get("data"); } set { BackingStore?.Set("data", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.StudentDataInResponse Data - { - get { return BackingStore?.Get("data"); } - set { BackingStore?.Set("data", value); } - } -#endif + /// The included property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public List? Included { get { return BackingStore?.Get?>("included"); } set { BackingStore?.Set("included", value); } } -#nullable restore -#else - public List Included - { - get { return BackingStore?.Get>("included"); } - set { BackingStore?.Set("included", value); } - } -#endif + /// The jsonapi property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Jsonapi? Jsonapi { get { return BackingStore?.Get("jsonapi"); } set { BackingStore?.Set("jsonapi", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Jsonapi Jsonapi - { - get { return BackingStore?.Get("jsonapi"); } - set { BackingStore?.Set("jsonapi", value); } - } -#endif + /// The links property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.ResourceTopLevelLinks? Links { get { return BackingStore?.Get("links"); } set { BackingStore?.Set("links", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.ResourceTopLevelLinks Links - { - get { return BackingStore?.Get("links"); } - set { BackingStore?.Set("links", value); } - } -#endif + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -102,6 +60,7 @@ public StudentSecondaryResponseDocument() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -112,6 +71,7 @@ public StudentSecondaryResponseDocument() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.StudentSecondaryResponseDocument(); } + /// /// The deserialization information for the current model /// @@ -127,6 +87,7 @@ public virtual IDictionary> GetFieldDeserializers() { "meta", n => { Meta = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Meta.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -143,3 +104,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/TeacherAttributesInResponse.cs b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/TeacherAttributesInResponse.cs index 92db3ce98..206458ed5 100644 --- a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/TeacherAttributesInResponse.cs +++ b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/TeacherAttributesInResponse.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,38 +17,21 @@ public partial class TeacherAttributesInResponse : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The emailAddress property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? EmailAddress { get { return BackingStore?.Get("emailAddress"); } set { BackingStore?.Set("emailAddress", value); } } -#nullable restore -#else - public string EmailAddress - { - get { return BackingStore?.Get("emailAddress"); } - set { BackingStore?.Set("emailAddress", value); } - } -#endif + /// The name property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Name { get { return BackingStore?.Get("name"); } set { BackingStore?.Set("name", value); } } -#nullable restore -#else - public string Name - { - get { return BackingStore?.Get("name"); } - set { BackingStore?.Set("name", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -54,6 +39,7 @@ public TeacherAttributesInResponse() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -64,6 +50,7 @@ public TeacherAttributesInResponse() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.TeacherAttributesInResponse(); } + /// /// The deserialization information for the current model /// @@ -76,6 +63,7 @@ public virtual IDictionary> GetFieldDeserializers() { "name", n => { Name = n.GetStringValue(); } }, }; } + /// /// Serializes information the current object /// @@ -89,3 +77,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/TeacherCollectionResponseDocument.cs b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/TeacherCollectionResponseDocument.cs index 9f9316093..b5b0892ef 100644 --- a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/TeacherCollectionResponseDocument.cs +++ b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/TeacherCollectionResponseDocument.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,86 +17,42 @@ public partial class TeacherCollectionResponseDocument : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The data property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public List? Data { get { return BackingStore?.Get?>("data"); } set { BackingStore?.Set("data", value); } } -#nullable restore -#else - public List Data - { - get { return BackingStore?.Get>("data"); } - set { BackingStore?.Set("data", value); } - } -#endif + /// The included property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public List? Included { get { return BackingStore?.Get?>("included"); } set { BackingStore?.Set("included", value); } } -#nullable restore -#else - public List Included - { - get { return BackingStore?.Get>("included"); } - set { BackingStore?.Set("included", value); } - } -#endif + /// The jsonapi property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Jsonapi? Jsonapi { get { return BackingStore?.Get("jsonapi"); } set { BackingStore?.Set("jsonapi", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Jsonapi Jsonapi - { - get { return BackingStore?.Get("jsonapi"); } - set { BackingStore?.Set("jsonapi", value); } - } -#endif + /// The links property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.ResourceCollectionTopLevelLinks? Links { get { return BackingStore?.Get("links"); } set { BackingStore?.Set("links", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.ResourceCollectionTopLevelLinks Links - { - get { return BackingStore?.Get("links"); } - set { BackingStore?.Set("links", value); } - } -#endif + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -102,6 +60,7 @@ public TeacherCollectionResponseDocument() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -112,6 +71,7 @@ public TeacherCollectionResponseDocument() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.TeacherCollectionResponseDocument(); } + /// /// The deserialization information for the current model /// @@ -127,6 +87,7 @@ public virtual IDictionary> GetFieldDeserializers() { "meta", n => { Meta = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Meta.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -143,3 +104,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/TeacherDataInResponse.cs b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/TeacherDataInResponse.cs index b4cf5b131..e52a4517f 100644 --- a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/TeacherDataInResponse.cs +++ b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/TeacherDataInResponse.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -13,69 +15,33 @@ public partial class TeacherDataInResponse : global::OpenApiKiotaEndToEndTests.A #pragma warning restore CS1591 { /// The attributes property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.TeacherAttributesInResponse? Attributes { get { return BackingStore?.Get("attributes"); } set { BackingStore?.Set("attributes", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.TeacherAttributesInResponse Attributes - { - get { return BackingStore?.Get("attributes"); } - set { BackingStore?.Set("attributes", value); } - } -#endif + /// The id property -#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 links property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.ResourceLinks? Links { get { return BackingStore?.Get("links"); } set { BackingStore?.Set("links", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.ResourceLinks Links - { - get { return BackingStore?.Get("links"); } - set { BackingStore?.Set("links", value); } - } -#endif + /// The relationships property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.TeacherRelationshipsInResponse? Relationships { get { return BackingStore?.Get("relationships"); } set { BackingStore?.Set("relationships", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.TeacherRelationshipsInResponse Relationships - { - get { return BackingStore?.Get("relationships"); } - set { BackingStore?.Set("relationships", value); } - } -#endif + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -86,6 +52,7 @@ public string Id _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.TeacherDataInResponse(); } + /// /// The deserialization information for the current model /// @@ -100,6 +67,7 @@ public override IDictionary> GetFieldDeserializers() { "relationships", n => { Relationships = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.TeacherRelationshipsInResponse.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -116,3 +84,4 @@ public override void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/TeacherIdentifierCollectionResponseDocument.cs b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/TeacherIdentifierCollectionResponseDocument.cs index cdf705d1e..a0ea7ec9e 100644 --- a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/TeacherIdentifierCollectionResponseDocument.cs +++ b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/TeacherIdentifierCollectionResponseDocument.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,70 +17,35 @@ public partial class TeacherIdentifierCollectionResponseDocument : IBackedModel, { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The data property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public List? Data { get { return BackingStore?.Get?>("data"); } set { BackingStore?.Set("data", value); } } -#nullable restore -#else - public List Data - { - get { return BackingStore?.Get>("data"); } - set { BackingStore?.Set("data", value); } - } -#endif + /// The jsonapi property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Jsonapi? Jsonapi { get { return BackingStore?.Get("jsonapi"); } set { BackingStore?.Set("jsonapi", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Jsonapi Jsonapi - { - get { return BackingStore?.Get("jsonapi"); } - set { BackingStore?.Set("jsonapi", value); } - } -#endif + /// The links property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.ResourceIdentifierCollectionTopLevelLinks? Links { get { return BackingStore?.Get("links"); } set { BackingStore?.Set("links", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.ResourceIdentifierCollectionTopLevelLinks Links - { - get { return BackingStore?.Get("links"); } - set { BackingStore?.Set("links", value); } - } -#endif + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -86,6 +53,7 @@ public TeacherIdentifierCollectionResponseDocument() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -96,6 +64,7 @@ public TeacherIdentifierCollectionResponseDocument() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.TeacherIdentifierCollectionResponseDocument(); } + /// /// The deserialization information for the current model /// @@ -110,6 +79,7 @@ public virtual IDictionary> GetFieldDeserializers() { "meta", n => { Meta = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Meta.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -125,3 +95,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/TeacherIdentifierInRequest.cs b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/TeacherIdentifierInRequest.cs index 071d5e97b..f73c97b9c 100644 --- a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/TeacherIdentifierInRequest.cs +++ b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/TeacherIdentifierInRequest.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,60 +17,35 @@ public partial class TeacherIdentifierInRequest : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The id property -#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 lid property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Lid { get { return BackingStore?.Get("lid"); } set { BackingStore?.Set("lid", value); } } -#nullable restore -#else - public string Lid - { - get { return BackingStore?.Get("lid"); } - set { BackingStore?.Set("lid", value); } - } -#endif + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// The type property public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.TeacherResourceType? Type { get { return BackingStore?.Get("type"); } set { BackingStore?.Set("type", value); } } + /// /// Instantiates a new and sets the default values. /// @@ -76,6 +53,7 @@ public TeacherIdentifierInRequest() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -86,6 +64,7 @@ public TeacherIdentifierInRequest() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.TeacherIdentifierInRequest(); } + /// /// The deserialization information for the current model /// @@ -100,6 +79,7 @@ public virtual IDictionary> GetFieldDeserializers() { "type", n => { Type = n.GetEnumValue(); } }, }; } + /// /// Serializes information the current object /// @@ -115,3 +95,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/TeacherIdentifierInResponse.cs b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/TeacherIdentifierInResponse.cs index 480327a31..b5ec1b3c8 100644 --- a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/TeacherIdentifierInResponse.cs +++ b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/TeacherIdentifierInResponse.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,44 +17,28 @@ public partial class TeacherIdentifierInResponse : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The id property -#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 meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// The type property public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.TeacherResourceType? Type { get { return BackingStore?.Get("type"); } set { BackingStore?.Set("type", value); } } + /// /// Instantiates a new and sets the default values. /// @@ -60,6 +46,7 @@ public TeacherIdentifierInResponse() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -70,6 +57,7 @@ public TeacherIdentifierInResponse() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.TeacherIdentifierInResponse(); } + /// /// The deserialization information for the current model /// @@ -83,6 +71,7 @@ public virtual IDictionary> GetFieldDeserializers() { "type", n => { Type = n.GetEnumValue(); } }, }; } + /// /// Serializes information the current object /// @@ -97,3 +86,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/TeacherMentorsRelationshipIdentifier.cs b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/TeacherMentorsRelationshipIdentifier.cs index 33837293b..c7396e923 100644 --- a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/TeacherMentorsRelationshipIdentifier.cs +++ b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/TeacherMentorsRelationshipIdentifier.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,50 +17,35 @@ public partial class TeacherMentorsRelationshipIdentifier : IBackedModel, IParsa { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The id property -#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 lid property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Lid { get { return BackingStore?.Get("lid"); } set { BackingStore?.Set("lid", value); } } -#nullable restore -#else - public string Lid - { - get { return BackingStore?.Get("lid"); } - set { BackingStore?.Set("lid", value); } - } -#endif + /// The relationship property public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.TeacherMentorsRelationshipName? Relationship { get { return BackingStore?.Get("relationship"); } set { BackingStore?.Set("relationship", value); } } + /// The type property public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.TeacherResourceType? Type { get { return BackingStore?.Get("type"); } set { BackingStore?.Set("type", value); } } + /// /// Instantiates a new and sets the default values. /// @@ -66,6 +53,7 @@ public TeacherMentorsRelationshipIdentifier() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -76,6 +64,7 @@ public TeacherMentorsRelationshipIdentifier() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.TeacherMentorsRelationshipIdentifier(); } + /// /// The deserialization information for the current model /// @@ -90,6 +79,7 @@ public virtual IDictionary> GetFieldDeserializers() { "type", n => { Type = n.GetEnumValue(); } }, }; } + /// /// Serializes information the current object /// @@ -105,3 +95,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/TeacherMentorsRelationshipName.cs b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/TeacherMentorsRelationshipName.cs index 1a00f7c7e..7c3370821 100644 --- a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/TeacherMentorsRelationshipName.cs +++ b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/TeacherMentorsRelationshipName.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 using System.Runtime.Serialization; using System; namespace OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models @@ -14,3 +16,4 @@ public enum TeacherMentorsRelationshipName #pragma warning restore CS1591 } } + diff --git a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/TeacherPrimaryResponseDocument.cs b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/TeacherPrimaryResponseDocument.cs index f9da50298..b5b4076a5 100644 --- a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/TeacherPrimaryResponseDocument.cs +++ b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/TeacherPrimaryResponseDocument.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,86 +17,42 @@ public partial class TeacherPrimaryResponseDocument : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The data property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.TeacherDataInResponse? Data { get { return BackingStore?.Get("data"); } set { BackingStore?.Set("data", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.TeacherDataInResponse Data - { - get { return BackingStore?.Get("data"); } - set { BackingStore?.Set("data", value); } - } -#endif + /// The included property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public List? Included { get { return BackingStore?.Get?>("included"); } set { BackingStore?.Set("included", value); } } -#nullable restore -#else - public List Included - { - get { return BackingStore?.Get>("included"); } - set { BackingStore?.Set("included", value); } - } -#endif + /// The jsonapi property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Jsonapi? Jsonapi { get { return BackingStore?.Get("jsonapi"); } set { BackingStore?.Set("jsonapi", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Jsonapi Jsonapi - { - get { return BackingStore?.Get("jsonapi"); } - set { BackingStore?.Set("jsonapi", value); } - } -#endif + /// The links property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.ResourceTopLevelLinks? Links { get { return BackingStore?.Get("links"); } set { BackingStore?.Set("links", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.ResourceTopLevelLinks Links - { - get { return BackingStore?.Get("links"); } - set { BackingStore?.Set("links", value); } - } -#endif + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -102,6 +60,7 @@ public TeacherPrimaryResponseDocument() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -112,6 +71,7 @@ public TeacherPrimaryResponseDocument() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.TeacherPrimaryResponseDocument(); } + /// /// The deserialization information for the current model /// @@ -127,6 +87,7 @@ public virtual IDictionary> GetFieldDeserializers() { "meta", n => { Meta = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Meta.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -143,3 +104,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/TeacherRelationshipsInResponse.cs b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/TeacherRelationshipsInResponse.cs index 99d5afe62..288b91641 100644 --- a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/TeacherRelationshipsInResponse.cs +++ b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/TeacherRelationshipsInResponse.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,38 +17,21 @@ public partial class TeacherRelationshipsInResponse : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The mentors property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.ToManyStudentInResponse? Mentors { get { return BackingStore?.Get("mentors"); } set { BackingStore?.Set("mentors", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.ToManyStudentInResponse Mentors - { - get { return BackingStore?.Get("mentors"); } - set { BackingStore?.Set("mentors", value); } - } -#endif + /// The teaches property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.ToManyCourseInResponse? Teaches { get { return BackingStore?.Get("teaches"); } set { BackingStore?.Set("teaches", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.ToManyCourseInResponse Teaches - { - get { return BackingStore?.Get("teaches"); } - set { BackingStore?.Set("teaches", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -54,6 +39,7 @@ public TeacherRelationshipsInResponse() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -64,6 +50,7 @@ public TeacherRelationshipsInResponse() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.TeacherRelationshipsInResponse(); } + /// /// The deserialization information for the current model /// @@ -76,6 +63,7 @@ public virtual IDictionary> GetFieldDeserializers() { "teaches", n => { Teaches = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.ToManyCourseInResponse.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -89,3 +77,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/TeacherResourceType.cs b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/TeacherResourceType.cs index 0376cb577..2ab83895f 100644 --- a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/TeacherResourceType.cs +++ b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/TeacherResourceType.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 using System.Runtime.Serialization; using System; namespace OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models @@ -14,3 +16,4 @@ public enum TeacherResourceType #pragma warning restore CS1591 } } + diff --git a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/TeacherTeachesRelationshipIdentifier.cs b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/TeacherTeachesRelationshipIdentifier.cs index 289353f09..ece1fd473 100644 --- a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/TeacherTeachesRelationshipIdentifier.cs +++ b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/TeacherTeachesRelationshipIdentifier.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,50 +17,35 @@ public partial class TeacherTeachesRelationshipIdentifier : IBackedModel, IParsa { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The id property -#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 lid property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Lid { get { return BackingStore?.Get("lid"); } set { BackingStore?.Set("lid", value); } } -#nullable restore -#else - public string Lid - { - get { return BackingStore?.Get("lid"); } - set { BackingStore?.Set("lid", value); } - } -#endif + /// The relationship property public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.TeacherTeachesRelationshipName? Relationship { get { return BackingStore?.Get("relationship"); } set { BackingStore?.Set("relationship", value); } } + /// The type property public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.TeacherResourceType? Type { get { return BackingStore?.Get("type"); } set { BackingStore?.Set("type", value); } } + /// /// Instantiates a new and sets the default values. /// @@ -66,6 +53,7 @@ public TeacherTeachesRelationshipIdentifier() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -76,6 +64,7 @@ public TeacherTeachesRelationshipIdentifier() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.TeacherTeachesRelationshipIdentifier(); } + /// /// The deserialization information for the current model /// @@ -90,6 +79,7 @@ public virtual IDictionary> GetFieldDeserializers() { "type", n => { Type = n.GetEnumValue(); } }, }; } + /// /// Serializes information the current object /// @@ -105,3 +95,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/TeacherTeachesRelationshipName.cs b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/TeacherTeachesRelationshipName.cs index e55f79f3e..c0cd61406 100644 --- a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/TeacherTeachesRelationshipName.cs +++ b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/TeacherTeachesRelationshipName.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 using System.Runtime.Serialization; using System; namespace OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models @@ -14,3 +16,4 @@ public enum TeacherTeachesRelationshipName #pragma warning restore CS1591 } } + diff --git a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/ToManyCourseInRequest.cs b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/ToManyCourseInRequest.cs index 978c13106..1616e6c54 100644 --- a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/ToManyCourseInRequest.cs +++ b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/ToManyCourseInRequest.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,38 +17,21 @@ public partial class ToManyCourseInRequest : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The data property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public List? Data { get { return BackingStore?.Get?>("data"); } set { BackingStore?.Set("data", value); } } -#nullable restore -#else - public List Data - { - get { return BackingStore?.Get>("data"); } - set { BackingStore?.Set("data", value); } - } -#endif + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -54,6 +39,7 @@ public ToManyCourseInRequest() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -64,6 +50,7 @@ public ToManyCourseInRequest() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.ToManyCourseInRequest(); } + /// /// The deserialization information for the current model /// @@ -76,6 +63,7 @@ public virtual IDictionary> GetFieldDeserializers() { "meta", n => { Meta = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Meta.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -89,3 +77,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/ToManyCourseInResponse.cs b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/ToManyCourseInResponse.cs index 9a7ea703c..dc0e29e12 100644 --- a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/ToManyCourseInResponse.cs +++ b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/ToManyCourseInResponse.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,54 +17,28 @@ public partial class ToManyCourseInResponse : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The data property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public List? Data { get { return BackingStore?.Get?>("data"); } set { BackingStore?.Set("data", value); } } -#nullable restore -#else - public List Data - { - get { return BackingStore?.Get>("data"); } - set { BackingStore?.Set("data", value); } - } -#endif + /// The links property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.RelationshipLinks? Links { get { return BackingStore?.Get("links"); } set { BackingStore?.Set("links", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.RelationshipLinks Links - { - get { return BackingStore?.Get("links"); } - set { BackingStore?.Set("links", value); } - } -#endif + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -70,6 +46,7 @@ public ToManyCourseInResponse() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -80,6 +57,7 @@ public ToManyCourseInResponse() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.ToManyCourseInResponse(); } + /// /// The deserialization information for the current model /// @@ -93,6 +71,7 @@ public virtual IDictionary> GetFieldDeserializers() { "meta", n => { Meta = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Meta.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -107,3 +86,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/ToManyEnrollmentInRequest.cs b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/ToManyEnrollmentInRequest.cs index 86df45053..dfd8bf90b 100644 --- a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/ToManyEnrollmentInRequest.cs +++ b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/ToManyEnrollmentInRequest.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,38 +17,21 @@ public partial class ToManyEnrollmentInRequest : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The data property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public List? Data { get { return BackingStore?.Get?>("data"); } set { BackingStore?.Set("data", value); } } -#nullable restore -#else - public List Data - { - get { return BackingStore?.Get>("data"); } - set { BackingStore?.Set("data", value); } - } -#endif + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -54,6 +39,7 @@ public ToManyEnrollmentInRequest() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -64,6 +50,7 @@ public ToManyEnrollmentInRequest() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.ToManyEnrollmentInRequest(); } + /// /// The deserialization information for the current model /// @@ -76,6 +63,7 @@ public virtual IDictionary> GetFieldDeserializers() { "meta", n => { Meta = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Meta.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -89,3 +77,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/ToManyEnrollmentInResponse.cs b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/ToManyEnrollmentInResponse.cs index 61283f268..6a62bc387 100644 --- a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/ToManyEnrollmentInResponse.cs +++ b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/ToManyEnrollmentInResponse.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,54 +17,28 @@ public partial class ToManyEnrollmentInResponse : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The data property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public List? Data { get { return BackingStore?.Get?>("data"); } set { BackingStore?.Set("data", value); } } -#nullable restore -#else - public List Data - { - get { return BackingStore?.Get>("data"); } - set { BackingStore?.Set("data", value); } - } -#endif + /// The links property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.RelationshipLinks? Links { get { return BackingStore?.Get("links"); } set { BackingStore?.Set("links", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.RelationshipLinks Links - { - get { return BackingStore?.Get("links"); } - set { BackingStore?.Set("links", value); } - } -#endif + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -70,6 +46,7 @@ public ToManyEnrollmentInResponse() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -80,6 +57,7 @@ public ToManyEnrollmentInResponse() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.ToManyEnrollmentInResponse(); } + /// /// The deserialization information for the current model /// @@ -93,6 +71,7 @@ public virtual IDictionary> GetFieldDeserializers() { "meta", n => { Meta = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Meta.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -107,3 +86,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/ToManyStudentInRequest.cs b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/ToManyStudentInRequest.cs index 39bd3c289..241ef390c 100644 --- a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/ToManyStudentInRequest.cs +++ b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/ToManyStudentInRequest.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,38 +17,21 @@ public partial class ToManyStudentInRequest : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The data property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public List? Data { get { return BackingStore?.Get?>("data"); } set { BackingStore?.Set("data", value); } } -#nullable restore -#else - public List Data - { - get { return BackingStore?.Get>("data"); } - set { BackingStore?.Set("data", value); } - } -#endif + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -54,6 +39,7 @@ public ToManyStudentInRequest() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -64,6 +50,7 @@ public ToManyStudentInRequest() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.ToManyStudentInRequest(); } + /// /// The deserialization information for the current model /// @@ -76,6 +63,7 @@ public virtual IDictionary> GetFieldDeserializers() { "meta", n => { Meta = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Meta.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -89,3 +77,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/ToManyStudentInResponse.cs b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/ToManyStudentInResponse.cs index b4cf47bf5..cd6ee0335 100644 --- a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/ToManyStudentInResponse.cs +++ b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/ToManyStudentInResponse.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,54 +17,28 @@ public partial class ToManyStudentInResponse : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The data property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public List? Data { get { return BackingStore?.Get?>("data"); } set { BackingStore?.Set("data", value); } } -#nullable restore -#else - public List Data - { - get { return BackingStore?.Get>("data"); } - set { BackingStore?.Set("data", value); } - } -#endif + /// The links property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.RelationshipLinks? Links { get { return BackingStore?.Get("links"); } set { BackingStore?.Set("links", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.RelationshipLinks Links - { - get { return BackingStore?.Get("links"); } - set { BackingStore?.Set("links", value); } - } -#endif + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -70,6 +46,7 @@ public ToManyStudentInResponse() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -80,6 +57,7 @@ public ToManyStudentInResponse() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.ToManyStudentInResponse(); } + /// /// The deserialization information for the current model /// @@ -93,6 +71,7 @@ public virtual IDictionary> GetFieldDeserializers() { "meta", n => { Meta = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Meta.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -107,3 +86,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/ToManyTeacherInRequest.cs b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/ToManyTeacherInRequest.cs index 13837a8f5..da9c83c4a 100644 --- a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/ToManyTeacherInRequest.cs +++ b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/ToManyTeacherInRequest.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,38 +17,21 @@ public partial class ToManyTeacherInRequest : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The data property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public List? Data { get { return BackingStore?.Get?>("data"); } set { BackingStore?.Set("data", value); } } -#nullable restore -#else - public List Data - { - get { return BackingStore?.Get>("data"); } - set { BackingStore?.Set("data", value); } - } -#endif + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -54,6 +39,7 @@ public ToManyTeacherInRequest() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -64,6 +50,7 @@ public ToManyTeacherInRequest() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.ToManyTeacherInRequest(); } + /// /// The deserialization information for the current model /// @@ -76,6 +63,7 @@ public virtual IDictionary> GetFieldDeserializers() { "meta", n => { Meta = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Meta.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -89,3 +77,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/ToManyTeacherInResponse.cs b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/ToManyTeacherInResponse.cs index 99e28d4f0..774ddb066 100644 --- a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/ToManyTeacherInResponse.cs +++ b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/ToManyTeacherInResponse.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,54 +17,28 @@ public partial class ToManyTeacherInResponse : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The data property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public List? Data { get { return BackingStore?.Get?>("data"); } set { BackingStore?.Set("data", value); } } -#nullable restore -#else - public List Data - { - get { return BackingStore?.Get>("data"); } - set { BackingStore?.Set("data", value); } - } -#endif + /// The links property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.RelationshipLinks? Links { get { return BackingStore?.Get("links"); } set { BackingStore?.Set("links", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.RelationshipLinks Links - { - get { return BackingStore?.Get("links"); } - set { BackingStore?.Set("links", value); } - } -#endif + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -70,6 +46,7 @@ public ToManyTeacherInResponse() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -80,6 +57,7 @@ public ToManyTeacherInResponse() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.ToManyTeacherInResponse(); } + /// /// The deserialization information for the current model /// @@ -93,6 +71,7 @@ public virtual IDictionary> GetFieldDeserializers() { "meta", n => { Meta = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Meta.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -107,3 +86,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/ToOneCourseInRequest.cs b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/ToOneCourseInRequest.cs index 7c51be156..741aa7e17 100644 --- a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/ToOneCourseInRequest.cs +++ b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/ToOneCourseInRequest.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,38 +17,21 @@ public partial class ToOneCourseInRequest : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The data property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.CourseIdentifierInRequest? Data { get { return BackingStore?.Get("data"); } set { BackingStore?.Set("data", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.CourseIdentifierInRequest Data - { - get { return BackingStore?.Get("data"); } - set { BackingStore?.Set("data", value); } - } -#endif + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -54,6 +39,7 @@ public ToOneCourseInRequest() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -64,6 +50,7 @@ public ToOneCourseInRequest() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.ToOneCourseInRequest(); } + /// /// The deserialization information for the current model /// @@ -76,6 +63,7 @@ public virtual IDictionary> GetFieldDeserializers() { "meta", n => { Meta = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Meta.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -89,3 +77,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/ToOneCourseInResponse.cs b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/ToOneCourseInResponse.cs index bf20804d7..0e785f31d 100644 --- a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/ToOneCourseInResponse.cs +++ b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/ToOneCourseInResponse.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,54 +17,28 @@ public partial class ToOneCourseInResponse : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The data property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.CourseIdentifierInResponse? Data { get { return BackingStore?.Get("data"); } set { BackingStore?.Set("data", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.CourseIdentifierInResponse Data - { - get { return BackingStore?.Get("data"); } - set { BackingStore?.Set("data", value); } - } -#endif + /// The links property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.RelationshipLinks? Links { get { return BackingStore?.Get("links"); } set { BackingStore?.Set("links", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.RelationshipLinks Links - { - get { return BackingStore?.Get("links"); } - set { BackingStore?.Set("links", value); } - } -#endif + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -70,6 +46,7 @@ public ToOneCourseInResponse() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -80,6 +57,7 @@ public ToOneCourseInResponse() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.ToOneCourseInResponse(); } + /// /// The deserialization information for the current model /// @@ -93,6 +71,7 @@ public virtual IDictionary> GetFieldDeserializers() { "meta", n => { Meta = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Meta.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -107,3 +86,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/ToOneStudentInRequest.cs b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/ToOneStudentInRequest.cs index 5ba519554..bffaf4d6e 100644 --- a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/ToOneStudentInRequest.cs +++ b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/ToOneStudentInRequest.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,38 +17,21 @@ public partial class ToOneStudentInRequest : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The data property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.StudentIdentifierInRequest? Data { get { return BackingStore?.Get("data"); } set { BackingStore?.Set("data", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.StudentIdentifierInRequest Data - { - get { return BackingStore?.Get("data"); } - set { BackingStore?.Set("data", value); } - } -#endif + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -54,6 +39,7 @@ public ToOneStudentInRequest() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -64,6 +50,7 @@ public ToOneStudentInRequest() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.ToOneStudentInRequest(); } + /// /// The deserialization information for the current model /// @@ -76,6 +63,7 @@ public virtual IDictionary> GetFieldDeserializers() { "meta", n => { Meta = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Meta.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -89,3 +77,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/ToOneStudentInResponse.cs b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/ToOneStudentInResponse.cs index 9adb06276..c912600e8 100644 --- a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/ToOneStudentInResponse.cs +++ b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/ToOneStudentInResponse.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,54 +17,28 @@ public partial class ToOneStudentInResponse : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The data property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.StudentIdentifierInResponse? Data { get { return BackingStore?.Get("data"); } set { BackingStore?.Set("data", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.StudentIdentifierInResponse Data - { - get { return BackingStore?.Get("data"); } - set { BackingStore?.Set("data", value); } - } -#endif + /// The links property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.RelationshipLinks? Links { get { return BackingStore?.Get("links"); } set { BackingStore?.Set("links", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.RelationshipLinks Links - { - get { return BackingStore?.Get("links"); } - set { BackingStore?.Set("links", value); } - } -#endif + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -70,6 +46,7 @@ public ToOneStudentInResponse() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -80,6 +57,7 @@ public ToOneStudentInResponse() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.ToOneStudentInResponse(); } + /// /// The deserialization information for the current model /// @@ -93,6 +71,7 @@ public virtual IDictionary> GetFieldDeserializers() { "meta", n => { Meta = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Meta.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -107,3 +86,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/UpdateCourseEnrollmentsRelationshipOperation.cs b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/UpdateCourseEnrollmentsRelationshipOperation.cs index 2dbf158a8..66c665763 100644 --- a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/UpdateCourseEnrollmentsRelationshipOperation.cs +++ b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/UpdateCourseEnrollmentsRelationshipOperation.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -13,43 +15,26 @@ public partial class UpdateCourseEnrollmentsRelationshipOperation : global::Open #pragma warning restore CS1591 { /// The data property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public List? Data { get { return BackingStore?.Get?>("data"); } set { BackingStore?.Set("data", value); } } -#nullable restore -#else - public List Data - { - get { return BackingStore?.Get>("data"); } - set { BackingStore?.Set("data", value); } - } -#endif + /// The op property public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.UpdateOperationCode? Op { get { return BackingStore?.Get("op"); } set { BackingStore?.Set("op", value); } } + /// The ref property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.CourseEnrollmentsRelationshipIdentifier? Ref { get { return BackingStore?.Get("ref"); } set { BackingStore?.Set("ref", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.CourseEnrollmentsRelationshipIdentifier Ref - { - get { return BackingStore?.Get("ref"); } - set { BackingStore?.Set("ref", value); } - } -#endif + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -60,6 +45,7 @@ public partial class UpdateCourseEnrollmentsRelationshipOperation : global::Open _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.UpdateCourseEnrollmentsRelationshipOperation(); } + /// /// The deserialization information for the current model /// @@ -73,6 +59,7 @@ public override IDictionary> GetFieldDeserializers() { "ref", n => { Ref = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.CourseEnrollmentsRelationshipIdentifier.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -88,3 +75,4 @@ public override void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/UpdateCourseOperation.cs b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/UpdateCourseOperation.cs index d7e82eada..3e921c82a 100644 --- a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/UpdateCourseOperation.cs +++ b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/UpdateCourseOperation.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -13,43 +15,26 @@ public partial class UpdateCourseOperation : global::OpenApiKiotaEndToEndTests.A #pragma warning restore CS1591 { /// The data property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.DataInUpdateCourseRequest? Data { get { return BackingStore?.Get("data"); } set { BackingStore?.Set("data", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.DataInUpdateCourseRequest Data - { - get { return BackingStore?.Get("data"); } - set { BackingStore?.Set("data", value); } - } -#endif + /// The op property public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.UpdateOperationCode? Op { get { return BackingStore?.Get("op"); } set { BackingStore?.Set("op", value); } } + /// The ref property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.CourseIdentifierInRequest? Ref { get { return BackingStore?.Get("ref"); } set { BackingStore?.Set("ref", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.CourseIdentifierInRequest Ref - { - get { return BackingStore?.Get("ref"); } - set { BackingStore?.Set("ref", value); } - } -#endif + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -60,6 +45,7 @@ public partial class UpdateCourseOperation : global::OpenApiKiotaEndToEndTests.A _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.UpdateCourseOperation(); } + /// /// The deserialization information for the current model /// @@ -73,6 +59,7 @@ public override IDictionary> GetFieldDeserializers() { "ref", n => { Ref = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.CourseIdentifierInRequest.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -88,3 +75,4 @@ public override void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/UpdateCourseRequestDocument.cs b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/UpdateCourseRequestDocument.cs index 8bf1fdd24..0c3c64ad6 100644 --- a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/UpdateCourseRequestDocument.cs +++ b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/UpdateCourseRequestDocument.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,38 +17,21 @@ public partial class UpdateCourseRequestDocument : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The data property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.DataInUpdateCourseRequest? Data { get { return BackingStore?.Get("data"); } set { BackingStore?.Set("data", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.DataInUpdateCourseRequest Data - { - get { return BackingStore?.Get("data"); } - set { BackingStore?.Set("data", value); } - } -#endif + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -54,6 +39,7 @@ public UpdateCourseRequestDocument() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -64,6 +50,7 @@ public UpdateCourseRequestDocument() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.UpdateCourseRequestDocument(); } + /// /// The deserialization information for the current model /// @@ -76,6 +63,7 @@ public virtual IDictionary> GetFieldDeserializers() { "meta", n => { Meta = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Meta.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -89,3 +77,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/UpdateEnrollmentCourseRelationshipOperation.cs b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/UpdateEnrollmentCourseRelationshipOperation.cs index b5eb5c33f..432f4c8aa 100644 --- a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/UpdateEnrollmentCourseRelationshipOperation.cs +++ b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/UpdateEnrollmentCourseRelationshipOperation.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -13,43 +15,26 @@ public partial class UpdateEnrollmentCourseRelationshipOperation : global::OpenA #pragma warning restore CS1591 { /// The data property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.CourseIdentifierInRequest? Data { get { return BackingStore?.Get("data"); } set { BackingStore?.Set("data", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.CourseIdentifierInRequest Data - { - get { return BackingStore?.Get("data"); } - set { BackingStore?.Set("data", value); } - } -#endif + /// The op property public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.UpdateOperationCode? Op { get { return BackingStore?.Get("op"); } set { BackingStore?.Set("op", value); } } + /// The ref property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.EnrollmentCourseRelationshipIdentifier? Ref { get { return BackingStore?.Get("ref"); } set { BackingStore?.Set("ref", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.EnrollmentCourseRelationshipIdentifier Ref - { - get { return BackingStore?.Get("ref"); } - set { BackingStore?.Set("ref", value); } - } -#endif + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -60,6 +45,7 @@ public partial class UpdateEnrollmentCourseRelationshipOperation : global::OpenA _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.UpdateEnrollmentCourseRelationshipOperation(); } + /// /// The deserialization information for the current model /// @@ -73,6 +59,7 @@ public override IDictionary> GetFieldDeserializers() { "ref", n => { Ref = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.EnrollmentCourseRelationshipIdentifier.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -88,3 +75,4 @@ public override void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/UpdateEnrollmentOperation.cs b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/UpdateEnrollmentOperation.cs index 153221541..266667630 100644 --- a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/UpdateEnrollmentOperation.cs +++ b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/UpdateEnrollmentOperation.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -13,43 +15,26 @@ public partial class UpdateEnrollmentOperation : global::OpenApiKiotaEndToEndTes #pragma warning restore CS1591 { /// The data property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.DataInUpdateEnrollmentRequest? Data { get { return BackingStore?.Get("data"); } set { BackingStore?.Set("data", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.DataInUpdateEnrollmentRequest Data - { - get { return BackingStore?.Get("data"); } - set { BackingStore?.Set("data", value); } - } -#endif + /// The op property public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.UpdateOperationCode? Op { get { return BackingStore?.Get("op"); } set { BackingStore?.Set("op", value); } } + /// The ref property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.EnrollmentIdentifierInRequest? Ref { get { return BackingStore?.Get("ref"); } set { BackingStore?.Set("ref", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.EnrollmentIdentifierInRequest Ref - { - get { return BackingStore?.Get("ref"); } - set { BackingStore?.Set("ref", value); } - } -#endif + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -60,6 +45,7 @@ public partial class UpdateEnrollmentOperation : global::OpenApiKiotaEndToEndTes _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.UpdateEnrollmentOperation(); } + /// /// The deserialization information for the current model /// @@ -73,6 +59,7 @@ public override IDictionary> GetFieldDeserializers() { "ref", n => { Ref = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.EnrollmentIdentifierInRequest.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -88,3 +75,4 @@ public override void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/UpdateEnrollmentRequestDocument.cs b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/UpdateEnrollmentRequestDocument.cs index 705a6b25c..fc351d3f5 100644 --- a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/UpdateEnrollmentRequestDocument.cs +++ b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/UpdateEnrollmentRequestDocument.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,38 +17,21 @@ public partial class UpdateEnrollmentRequestDocument : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The data property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.DataInUpdateEnrollmentRequest? Data { get { return BackingStore?.Get("data"); } set { BackingStore?.Set("data", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.DataInUpdateEnrollmentRequest Data - { - get { return BackingStore?.Get("data"); } - set { BackingStore?.Set("data", value); } - } -#endif + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -54,6 +39,7 @@ public UpdateEnrollmentRequestDocument() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -64,6 +50,7 @@ public UpdateEnrollmentRequestDocument() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.UpdateEnrollmentRequestDocument(); } + /// /// The deserialization information for the current model /// @@ -76,6 +63,7 @@ public virtual IDictionary> GetFieldDeserializers() { "meta", n => { Meta = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Meta.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -89,3 +77,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/UpdateEnrollmentStudentRelationshipOperation.cs b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/UpdateEnrollmentStudentRelationshipOperation.cs index 19f59a30e..ec7f5d868 100644 --- a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/UpdateEnrollmentStudentRelationshipOperation.cs +++ b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/UpdateEnrollmentStudentRelationshipOperation.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -13,43 +15,26 @@ public partial class UpdateEnrollmentStudentRelationshipOperation : global::Open #pragma warning restore CS1591 { /// The data property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.StudentIdentifierInRequest? Data { get { return BackingStore?.Get("data"); } set { BackingStore?.Set("data", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.StudentIdentifierInRequest Data - { - get { return BackingStore?.Get("data"); } - set { BackingStore?.Set("data", value); } - } -#endif + /// The op property public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.UpdateOperationCode? Op { get { return BackingStore?.Get("op"); } set { BackingStore?.Set("op", value); } } + /// The ref property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.EnrollmentStudentRelationshipIdentifier? Ref { get { return BackingStore?.Get("ref"); } set { BackingStore?.Set("ref", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.EnrollmentStudentRelationshipIdentifier Ref - { - get { return BackingStore?.Get("ref"); } - set { BackingStore?.Set("ref", value); } - } -#endif + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -60,6 +45,7 @@ public partial class UpdateEnrollmentStudentRelationshipOperation : global::Open _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.UpdateEnrollmentStudentRelationshipOperation(); } + /// /// The deserialization information for the current model /// @@ -73,6 +59,7 @@ public override IDictionary> GetFieldDeserializers() { "ref", n => { Ref = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.EnrollmentStudentRelationshipIdentifier.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -88,3 +75,4 @@ public override void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/UpdateOperationCode.cs b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/UpdateOperationCode.cs index 34302aba9..f3e571b8e 100644 --- a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/UpdateOperationCode.cs +++ b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/UpdateOperationCode.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 using System.Runtime.Serialization; using System; namespace OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models @@ -14,3 +16,4 @@ public enum UpdateOperationCode #pragma warning restore CS1591 } } + diff --git a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/UpdateStudentEnrollmentsRelationshipOperation.cs b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/UpdateStudentEnrollmentsRelationshipOperation.cs index 9f953e184..4ff23cf36 100644 --- a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/UpdateStudentEnrollmentsRelationshipOperation.cs +++ b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/UpdateStudentEnrollmentsRelationshipOperation.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -13,43 +15,26 @@ public partial class UpdateStudentEnrollmentsRelationshipOperation : global::Ope #pragma warning restore CS1591 { /// The data property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public List? Data { get { return BackingStore?.Get?>("data"); } set { BackingStore?.Set("data", value); } } -#nullable restore -#else - public List Data - { - get { return BackingStore?.Get>("data"); } - set { BackingStore?.Set("data", value); } - } -#endif + /// The op property public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.UpdateOperationCode? Op { get { return BackingStore?.Get("op"); } set { BackingStore?.Set("op", value); } } + /// The ref property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.StudentEnrollmentsRelationshipIdentifier? Ref { get { return BackingStore?.Get("ref"); } set { BackingStore?.Set("ref", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.StudentEnrollmentsRelationshipIdentifier Ref - { - get { return BackingStore?.Get("ref"); } - set { BackingStore?.Set("ref", value); } - } -#endif + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -60,6 +45,7 @@ public partial class UpdateStudentEnrollmentsRelationshipOperation : global::Ope _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.UpdateStudentEnrollmentsRelationshipOperation(); } + /// /// The deserialization information for the current model /// @@ -73,6 +59,7 @@ public override IDictionary> GetFieldDeserializers() { "ref", n => { Ref = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.StudentEnrollmentsRelationshipIdentifier.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -88,3 +75,4 @@ public override void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/UpdateStudentMentorRelationshipOperation.cs b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/UpdateStudentMentorRelationshipOperation.cs index ec8ab4648..db7bd57e8 100644 --- a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/UpdateStudentMentorRelationshipOperation.cs +++ b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/UpdateStudentMentorRelationshipOperation.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -13,43 +15,26 @@ public partial class UpdateStudentMentorRelationshipOperation : global::OpenApiK #pragma warning restore CS1591 { /// The data property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.TeacherIdentifierInRequest? Data { get { return BackingStore?.Get("data"); } set { BackingStore?.Set("data", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.TeacherIdentifierInRequest Data - { - get { return BackingStore?.Get("data"); } - set { BackingStore?.Set("data", value); } - } -#endif + /// The op property public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.UpdateOperationCode? Op { get { return BackingStore?.Get("op"); } set { BackingStore?.Set("op", value); } } + /// The ref property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.StudentMentorRelationshipIdentifier? Ref { get { return BackingStore?.Get("ref"); } set { BackingStore?.Set("ref", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.StudentMentorRelationshipIdentifier Ref - { - get { return BackingStore?.Get("ref"); } - set { BackingStore?.Set("ref", value); } - } -#endif + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -60,6 +45,7 @@ public partial class UpdateStudentMentorRelationshipOperation : global::OpenApiK _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.UpdateStudentMentorRelationshipOperation(); } + /// /// The deserialization information for the current model /// @@ -73,6 +59,7 @@ public override IDictionary> GetFieldDeserializers() { "ref", n => { Ref = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.StudentMentorRelationshipIdentifier.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -88,3 +75,4 @@ public override void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/UpdateStudentOperation.cs b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/UpdateStudentOperation.cs index 5e0cf1cc5..cf7023d2c 100644 --- a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/UpdateStudentOperation.cs +++ b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/UpdateStudentOperation.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -13,43 +15,26 @@ public partial class UpdateStudentOperation : global::OpenApiKiotaEndToEndTests. #pragma warning restore CS1591 { /// The data property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.DataInUpdateStudentRequest? Data { get { return BackingStore?.Get("data"); } set { BackingStore?.Set("data", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.DataInUpdateStudentRequest Data - { - get { return BackingStore?.Get("data"); } - set { BackingStore?.Set("data", value); } - } -#endif + /// The op property public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.UpdateOperationCode? Op { get { return BackingStore?.Get("op"); } set { BackingStore?.Set("op", value); } } + /// The ref property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.StudentIdentifierInRequest? Ref { get { return BackingStore?.Get("ref"); } set { BackingStore?.Set("ref", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.StudentIdentifierInRequest Ref - { - get { return BackingStore?.Get("ref"); } - set { BackingStore?.Set("ref", value); } - } -#endif + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -60,6 +45,7 @@ public partial class UpdateStudentOperation : global::OpenApiKiotaEndToEndTests. _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.UpdateStudentOperation(); } + /// /// The deserialization information for the current model /// @@ -73,6 +59,7 @@ public override IDictionary> GetFieldDeserializers() { "ref", n => { Ref = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.StudentIdentifierInRequest.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -88,3 +75,4 @@ public override void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/UpdateStudentRequestDocument.cs b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/UpdateStudentRequestDocument.cs index 2df66ee38..9bb4dbd1a 100644 --- a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/UpdateStudentRequestDocument.cs +++ b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/UpdateStudentRequestDocument.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,38 +17,21 @@ public partial class UpdateStudentRequestDocument : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The data property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.DataInUpdateStudentRequest? Data { get { return BackingStore?.Get("data"); } set { BackingStore?.Set("data", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.DataInUpdateStudentRequest Data - { - get { return BackingStore?.Get("data"); } - set { BackingStore?.Set("data", value); } - } -#endif + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -54,6 +39,7 @@ public UpdateStudentRequestDocument() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -64,6 +50,7 @@ public UpdateStudentRequestDocument() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.UpdateStudentRequestDocument(); } + /// /// The deserialization information for the current model /// @@ -76,6 +63,7 @@ public virtual IDictionary> GetFieldDeserializers() { "meta", n => { Meta = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Meta.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -89,3 +77,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/UpdateTeacherMentorsRelationshipOperation.cs b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/UpdateTeacherMentorsRelationshipOperation.cs index f14201088..ab6189bf6 100644 --- a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/UpdateTeacherMentorsRelationshipOperation.cs +++ b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/UpdateTeacherMentorsRelationshipOperation.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -13,43 +15,26 @@ public partial class UpdateTeacherMentorsRelationshipOperation : global::OpenApi #pragma warning restore CS1591 { /// The data property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public List? Data { get { return BackingStore?.Get?>("data"); } set { BackingStore?.Set("data", value); } } -#nullable restore -#else - public List Data - { - get { return BackingStore?.Get>("data"); } - set { BackingStore?.Set("data", value); } - } -#endif + /// The op property public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.UpdateOperationCode? Op { get { return BackingStore?.Get("op"); } set { BackingStore?.Set("op", value); } } + /// The ref property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.TeacherMentorsRelationshipIdentifier? Ref { get { return BackingStore?.Get("ref"); } set { BackingStore?.Set("ref", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.TeacherMentorsRelationshipIdentifier Ref - { - get { return BackingStore?.Get("ref"); } - set { BackingStore?.Set("ref", value); } - } -#endif + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -60,6 +45,7 @@ public partial class UpdateTeacherMentorsRelationshipOperation : global::OpenApi _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.UpdateTeacherMentorsRelationshipOperation(); } + /// /// The deserialization information for the current model /// @@ -73,6 +59,7 @@ public override IDictionary> GetFieldDeserializers() { "ref", n => { Ref = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.TeacherMentorsRelationshipIdentifier.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -88,3 +75,4 @@ public override void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/UpdateTeacherOperation.cs b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/UpdateTeacherOperation.cs index aafc92202..df999e93b 100644 --- a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/UpdateTeacherOperation.cs +++ b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/UpdateTeacherOperation.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -13,43 +15,26 @@ public partial class UpdateTeacherOperation : global::OpenApiKiotaEndToEndTests. #pragma warning restore CS1591 { /// The data property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.DataInUpdateTeacherRequest? Data { get { return BackingStore?.Get("data"); } set { BackingStore?.Set("data", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.DataInUpdateTeacherRequest Data - { - get { return BackingStore?.Get("data"); } - set { BackingStore?.Set("data", value); } - } -#endif + /// The op property public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.UpdateOperationCode? Op { get { return BackingStore?.Get("op"); } set { BackingStore?.Set("op", value); } } + /// The ref property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.TeacherIdentifierInRequest? Ref { get { return BackingStore?.Get("ref"); } set { BackingStore?.Set("ref", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.TeacherIdentifierInRequest Ref - { - get { return BackingStore?.Get("ref"); } - set { BackingStore?.Set("ref", value); } - } -#endif + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -60,6 +45,7 @@ public partial class UpdateTeacherOperation : global::OpenApiKiotaEndToEndTests. _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.UpdateTeacherOperation(); } + /// /// The deserialization information for the current model /// @@ -73,6 +59,7 @@ public override IDictionary> GetFieldDeserializers() { "ref", n => { Ref = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.TeacherIdentifierInRequest.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -88,3 +75,4 @@ public override void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/UpdateTeacherRequestDocument.cs b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/UpdateTeacherRequestDocument.cs index 7afbea825..212e94944 100644 --- a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/UpdateTeacherRequestDocument.cs +++ b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/UpdateTeacherRequestDocument.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,38 +17,21 @@ public partial class UpdateTeacherRequestDocument : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The data property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.DataInUpdateTeacherRequest? Data { get { return BackingStore?.Get("data"); } set { BackingStore?.Set("data", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.DataInUpdateTeacherRequest Data - { - get { return BackingStore?.Get("data"); } - set { BackingStore?.Set("data", value); } - } -#endif + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -54,6 +39,7 @@ public UpdateTeacherRequestDocument() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -64,6 +50,7 @@ public UpdateTeacherRequestDocument() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.UpdateTeacherRequestDocument(); } + /// /// The deserialization information for the current model /// @@ -76,6 +63,7 @@ public virtual IDictionary> GetFieldDeserializers() { "meta", n => { Meta = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.Meta.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -89,3 +77,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/UpdateTeacherTeachesRelationshipOperation.cs b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/UpdateTeacherTeachesRelationshipOperation.cs index 70bd6f2d7..2cf8b69f4 100644 --- a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/UpdateTeacherTeachesRelationshipOperation.cs +++ b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Models/UpdateTeacherTeachesRelationshipOperation.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -13,43 +15,26 @@ public partial class UpdateTeacherTeachesRelationshipOperation : global::OpenApi #pragma warning restore CS1591 { /// The data property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public List? Data { get { return BackingStore?.Get?>("data"); } set { BackingStore?.Set("data", value); } } -#nullable restore -#else - public List Data - { - get { return BackingStore?.Get>("data"); } - set { BackingStore?.Set("data", value); } - } -#endif + /// The op property public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.UpdateOperationCode? Op { get { return BackingStore?.Get("op"); } set { BackingStore?.Set("op", value); } } + /// The ref property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.TeacherTeachesRelationshipIdentifier? Ref { get { return BackingStore?.Get("ref"); } set { BackingStore?.Set("ref", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.TeacherTeachesRelationshipIdentifier Ref - { - get { return BackingStore?.Get("ref"); } - set { BackingStore?.Set("ref", value); } - } -#endif + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -60,6 +45,7 @@ public partial class UpdateTeacherTeachesRelationshipOperation : global::OpenApi _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.UpdateTeacherTeachesRelationshipOperation(); } + /// /// The deserialization information for the current model /// @@ -73,6 +59,7 @@ public override IDictionary> GetFieldDeserializers() { "ref", n => { Ref = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.TeacherTeachesRelationshipIdentifier.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -88,3 +75,4 @@ public override void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Operations/OperationsRequestBuilder.cs b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Operations/OperationsRequestBuilder.cs index b10c9c4f5..ac52c2fda 100644 --- a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Operations/OperationsRequestBuilder.cs +++ b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Operations/OperationsRequestBuilder.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -25,6 +27,7 @@ public partial class OperationsRequestBuilder : BaseRequestBuilder public OperationsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/operations", pathParameters) { } + /// /// Instantiates a new and sets the default values. /// @@ -33,6 +36,7 @@ public OperationsRequestBuilder(Dictionary pathParameters, IRequ public OperationsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/operations", rawUrl) { } + /// /// Performs multiple mutations in a linear and atomic manner. /// @@ -45,15 +49,8 @@ public OperationsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : /// When receiving a 404 status code /// When receiving a 409 status code /// When receiving a 422 status code -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public async Task PostAsync(global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.OperationsRequestDocument body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { -#nullable restore -#else - public async Task PostAsync(global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.OperationsRequestDocument body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) - { -#endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> @@ -66,21 +63,15 @@ public OperationsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : }; return await RequestAdapter.SendAsync(requestInfo, global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.OperationsResponseDocument.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } + /// /// Performs multiple mutations in a linear and atomic manner. /// /// A /// 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(global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.OperationsRequestDocument body, Action>? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToPostRequestInformation(global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.OperationsRequestDocument body, Action> requestConfiguration = default) - { -#endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); @@ -88,6 +79,7 @@ public RequestInformation ToPostRequestInformation(global::OpenApiKiotaEndToEndT requestInfo.SetContentFromParsable(RequestAdapter, "application/vnd.api+json;ext=atomic", body); return requestInfo; } + /// /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. /// @@ -100,3 +92,4 @@ public RequestInformation ToPostRequestInformation(global::OpenApiKiotaEndToEndT } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Students/Item/Enrollments/EnrollmentsRequestBuilder.cs b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Students/Item/Enrollments/EnrollmentsRequestBuilder.cs index a7eebe8aa..c6b60650b 100644 --- a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Students/Item/Enrollments/EnrollmentsRequestBuilder.cs +++ b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Students/Item/Enrollments/EnrollmentsRequestBuilder.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -25,6 +27,7 @@ public partial class EnrollmentsRequestBuilder : BaseRequestBuilder public EnrollmentsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/students/{id}/enrollments{?query*}", pathParameters) { } + /// /// Instantiates a new and sets the default values. /// @@ -33,6 +36,7 @@ public EnrollmentsRequestBuilder(Dictionary pathParameters, IReq public EnrollmentsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/students/{id}/enrollments{?query*}", rawUrl) { } + /// /// Retrieves the related enrollments of an individual student's enrollments relationship. /// @@ -41,15 +45,8 @@ public EnrollmentsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) /// Configuration for the request such as headers, query parameters, and middleware options. /// When receiving a 400 status code /// When receiving a 404 status code -#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> { @@ -58,60 +55,43 @@ public EnrollmentsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) }; return await RequestAdapter.SendAsync(requestInfo, global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.EnrollmentCollectionResponseDocument.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// /// 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 HeadAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { -#nullable restore -#else - public async Task HeadAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) - { -#endif var requestInfo = ToHeadRequestInformation(requestConfiguration); await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); } + /// /// Retrieves the related enrollments of an individual student's enrollments relationship. /// /// A /// 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(Method.GET, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/vnd.api+json"); return requestInfo; } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// /// A /// 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 ToHeadRequestInformation(Action>? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToHeadRequestInformation(Action> requestConfiguration = default) - { -#endif var requestInfo = new RequestInformation(Method.HEAD, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); return requestInfo; } + /// /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. /// @@ -121,6 +101,7 @@ public RequestInformation ToHeadRequestInformation(Action /// Retrieves the related enrollments of an individual student's enrollments relationship. /// @@ -128,16 +109,10 @@ public RequestInformation ToHeadRequestInformation(ActionFor syntax, see the documentation for the [`include`](https://www.jsonapi.net/usage/reading/including-relationships.html)/[`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// @@ -145,16 +120,10 @@ public partial class EnrollmentsRequestBuilderGetQueryParameters public partial class EnrollmentsRequestBuilderHeadQueryParameters { /// For syntax, see the documentation for the [`include`](https://www.jsonapi.net/usage/reading/including-relationships.html)/[`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Students/Item/Mentor/MentorRequestBuilder.cs b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Students/Item/Mentor/MentorRequestBuilder.cs index 87c25d255..141ac924a 100644 --- a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Students/Item/Mentor/MentorRequestBuilder.cs +++ b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Students/Item/Mentor/MentorRequestBuilder.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -25,6 +27,7 @@ public partial class MentorRequestBuilder : BaseRequestBuilder public MentorRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/students/{id}/mentor{?query*}", pathParameters) { } + /// /// Instantiates a new and sets the default values. /// @@ -33,6 +36,7 @@ public MentorRequestBuilder(Dictionary pathParameters, IRequestA public MentorRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/students/{id}/mentor{?query*}", rawUrl) { } + /// /// Retrieves the related teacher of an individual student's mentor relationship. /// @@ -41,15 +45,8 @@ public MentorRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas /// Configuration for the request such as headers, query parameters, and middleware options. /// When receiving a 400 status code /// When receiving a 404 status code -#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> { @@ -58,60 +55,43 @@ public MentorRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas }; return await RequestAdapter.SendAsync(requestInfo, global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.NullableTeacherSecondaryResponseDocument.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// /// 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 HeadAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { -#nullable restore -#else - public async Task HeadAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) - { -#endif var requestInfo = ToHeadRequestInformation(requestConfiguration); await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); } + /// /// Retrieves the related teacher of an individual student's mentor relationship. /// /// A /// 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(Method.GET, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/vnd.api+json"); return requestInfo; } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// /// A /// 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 ToHeadRequestInformation(Action>? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToHeadRequestInformation(Action> requestConfiguration = default) - { -#endif var requestInfo = new RequestInformation(Method.HEAD, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); return requestInfo; } + /// /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. /// @@ -121,6 +101,7 @@ public RequestInformation ToHeadRequestInformation(Action /// Retrieves the related teacher of an individual student's mentor relationship. /// @@ -128,16 +109,10 @@ public RequestInformation ToHeadRequestInformation(ActionFor syntax, see the documentation for the [`include`](https://www.jsonapi.net/usage/reading/including-relationships.html)/[`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// @@ -145,16 +120,10 @@ public partial class MentorRequestBuilderGetQueryParameters public partial class MentorRequestBuilderHeadQueryParameters { /// For syntax, see the documentation for the [`include`](https://www.jsonapi.net/usage/reading/including-relationships.html)/[`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Students/Item/Relationships/Enrollments/EnrollmentsRequestBuilder.cs b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Students/Item/Relationships/Enrollments/EnrollmentsRequestBuilder.cs index a1455a760..c484567d5 100644 --- a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Students/Item/Relationships/Enrollments/EnrollmentsRequestBuilder.cs +++ b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Students/Item/Relationships/Enrollments/EnrollmentsRequestBuilder.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -25,6 +27,7 @@ public partial class EnrollmentsRequestBuilder : BaseRequestBuilder public EnrollmentsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/students/{id}/relationships/enrollments{?query*}", pathParameters) { } + /// /// Instantiates a new and sets the default values. /// @@ -33,6 +36,7 @@ public EnrollmentsRequestBuilder(Dictionary pathParameters, IReq public EnrollmentsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/students/{id}/relationships/enrollments{?query*}", rawUrl) { } + /// /// Removes existing enrollments from the enrollments relationship of an individual student. /// @@ -42,15 +46,8 @@ public EnrollmentsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) /// When receiving a 400 status code /// When receiving a 404 status code /// When receiving a 409 status code -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public async Task DeleteAsync(global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.ToManyEnrollmentInRequest body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { -#nullable restore -#else - public async Task DeleteAsync(global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.ToManyEnrollmentInRequest body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) - { -#endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = ToDeleteRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> @@ -61,6 +58,7 @@ public async Task DeleteAsync(global::OpenApiKiotaEndToEndTests.AtomicOperations }; await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); } + /// /// Retrieves the related enrollment identities of an individual student's enrollments relationship. /// @@ -69,15 +67,8 @@ public async Task DeleteAsync(global::OpenApiKiotaEndToEndTests.AtomicOperations /// Configuration for the request such as headers, query parameters, and middleware options. /// When receiving a 400 status code /// When receiving a 404 status code -#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> { @@ -86,23 +77,18 @@ public async Task DeleteAsync(global::OpenApiKiotaEndToEndTests.AtomicOperations }; return await RequestAdapter.SendAsync(requestInfo, global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.EnrollmentIdentifierCollectionResponseDocument.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// /// 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 HeadAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { -#nullable restore -#else - public async Task HeadAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) - { -#endif var requestInfo = ToHeadRequestInformation(requestConfiguration); await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); } + /// /// Assigns existing enrollments to the enrollments relationship of an individual student. /// @@ -112,15 +98,8 @@ public async Task HeadAsync(ActionWhen receiving a 400 status code /// When receiving a 404 status code /// When receiving a 409 status code -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public async Task PatchAsync(global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.ToManyEnrollmentInRequest body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { -#nullable restore -#else - public async Task PatchAsync(global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.ToManyEnrollmentInRequest body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) - { -#endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> @@ -131,6 +110,7 @@ public async Task PatchAsync(global::OpenApiKiotaEndToEndTests.AtomicOperations. }; await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); } + /// /// Adds existing enrollments to the enrollments relationship of an individual student. /// @@ -140,15 +120,8 @@ public async Task PatchAsync(global::OpenApiKiotaEndToEndTests.AtomicOperations. /// When receiving a 400 status code /// When receiving a 404 status code /// When receiving a 409 status code -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public async Task PostAsync(global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.ToManyEnrollmentInRequest body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { -#nullable restore -#else - public async Task PostAsync(global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.ToManyEnrollmentInRequest body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) - { -#endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> @@ -159,21 +132,15 @@ public async Task PostAsync(global::OpenApiKiotaEndToEndTests.AtomicOperations.G }; await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); } + /// /// Removes existing enrollments from the enrollments relationship of an individual student. /// /// A /// 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 ToDeleteRequestInformation(global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.ToManyEnrollmentInRequest body, Action>? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToDeleteRequestInformation(global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.ToManyEnrollmentInRequest body, Action> requestConfiguration = default) - { -#endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); @@ -181,58 +148,40 @@ public RequestInformation ToDeleteRequestInformation(global::OpenApiKiotaEndToEn requestInfo.SetContentFromParsable(RequestAdapter, "application/vnd.api+json", body); return requestInfo; } + /// /// Retrieves the related enrollment identities of an individual student's enrollments relationship. /// /// A /// 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(Method.GET, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/vnd.api+json"); return requestInfo; } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// /// A /// 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 ToHeadRequestInformation(Action>? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToHeadRequestInformation(Action> requestConfiguration = default) - { -#endif var requestInfo = new RequestInformation(Method.HEAD, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); return requestInfo; } + /// /// Assigns existing enrollments to the enrollments relationship of an individual student. /// /// A /// 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(global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.ToManyEnrollmentInRequest body, Action>? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToPatchRequestInformation(global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.ToManyEnrollmentInRequest body, Action> requestConfiguration = default) - { -#endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); @@ -240,21 +189,15 @@ public RequestInformation ToPatchRequestInformation(global::OpenApiKiotaEndToEnd requestInfo.SetContentFromParsable(RequestAdapter, "application/vnd.api+json", body); return requestInfo; } + /// /// Adds existing enrollments to the enrollments relationship of an individual student. /// /// A /// 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(global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.ToManyEnrollmentInRequest body, Action>? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToPostRequestInformation(global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.ToManyEnrollmentInRequest body, Action> requestConfiguration = default) - { -#endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); @@ -262,6 +205,7 @@ public RequestInformation ToPostRequestInformation(global::OpenApiKiotaEndToEndT requestInfo.SetContentFromParsable(RequestAdapter, "application/vnd.api+json", body); return requestInfo; } + /// /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. /// @@ -271,6 +215,7 @@ public RequestInformation ToPostRequestInformation(global::OpenApiKiotaEndToEndT { return new global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Students.Item.Relationships.Enrollments.EnrollmentsRequestBuilder(rawUrl, RequestAdapter); } + /// /// Retrieves the related enrollment identities of an individual student's enrollments relationship. /// @@ -278,16 +223,10 @@ public RequestInformation ToPostRequestInformation(global::OpenApiKiotaEndToEndT public partial class EnrollmentsRequestBuilderGetQueryParameters { /// For syntax, see the documentation for the [`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// @@ -295,16 +234,10 @@ public partial class EnrollmentsRequestBuilderGetQueryParameters public partial class EnrollmentsRequestBuilderHeadQueryParameters { /// For syntax, see the documentation for the [`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Students/Item/Relationships/Mentor/MentorRequestBuilder.cs b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Students/Item/Relationships/Mentor/MentorRequestBuilder.cs index 3f80fa1d7..0c49a371d 100644 --- a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Students/Item/Relationships/Mentor/MentorRequestBuilder.cs +++ b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Students/Item/Relationships/Mentor/MentorRequestBuilder.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -25,6 +27,7 @@ public partial class MentorRequestBuilder : BaseRequestBuilder public MentorRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/students/{id}/relationships/mentor{?query*}", pathParameters) { } + /// /// Instantiates a new and sets the default values. /// @@ -33,6 +36,7 @@ public MentorRequestBuilder(Dictionary pathParameters, IRequestA public MentorRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/students/{id}/relationships/mentor{?query*}", rawUrl) { } + /// /// Retrieves the related teacher identity of an individual student's mentor relationship. /// @@ -41,15 +45,8 @@ public MentorRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas /// Configuration for the request such as headers, query parameters, and middleware options. /// When receiving a 400 status code /// When receiving a 404 status code -#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> { @@ -58,23 +55,18 @@ public MentorRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas }; return await RequestAdapter.SendAsync(requestInfo, global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.NullableTeacherIdentifierResponseDocument.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// /// 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 HeadAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { -#nullable restore -#else - public async Task HeadAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) - { -#endif var requestInfo = ToHeadRequestInformation(requestConfiguration); await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); } + /// /// Clears or assigns an existing teacher to the mentor relationship of an individual student. /// @@ -84,15 +76,8 @@ public async Task HeadAsync(ActionWhen receiving a 400 status code /// When receiving a 404 status code /// When receiving a 409 status code -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public async Task PatchAsync(global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.NullableToOneTeacherInRequest body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { -#nullable restore -#else - public async Task PatchAsync(global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.NullableToOneTeacherInRequest body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) - { -#endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> @@ -103,58 +88,40 @@ public async Task PatchAsync(global::OpenApiKiotaEndToEndTests.AtomicOperations. }; await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); } + /// /// Retrieves the related teacher identity of an individual student's mentor relationship. /// /// A /// 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(Method.GET, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/vnd.api+json"); return requestInfo; } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// /// A /// 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 ToHeadRequestInformation(Action>? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToHeadRequestInformation(Action> requestConfiguration = default) - { -#endif var requestInfo = new RequestInformation(Method.HEAD, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); return requestInfo; } + /// /// Clears or assigns an existing teacher to the mentor relationship of an individual student. /// /// A /// 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(global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.NullableToOneTeacherInRequest body, Action>? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToPatchRequestInformation(global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.NullableToOneTeacherInRequest body, Action> requestConfiguration = default) - { -#endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); @@ -162,6 +129,7 @@ public RequestInformation ToPatchRequestInformation(global::OpenApiKiotaEndToEnd requestInfo.SetContentFromParsable(RequestAdapter, "application/vnd.api+json", body); return requestInfo; } + /// /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. /// @@ -171,6 +139,7 @@ public RequestInformation ToPatchRequestInformation(global::OpenApiKiotaEndToEnd { return new global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Students.Item.Relationships.Mentor.MentorRequestBuilder(rawUrl, RequestAdapter); } + /// /// Retrieves the related teacher identity of an individual student's mentor relationship. /// @@ -178,16 +147,10 @@ public RequestInformation ToPatchRequestInformation(global::OpenApiKiotaEndToEnd public partial class MentorRequestBuilderGetQueryParameters { /// For syntax, see the documentation for the [`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// @@ -195,16 +158,10 @@ public partial class MentorRequestBuilderGetQueryParameters public partial class MentorRequestBuilderHeadQueryParameters { /// For syntax, see the documentation for the [`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Students/Item/Relationships/RelationshipsRequestBuilder.cs b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Students/Item/Relationships/RelationshipsRequestBuilder.cs index e52abae07..85329caef 100644 --- a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Students/Item/Relationships/RelationshipsRequestBuilder.cs +++ b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Students/Item/Relationships/RelationshipsRequestBuilder.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions; @@ -21,11 +23,13 @@ public partial class RelationshipsRequestBuilder : BaseRequestBuilder { get => new global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Students.Item.Relationships.Enrollments.EnrollmentsRequestBuilder(PathParameters, RequestAdapter); } + /// The mentor property public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Students.Item.Relationships.Mentor.MentorRequestBuilder Mentor { get => new global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Students.Item.Relationships.Mentor.MentorRequestBuilder(PathParameters, RequestAdapter); } + /// /// Instantiates a new and sets the default values. /// @@ -34,6 +38,7 @@ public partial class RelationshipsRequestBuilder : BaseRequestBuilder public RelationshipsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/students/{id}/relationships", pathParameters) { } + /// /// Instantiates a new and sets the default values. /// @@ -45,3 +50,4 @@ public RelationshipsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Students/Item/StudentsItemRequestBuilder.cs b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Students/Item/StudentsItemRequestBuilder.cs index ac4d99f33..59796a694 100644 --- a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Students/Item/StudentsItemRequestBuilder.cs +++ b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Students/Item/StudentsItemRequestBuilder.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -25,16 +27,19 @@ public partial class StudentsItemRequestBuilder : BaseRequestBuilder { get => new global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Students.Item.Enrollments.EnrollmentsRequestBuilder(PathParameters, RequestAdapter); } + /// The mentor property public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Students.Item.Mentor.MentorRequestBuilder Mentor { get => new global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Students.Item.Mentor.MentorRequestBuilder(PathParameters, RequestAdapter); } + /// The relationships property public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Students.Item.Relationships.RelationshipsRequestBuilder Relationships { get => new global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Students.Item.Relationships.RelationshipsRequestBuilder(PathParameters, RequestAdapter); } + /// /// Instantiates a new and sets the default values. /// @@ -43,6 +48,7 @@ public partial class StudentsItemRequestBuilder : BaseRequestBuilder public StudentsItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/students/{id}{?query*}", pathParameters) { } + /// /// Instantiates a new and sets the default values. /// @@ -51,6 +57,7 @@ public StudentsItemRequestBuilder(Dictionary pathParameters, IRe public StudentsItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/students/{id}{?query*}", rawUrl) { } + /// /// Retrieves an individual student by its identifier. /// @@ -59,15 +66,8 @@ public StudentsItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) /// Configuration for the request such as headers, query parameters, and middleware options. /// When receiving a 400 status code /// When receiving a 404 status code -#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> { @@ -76,23 +76,18 @@ public StudentsItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) }; return await RequestAdapter.SendAsync(requestInfo, global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.StudentPrimaryResponseDocument.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// /// 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 HeadAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { -#nullable restore -#else - public async Task HeadAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) - { -#endif var requestInfo = ToHeadRequestInformation(requestConfiguration); await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); } + /// /// Updates an existing student. /// @@ -104,15 +99,8 @@ public async Task HeadAsync(ActionWhen receiving a 404 status code /// When receiving a 409 status code /// When receiving a 422 status code -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public async Task PatchAsync(global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.UpdateStudentRequestDocument body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { -#nullable restore -#else - public async Task PatchAsync(global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.UpdateStudentRequestDocument body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) - { -#endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> @@ -124,58 +112,40 @@ public async Task HeadAsync(Action(requestInfo, global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.StudentPrimaryResponseDocument.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } + /// /// Retrieves an individual student by its identifier. /// /// A /// 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(Method.GET, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/vnd.api+json"); return requestInfo; } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// /// A /// 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 ToHeadRequestInformation(Action>? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToHeadRequestInformation(Action> requestConfiguration = default) - { -#endif var requestInfo = new RequestInformation(Method.HEAD, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); return requestInfo; } + /// /// Updates an existing student. /// /// A /// 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(global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.UpdateStudentRequestDocument body, Action>? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToPatchRequestInformation(global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.UpdateStudentRequestDocument body, Action> requestConfiguration = default) - { -#endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); @@ -183,6 +153,7 @@ public RequestInformation ToPatchRequestInformation(global::OpenApiKiotaEndToEnd requestInfo.SetContentFromParsable(RequestAdapter, "application/vnd.api+json", body); return requestInfo; } + /// /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. /// @@ -192,6 +163,7 @@ public RequestInformation ToPatchRequestInformation(global::OpenApiKiotaEndToEnd { return new global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Students.Item.StudentsItemRequestBuilder(rawUrl, RequestAdapter); } + /// /// Retrieves an individual student by its identifier. /// @@ -199,16 +171,10 @@ public RequestInformation ToPatchRequestInformation(global::OpenApiKiotaEndToEnd public partial class StudentsItemRequestBuilderGetQueryParameters { /// For syntax, see the documentation for the [`include`](https://www.jsonapi.net/usage/reading/including-relationships.html)/[`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// @@ -216,16 +182,10 @@ public partial class StudentsItemRequestBuilderGetQueryParameters public partial class StudentsItemRequestBuilderHeadQueryParameters { /// For syntax, see the documentation for the [`include`](https://www.jsonapi.net/usage/reading/including-relationships.html)/[`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } + /// /// Updates an existing student. /// @@ -233,16 +193,10 @@ public partial class StudentsItemRequestBuilderHeadQueryParameters public partial class StudentsItemRequestBuilderPatchQueryParameters { /// For syntax, see the documentation for the [`include`](https://www.jsonapi.net/usage/reading/including-relationships.html)/[`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Students/StudentsRequestBuilder.cs b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Students/StudentsRequestBuilder.cs index 29a540f42..d6d84b0af 100644 --- a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Students/StudentsRequestBuilder.cs +++ b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Students/StudentsRequestBuilder.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -30,6 +32,7 @@ public partial class StudentsRequestBuilder : BaseRequestBuilder return new global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Students.Item.StudentsItemRequestBuilder(urlTplParams, RequestAdapter); } } + /// /// Instantiates a new and sets the default values. /// @@ -38,6 +41,7 @@ public partial class StudentsRequestBuilder : BaseRequestBuilder public StudentsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/students{?query*}", pathParameters) { } + /// /// Instantiates a new and sets the default values. /// @@ -46,6 +50,7 @@ public StudentsRequestBuilder(Dictionary pathParameters, IReques public StudentsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/students{?query*}", rawUrl) { } + /// /// Retrieves a collection of students. /// @@ -53,15 +58,8 @@ public StudentsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b /// Cancellation token to use when cancelling requests /// Configuration for the request such as headers, query parameters, and middleware options. /// When receiving a 400 status code -#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> { @@ -69,23 +67,18 @@ public StudentsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b }; return await RequestAdapter.SendAsync(requestInfo, global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.StudentCollectionResponseDocument.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// /// 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 HeadAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { -#nullable restore -#else - public async Task HeadAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) - { -#endif var requestInfo = ToHeadRequestInformation(requestConfiguration); await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); } + /// /// Creates a new student. /// @@ -98,15 +91,8 @@ public async Task HeadAsync(ActionWhen receiving a 404 status code /// When receiving a 409 status code /// When receiving a 422 status code -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public async Task PostAsync(global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.CreateStudentRequestDocument body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { -#nullable restore -#else - public async Task PostAsync(global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.CreateStudentRequestDocument body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) - { -#endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> @@ -119,58 +105,40 @@ public async Task HeadAsync(Action(requestInfo, global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.StudentPrimaryResponseDocument.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } + /// /// Retrieves a collection of students. /// /// A /// 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(Method.GET, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/vnd.api+json"); return requestInfo; } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// /// A /// 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 ToHeadRequestInformation(Action>? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToHeadRequestInformation(Action> requestConfiguration = default) - { -#endif var requestInfo = new RequestInformation(Method.HEAD, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); return requestInfo; } + /// /// Creates a new student. /// /// A /// 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(global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.CreateStudentRequestDocument body, Action>? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToPostRequestInformation(global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.CreateStudentRequestDocument body, Action> requestConfiguration = default) - { -#endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); @@ -178,6 +146,7 @@ public RequestInformation ToPostRequestInformation(global::OpenApiKiotaEndToEndT requestInfo.SetContentFromParsable(RequestAdapter, "application/vnd.api+json", body); return requestInfo; } + /// /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. /// @@ -187,6 +156,7 @@ public RequestInformation ToPostRequestInformation(global::OpenApiKiotaEndToEndT { return new global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Students.StudentsRequestBuilder(rawUrl, RequestAdapter); } + /// /// Retrieves a collection of students. /// @@ -194,16 +164,10 @@ public RequestInformation ToPostRequestInformation(global::OpenApiKiotaEndToEndT public partial class StudentsRequestBuilderGetQueryParameters { /// For syntax, see the documentation for the [`include`](https://www.jsonapi.net/usage/reading/including-relationships.html)/[`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// @@ -211,16 +175,10 @@ public partial class StudentsRequestBuilderGetQueryParameters public partial class StudentsRequestBuilderHeadQueryParameters { /// For syntax, see the documentation for the [`include`](https://www.jsonapi.net/usage/reading/including-relationships.html)/[`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } + /// /// Creates a new student. /// @@ -228,16 +186,10 @@ public partial class StudentsRequestBuilderHeadQueryParameters public partial class StudentsRequestBuilderPostQueryParameters { /// For syntax, see the documentation for the [`include`](https://www.jsonapi.net/usage/reading/including-relationships.html)/[`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Teachers/Item/Mentors/MentorsRequestBuilder.cs b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Teachers/Item/Mentors/MentorsRequestBuilder.cs index 8a9232519..dc2ac030e 100644 --- a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Teachers/Item/Mentors/MentorsRequestBuilder.cs +++ b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Teachers/Item/Mentors/MentorsRequestBuilder.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -25,6 +27,7 @@ public partial class MentorsRequestBuilder : BaseRequestBuilder public MentorsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/teachers/{id}/mentors{?query*}", pathParameters) { } + /// /// Instantiates a new and sets the default values. /// @@ -33,6 +36,7 @@ public MentorsRequestBuilder(Dictionary pathParameters, IRequest public MentorsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/teachers/{id}/mentors{?query*}", rawUrl) { } + /// /// Retrieves the related students of an individual teacher's mentors relationship. /// @@ -41,15 +45,8 @@ public MentorsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba /// Configuration for the request such as headers, query parameters, and middleware options. /// When receiving a 400 status code /// When receiving a 404 status code -#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> { @@ -58,60 +55,43 @@ public MentorsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba }; return await RequestAdapter.SendAsync(requestInfo, global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.StudentCollectionResponseDocument.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// /// 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 HeadAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { -#nullable restore -#else - public async Task HeadAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) - { -#endif var requestInfo = ToHeadRequestInformation(requestConfiguration); await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); } + /// /// Retrieves the related students of an individual teacher's mentors relationship. /// /// A /// 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(Method.GET, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/vnd.api+json"); return requestInfo; } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// /// A /// 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 ToHeadRequestInformation(Action>? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToHeadRequestInformation(Action> requestConfiguration = default) - { -#endif var requestInfo = new RequestInformation(Method.HEAD, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); return requestInfo; } + /// /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. /// @@ -121,6 +101,7 @@ public RequestInformation ToHeadRequestInformation(Action /// Retrieves the related students of an individual teacher's mentors relationship. /// @@ -128,16 +109,10 @@ public RequestInformation ToHeadRequestInformation(ActionFor syntax, see the documentation for the [`include`](https://www.jsonapi.net/usage/reading/including-relationships.html)/[`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// @@ -145,16 +120,10 @@ public partial class MentorsRequestBuilderGetQueryParameters public partial class MentorsRequestBuilderHeadQueryParameters { /// For syntax, see the documentation for the [`include`](https://www.jsonapi.net/usage/reading/including-relationships.html)/[`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Teachers/Item/Relationships/Mentors/MentorsRequestBuilder.cs b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Teachers/Item/Relationships/Mentors/MentorsRequestBuilder.cs index fae514ab0..e8840a0aa 100644 --- a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Teachers/Item/Relationships/Mentors/MentorsRequestBuilder.cs +++ b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Teachers/Item/Relationships/Mentors/MentorsRequestBuilder.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -25,6 +27,7 @@ public partial class MentorsRequestBuilder : BaseRequestBuilder public MentorsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/teachers/{id}/relationships/mentors{?query*}", pathParameters) { } + /// /// Instantiates a new and sets the default values. /// @@ -33,6 +36,7 @@ public MentorsRequestBuilder(Dictionary pathParameters, IRequest public MentorsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/teachers/{id}/relationships/mentors{?query*}", rawUrl) { } + /// /// Removes existing students from the mentors relationship of an individual teacher. /// @@ -42,15 +46,8 @@ public MentorsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba /// When receiving a 400 status code /// When receiving a 404 status code /// When receiving a 409 status code -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public async Task DeleteAsync(global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.ToManyStudentInRequest body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { -#nullable restore -#else - public async Task DeleteAsync(global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.ToManyStudentInRequest body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) - { -#endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = ToDeleteRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> @@ -61,6 +58,7 @@ public async Task DeleteAsync(global::OpenApiKiotaEndToEndTests.AtomicOperations }; await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); } + /// /// Retrieves the related student identities of an individual teacher's mentors relationship. /// @@ -69,15 +67,8 @@ public async Task DeleteAsync(global::OpenApiKiotaEndToEndTests.AtomicOperations /// Configuration for the request such as headers, query parameters, and middleware options. /// When receiving a 400 status code /// When receiving a 404 status code -#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> { @@ -86,23 +77,18 @@ public async Task DeleteAsync(global::OpenApiKiotaEndToEndTests.AtomicOperations }; return await RequestAdapter.SendAsync(requestInfo, global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.StudentIdentifierCollectionResponseDocument.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// /// 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 HeadAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { -#nullable restore -#else - public async Task HeadAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) - { -#endif var requestInfo = ToHeadRequestInformation(requestConfiguration); await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); } + /// /// Assigns existing students to the mentors relationship of an individual teacher. /// @@ -112,15 +98,8 @@ public async Task HeadAsync(ActionWhen receiving a 400 status code /// When receiving a 404 status code /// When receiving a 409 status code -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public async Task PatchAsync(global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.ToManyStudentInRequest body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { -#nullable restore -#else - public async Task PatchAsync(global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.ToManyStudentInRequest body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) - { -#endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> @@ -131,6 +110,7 @@ public async Task PatchAsync(global::OpenApiKiotaEndToEndTests.AtomicOperations. }; await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); } + /// /// Adds existing students to the mentors relationship of an individual teacher. /// @@ -140,15 +120,8 @@ public async Task PatchAsync(global::OpenApiKiotaEndToEndTests.AtomicOperations. /// When receiving a 400 status code /// When receiving a 404 status code /// When receiving a 409 status code -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public async Task PostAsync(global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.ToManyStudentInRequest body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { -#nullable restore -#else - public async Task PostAsync(global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.ToManyStudentInRequest body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) - { -#endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> @@ -159,21 +132,15 @@ public async Task PostAsync(global::OpenApiKiotaEndToEndTests.AtomicOperations.G }; await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); } + /// /// Removes existing students from the mentors relationship of an individual teacher. /// /// A /// 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 ToDeleteRequestInformation(global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.ToManyStudentInRequest body, Action>? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToDeleteRequestInformation(global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.ToManyStudentInRequest body, Action> requestConfiguration = default) - { -#endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); @@ -181,58 +148,40 @@ public RequestInformation ToDeleteRequestInformation(global::OpenApiKiotaEndToEn requestInfo.SetContentFromParsable(RequestAdapter, "application/vnd.api+json", body); return requestInfo; } + /// /// Retrieves the related student identities of an individual teacher's mentors relationship. /// /// A /// 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(Method.GET, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/vnd.api+json"); return requestInfo; } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// /// A /// 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 ToHeadRequestInformation(Action>? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToHeadRequestInformation(Action> requestConfiguration = default) - { -#endif var requestInfo = new RequestInformation(Method.HEAD, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); return requestInfo; } + /// /// Assigns existing students to the mentors relationship of an individual teacher. /// /// A /// 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(global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.ToManyStudentInRequest body, Action>? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToPatchRequestInformation(global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.ToManyStudentInRequest body, Action> requestConfiguration = default) - { -#endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); @@ -240,21 +189,15 @@ public RequestInformation ToPatchRequestInformation(global::OpenApiKiotaEndToEnd requestInfo.SetContentFromParsable(RequestAdapter, "application/vnd.api+json", body); return requestInfo; } + /// /// Adds existing students to the mentors relationship of an individual teacher. /// /// A /// 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(global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.ToManyStudentInRequest body, Action>? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToPostRequestInformation(global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.ToManyStudentInRequest body, Action> requestConfiguration = default) - { -#endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); @@ -262,6 +205,7 @@ public RequestInformation ToPostRequestInformation(global::OpenApiKiotaEndToEndT requestInfo.SetContentFromParsable(RequestAdapter, "application/vnd.api+json", body); return requestInfo; } + /// /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. /// @@ -271,6 +215,7 @@ public RequestInformation ToPostRequestInformation(global::OpenApiKiotaEndToEndT { return new global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Teachers.Item.Relationships.Mentors.MentorsRequestBuilder(rawUrl, RequestAdapter); } + /// /// Retrieves the related student identities of an individual teacher's mentors relationship. /// @@ -278,16 +223,10 @@ public RequestInformation ToPostRequestInformation(global::OpenApiKiotaEndToEndT public partial class MentorsRequestBuilderGetQueryParameters { /// For syntax, see the documentation for the [`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// @@ -295,16 +234,10 @@ public partial class MentorsRequestBuilderGetQueryParameters public partial class MentorsRequestBuilderHeadQueryParameters { /// For syntax, see the documentation for the [`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Teachers/Item/Relationships/RelationshipsRequestBuilder.cs b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Teachers/Item/Relationships/RelationshipsRequestBuilder.cs index 2d728bbd2..ef50c45ce 100644 --- a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Teachers/Item/Relationships/RelationshipsRequestBuilder.cs +++ b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Teachers/Item/Relationships/RelationshipsRequestBuilder.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions; @@ -21,11 +23,13 @@ public partial class RelationshipsRequestBuilder : BaseRequestBuilder { get => new global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Teachers.Item.Relationships.Mentors.MentorsRequestBuilder(PathParameters, RequestAdapter); } + /// The teaches property public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Teachers.Item.Relationships.Teaches.TeachesRequestBuilder Teaches { get => new global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Teachers.Item.Relationships.Teaches.TeachesRequestBuilder(PathParameters, RequestAdapter); } + /// /// Instantiates a new and sets the default values. /// @@ -34,6 +38,7 @@ public partial class RelationshipsRequestBuilder : BaseRequestBuilder public RelationshipsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/teachers/{id}/relationships", pathParameters) { } + /// /// Instantiates a new and sets the default values. /// @@ -45,3 +50,4 @@ public RelationshipsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Teachers/Item/Relationships/Teaches/TeachesRequestBuilder.cs b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Teachers/Item/Relationships/Teaches/TeachesRequestBuilder.cs index a7468c7c9..b670959f9 100644 --- a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Teachers/Item/Relationships/Teaches/TeachesRequestBuilder.cs +++ b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Teachers/Item/Relationships/Teaches/TeachesRequestBuilder.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -25,6 +27,7 @@ public partial class TeachesRequestBuilder : BaseRequestBuilder public TeachesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/teachers/{id}/relationships/teaches{?query*}", pathParameters) { } + /// /// Instantiates a new and sets the default values. /// @@ -33,6 +36,7 @@ public TeachesRequestBuilder(Dictionary pathParameters, IRequest public TeachesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/teachers/{id}/relationships/teaches{?query*}", rawUrl) { } + /// /// Removes existing courses from the teaches relationship of an individual teacher. /// @@ -42,15 +46,8 @@ public TeachesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba /// When receiving a 400 status code /// When receiving a 404 status code /// When receiving a 409 status code -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public async Task DeleteAsync(global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.ToManyCourseInRequest body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { -#nullable restore -#else - public async Task DeleteAsync(global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.ToManyCourseInRequest body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) - { -#endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = ToDeleteRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> @@ -61,6 +58,7 @@ public async Task DeleteAsync(global::OpenApiKiotaEndToEndTests.AtomicOperations }; await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); } + /// /// Retrieves the related course identities of an individual teacher's teaches relationship. /// @@ -69,15 +67,8 @@ public async Task DeleteAsync(global::OpenApiKiotaEndToEndTests.AtomicOperations /// Configuration for the request such as headers, query parameters, and middleware options. /// When receiving a 400 status code /// When receiving a 404 status code -#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> { @@ -86,23 +77,18 @@ public async Task DeleteAsync(global::OpenApiKiotaEndToEndTests.AtomicOperations }; return await RequestAdapter.SendAsync(requestInfo, global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.CourseIdentifierCollectionResponseDocument.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// /// 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 HeadAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { -#nullable restore -#else - public async Task HeadAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) - { -#endif var requestInfo = ToHeadRequestInformation(requestConfiguration); await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); } + /// /// Assigns existing courses to the teaches relationship of an individual teacher. /// @@ -112,15 +98,8 @@ public async Task HeadAsync(ActionWhen receiving a 400 status code /// When receiving a 404 status code /// When receiving a 409 status code -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public async Task PatchAsync(global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.ToManyCourseInRequest body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { -#nullable restore -#else - public async Task PatchAsync(global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.ToManyCourseInRequest body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) - { -#endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> @@ -131,6 +110,7 @@ public async Task PatchAsync(global::OpenApiKiotaEndToEndTests.AtomicOperations. }; await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); } + /// /// Adds existing courses to the teaches relationship of an individual teacher. /// @@ -140,15 +120,8 @@ public async Task PatchAsync(global::OpenApiKiotaEndToEndTests.AtomicOperations. /// When receiving a 400 status code /// When receiving a 404 status code /// When receiving a 409 status code -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public async Task PostAsync(global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.ToManyCourseInRequest body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { -#nullable restore -#else - public async Task PostAsync(global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.ToManyCourseInRequest body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) - { -#endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> @@ -159,21 +132,15 @@ public async Task PostAsync(global::OpenApiKiotaEndToEndTests.AtomicOperations.G }; await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); } + /// /// Removes existing courses from the teaches relationship of an individual teacher. /// /// A /// 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 ToDeleteRequestInformation(global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.ToManyCourseInRequest body, Action>? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToDeleteRequestInformation(global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.ToManyCourseInRequest body, Action> requestConfiguration = default) - { -#endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); @@ -181,58 +148,40 @@ public RequestInformation ToDeleteRequestInformation(global::OpenApiKiotaEndToEn requestInfo.SetContentFromParsable(RequestAdapter, "application/vnd.api+json", body); return requestInfo; } + /// /// Retrieves the related course identities of an individual teacher's teaches relationship. /// /// A /// 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(Method.GET, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/vnd.api+json"); return requestInfo; } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// /// A /// 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 ToHeadRequestInformation(Action>? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToHeadRequestInformation(Action> requestConfiguration = default) - { -#endif var requestInfo = new RequestInformation(Method.HEAD, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); return requestInfo; } + /// /// Assigns existing courses to the teaches relationship of an individual teacher. /// /// A /// 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(global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.ToManyCourseInRequest body, Action>? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToPatchRequestInformation(global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.ToManyCourseInRequest body, Action> requestConfiguration = default) - { -#endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); @@ -240,21 +189,15 @@ public RequestInformation ToPatchRequestInformation(global::OpenApiKiotaEndToEnd requestInfo.SetContentFromParsable(RequestAdapter, "application/vnd.api+json", body); return requestInfo; } + /// /// Adds existing courses to the teaches relationship of an individual teacher. /// /// A /// 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(global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.ToManyCourseInRequest body, Action>? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToPostRequestInformation(global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.ToManyCourseInRequest body, Action> requestConfiguration = default) - { -#endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); @@ -262,6 +205,7 @@ public RequestInformation ToPostRequestInformation(global::OpenApiKiotaEndToEndT requestInfo.SetContentFromParsable(RequestAdapter, "application/vnd.api+json", body); return requestInfo; } + /// /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. /// @@ -271,6 +215,7 @@ public RequestInformation ToPostRequestInformation(global::OpenApiKiotaEndToEndT { return new global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Teachers.Item.Relationships.Teaches.TeachesRequestBuilder(rawUrl, RequestAdapter); } + /// /// Retrieves the related course identities of an individual teacher's teaches relationship. /// @@ -278,16 +223,10 @@ public RequestInformation ToPostRequestInformation(global::OpenApiKiotaEndToEndT public partial class TeachesRequestBuilderGetQueryParameters { /// For syntax, see the documentation for the [`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// @@ -295,16 +234,10 @@ public partial class TeachesRequestBuilderGetQueryParameters public partial class TeachesRequestBuilderHeadQueryParameters { /// For syntax, see the documentation for the [`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Teachers/Item/TeachersItemRequestBuilder.cs b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Teachers/Item/TeachersItemRequestBuilder.cs index 50ae20469..4c168e474 100644 --- a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Teachers/Item/TeachersItemRequestBuilder.cs +++ b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Teachers/Item/TeachersItemRequestBuilder.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -25,16 +27,19 @@ public partial class TeachersItemRequestBuilder : BaseRequestBuilder { get => new global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Teachers.Item.Mentors.MentorsRequestBuilder(PathParameters, RequestAdapter); } + /// The relationships property public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Teachers.Item.Relationships.RelationshipsRequestBuilder Relationships { get => new global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Teachers.Item.Relationships.RelationshipsRequestBuilder(PathParameters, RequestAdapter); } + /// The teaches property public global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Teachers.Item.Teaches.TeachesRequestBuilder Teaches { get => new global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Teachers.Item.Teaches.TeachesRequestBuilder(PathParameters, RequestAdapter); } + /// /// Instantiates a new and sets the default values. /// @@ -43,6 +48,7 @@ public partial class TeachersItemRequestBuilder : BaseRequestBuilder public TeachersItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/teachers/{id}{?query*}", pathParameters) { } + /// /// Instantiates a new and sets the default values. /// @@ -51,21 +57,15 @@ public TeachersItemRequestBuilder(Dictionary pathParameters, IRe public TeachersItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/teachers/{id}{?query*}", rawUrl) { } + /// /// Deletes an existing teacher by its identifier. /// /// Cancellation token to use when cancelling requests /// Configuration for the request such as headers, query parameters, and middleware options. /// When receiving a 404 status code -#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> { @@ -73,6 +73,7 @@ public async Task DeleteAsync(Action /// Retrieves an individual teacher by its identifier. /// @@ -81,15 +82,8 @@ public async Task DeleteAsync(ActionConfiguration for the request such as headers, query parameters, and middleware options. /// When receiving a 400 status code /// When receiving a 404 status code -#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> { @@ -98,23 +92,18 @@ public async Task DeleteAsync(Action(requestInfo, global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.TeacherPrimaryResponseDocument.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// /// 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 HeadAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { -#nullable restore -#else - public async Task HeadAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) - { -#endif var requestInfo = ToHeadRequestInformation(requestConfiguration); await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); } + /// /// Updates an existing teacher. /// @@ -126,15 +115,8 @@ public async Task HeadAsync(ActionWhen receiving a 404 status code /// When receiving a 409 status code /// When receiving a 422 status code -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public async Task PatchAsync(global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.UpdateTeacherRequestDocument body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { -#nullable restore -#else - public async Task PatchAsync(global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.UpdateTeacherRequestDocument body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) - { -#endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> @@ -146,77 +128,53 @@ public async Task HeadAsync(Action(requestInfo, global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.TeacherPrimaryResponseDocument.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } + /// /// Deletes an existing teacher by its identifier. /// /// A /// 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(Method.DELETE, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/vnd.api+json"); return requestInfo; } + /// /// Retrieves an individual teacher by its identifier. /// /// A /// 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(Method.GET, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/vnd.api+json"); return requestInfo; } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// /// A /// 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 ToHeadRequestInformation(Action>? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToHeadRequestInformation(Action> requestConfiguration = default) - { -#endif var requestInfo = new RequestInformation(Method.HEAD, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); return requestInfo; } + /// /// Updates an existing teacher. /// /// A /// 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(global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.UpdateTeacherRequestDocument body, Action>? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToPatchRequestInformation(global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.UpdateTeacherRequestDocument body, Action> requestConfiguration = default) - { -#endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); @@ -224,6 +182,7 @@ public RequestInformation ToPatchRequestInformation(global::OpenApiKiotaEndToEnd requestInfo.SetContentFromParsable(RequestAdapter, "application/vnd.api+json", body); return requestInfo; } + /// /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. /// @@ -233,6 +192,7 @@ public RequestInformation ToPatchRequestInformation(global::OpenApiKiotaEndToEnd { return new global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Teachers.Item.TeachersItemRequestBuilder(rawUrl, RequestAdapter); } + /// /// Retrieves an individual teacher by its identifier. /// @@ -240,16 +200,10 @@ public RequestInformation ToPatchRequestInformation(global::OpenApiKiotaEndToEnd public partial class TeachersItemRequestBuilderGetQueryParameters { /// For syntax, see the documentation for the [`include`](https://www.jsonapi.net/usage/reading/including-relationships.html)/[`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// @@ -257,16 +211,10 @@ public partial class TeachersItemRequestBuilderGetQueryParameters public partial class TeachersItemRequestBuilderHeadQueryParameters { /// For syntax, see the documentation for the [`include`](https://www.jsonapi.net/usage/reading/including-relationships.html)/[`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } + /// /// Updates an existing teacher. /// @@ -274,16 +222,10 @@ public partial class TeachersItemRequestBuilderHeadQueryParameters public partial class TeachersItemRequestBuilderPatchQueryParameters { /// For syntax, see the documentation for the [`include`](https://www.jsonapi.net/usage/reading/including-relationships.html)/[`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Teachers/Item/Teaches/TeachesRequestBuilder.cs b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Teachers/Item/Teaches/TeachesRequestBuilder.cs index 536d92d38..c5c997b94 100644 --- a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Teachers/Item/Teaches/TeachesRequestBuilder.cs +++ b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Teachers/Item/Teaches/TeachesRequestBuilder.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -25,6 +27,7 @@ public partial class TeachesRequestBuilder : BaseRequestBuilder public TeachesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/teachers/{id}/teaches{?query*}", pathParameters) { } + /// /// Instantiates a new and sets the default values. /// @@ -33,6 +36,7 @@ public TeachesRequestBuilder(Dictionary pathParameters, IRequest public TeachesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/teachers/{id}/teaches{?query*}", rawUrl) { } + /// /// Retrieves the related courses of an individual teacher's teaches relationship. /// @@ -41,15 +45,8 @@ public TeachesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba /// Configuration for the request such as headers, query parameters, and middleware options. /// When receiving a 400 status code /// When receiving a 404 status code -#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> { @@ -58,60 +55,43 @@ public TeachesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba }; return await RequestAdapter.SendAsync(requestInfo, global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.CourseCollectionResponseDocument.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// /// 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 HeadAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { -#nullable restore -#else - public async Task HeadAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) - { -#endif var requestInfo = ToHeadRequestInformation(requestConfiguration); await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); } + /// /// Retrieves the related courses of an individual teacher's teaches relationship. /// /// A /// 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(Method.GET, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/vnd.api+json"); return requestInfo; } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// /// A /// 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 ToHeadRequestInformation(Action>? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToHeadRequestInformation(Action> requestConfiguration = default) - { -#endif var requestInfo = new RequestInformation(Method.HEAD, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); return requestInfo; } + /// /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. /// @@ -121,6 +101,7 @@ public RequestInformation ToHeadRequestInformation(Action /// Retrieves the related courses of an individual teacher's teaches relationship. /// @@ -128,16 +109,10 @@ public RequestInformation ToHeadRequestInformation(ActionFor syntax, see the documentation for the [`include`](https://www.jsonapi.net/usage/reading/including-relationships.html)/[`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// @@ -145,16 +120,10 @@ public partial class TeachesRequestBuilderGetQueryParameters public partial class TeachesRequestBuilderHeadQueryParameters { /// For syntax, see the documentation for the [`include`](https://www.jsonapi.net/usage/reading/including-relationships.html)/[`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Teachers/TeachersRequestBuilder.cs b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Teachers/TeachersRequestBuilder.cs index e60354e4e..2a4759ab0 100644 --- a/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Teachers/TeachersRequestBuilder.cs +++ b/test/OpenApiKiotaEndToEndTests/AtomicOperations/GeneratedCode/Teachers/TeachersRequestBuilder.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -30,6 +32,7 @@ public partial class TeachersRequestBuilder : BaseRequestBuilder return new global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Teachers.Item.TeachersItemRequestBuilder(urlTplParams, RequestAdapter); } } + /// /// Instantiates a new and sets the default values. /// @@ -38,6 +41,7 @@ public partial class TeachersRequestBuilder : BaseRequestBuilder public TeachersRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/teachers{?query*}", pathParameters) { } + /// /// Instantiates a new and sets the default values. /// @@ -46,6 +50,7 @@ public TeachersRequestBuilder(Dictionary pathParameters, IReques public TeachersRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/teachers{?query*}", rawUrl) { } + /// /// Retrieves a collection of teachers. /// @@ -53,15 +58,8 @@ public TeachersRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b /// Cancellation token to use when cancelling requests /// Configuration for the request such as headers, query parameters, and middleware options. /// When receiving a 400 status code -#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> { @@ -69,23 +67,18 @@ public TeachersRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b }; return await RequestAdapter.SendAsync(requestInfo, global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.TeacherCollectionResponseDocument.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// /// 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 HeadAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { -#nullable restore -#else - public async Task HeadAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) - { -#endif var requestInfo = ToHeadRequestInformation(requestConfiguration); await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); } + /// /// Creates a new teacher. /// @@ -98,15 +91,8 @@ public async Task HeadAsync(ActionWhen receiving a 404 status code /// When receiving a 409 status code /// When receiving a 422 status code -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public async Task PostAsync(global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.CreateTeacherRequestDocument body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { -#nullable restore -#else - public async Task PostAsync(global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.CreateTeacherRequestDocument body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) - { -#endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> @@ -119,58 +105,40 @@ public async Task HeadAsync(Action(requestInfo, global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.TeacherPrimaryResponseDocument.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } + /// /// Retrieves a collection of teachers. /// /// A /// 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(Method.GET, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/vnd.api+json"); return requestInfo; } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// /// A /// 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 ToHeadRequestInformation(Action>? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToHeadRequestInformation(Action> requestConfiguration = default) - { -#endif var requestInfo = new RequestInformation(Method.HEAD, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); return requestInfo; } + /// /// Creates a new teacher. /// /// A /// 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(global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.CreateTeacherRequestDocument body, Action>? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToPostRequestInformation(global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Models.CreateTeacherRequestDocument body, Action> requestConfiguration = default) - { -#endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); @@ -178,6 +146,7 @@ public RequestInformation ToPostRequestInformation(global::OpenApiKiotaEndToEndT requestInfo.SetContentFromParsable(RequestAdapter, "application/vnd.api+json", body); return requestInfo; } + /// /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. /// @@ -187,6 +156,7 @@ public RequestInformation ToPostRequestInformation(global::OpenApiKiotaEndToEndT { return new global::OpenApiKiotaEndToEndTests.AtomicOperations.GeneratedCode.Teachers.TeachersRequestBuilder(rawUrl, RequestAdapter); } + /// /// Retrieves a collection of teachers. /// @@ -194,16 +164,10 @@ public RequestInformation ToPostRequestInformation(global::OpenApiKiotaEndToEndT public partial class TeachersRequestBuilderGetQueryParameters { /// For syntax, see the documentation for the [`include`](https://www.jsonapi.net/usage/reading/including-relationships.html)/[`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// @@ -211,16 +175,10 @@ public partial class TeachersRequestBuilderGetQueryParameters public partial class TeachersRequestBuilderHeadQueryParameters { /// For syntax, see the documentation for the [`include`](https://www.jsonapi.net/usage/reading/including-relationships.html)/[`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } + /// /// Creates a new teacher. /// @@ -228,16 +186,10 @@ public partial class TeachersRequestBuilderHeadQueryParameters public partial class TeachersRequestBuilderPostQueryParameters { /// For syntax, see the documentation for the [`include`](https://www.jsonapi.net/usage/reading/including-relationships.html)/[`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/ClientIdGenerationModesClient.cs b/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/ClientIdGenerationModesClient.cs index bf8b0ed28..6bc5dd089 100644 --- a/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/ClientIdGenerationModesClient.cs +++ b/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/ClientIdGenerationModesClient.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Store; @@ -27,16 +29,19 @@ public partial class ClientIdGenerationModesClient : BaseRequestBuilder { get => new global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Games.GamesRequestBuilder(PathParameters, RequestAdapter); } + /// The playerGroups property public global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.PlayerGroups.PlayerGroupsRequestBuilder PlayerGroups { get => new global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.PlayerGroups.PlayerGroupsRequestBuilder(PathParameters, RequestAdapter); } + /// The players property public global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Players.PlayersRequestBuilder Players { get => new global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Players.PlayersRequestBuilder(PathParameters, RequestAdapter); } + /// /// Instantiates a new and sets the default values. /// @@ -61,3 +66,4 @@ public partial class ClientIdGenerationModesClient : BaseRequestBuilder } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/Games/GamesRequestBuilder.cs b/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/Games/GamesRequestBuilder.cs index b58c40719..3b96d8a52 100644 --- a/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/Games/GamesRequestBuilder.cs +++ b/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/Games/GamesRequestBuilder.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -25,6 +27,7 @@ public partial class GamesRequestBuilder : BaseRequestBuilder public GamesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/games{?query*}", pathParameters) { } + /// /// Instantiates a new and sets the default values. /// @@ -33,6 +36,7 @@ public GamesRequestBuilder(Dictionary pathParameters, IRequestAd public GamesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/games{?query*}", rawUrl) { } + /// /// Creates a new game. /// @@ -44,15 +48,8 @@ public GamesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base /// When receiving a 404 status code /// When receiving a 409 status code /// When receiving a 422 status code -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public async Task PostAsync(global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models.CreateGameRequestDocument body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { -#nullable restore -#else - public async Task PostAsync(global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models.CreateGameRequestDocument body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) - { -#endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> @@ -64,21 +61,15 @@ public GamesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base }; return await RequestAdapter.SendAsync(requestInfo, global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models.GamePrimaryResponseDocument.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } + /// /// Creates a new game. /// /// A /// 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(global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models.CreateGameRequestDocument body, Action>? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToPostRequestInformation(global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models.CreateGameRequestDocument body, Action> requestConfiguration = default) - { -#endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); @@ -86,6 +77,7 @@ public RequestInformation ToPostRequestInformation(global::OpenApiKiotaEndToEndT requestInfo.SetContentFromParsable(RequestAdapter, "application/vnd.api+json", body); return requestInfo; } + /// /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. /// @@ -95,6 +87,7 @@ public RequestInformation ToPostRequestInformation(global::OpenApiKiotaEndToEndT { return new global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Games.GamesRequestBuilder(rawUrl, RequestAdapter); } + /// /// Creates a new game. /// @@ -102,16 +95,10 @@ public RequestInformation ToPostRequestInformation(global::OpenApiKiotaEndToEndT public partial class GamesRequestBuilderPostQueryParameters { /// For syntax, see the documentation for the [`include`](https://www.jsonapi.net/usage/reading/including-relationships.html)/[`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/Models/AttributesInCreateGameRequest.cs b/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/Models/AttributesInCreateGameRequest.cs index 57930d4af..12d1d4ec5 100644 --- a/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/Models/AttributesInCreateGameRequest.cs +++ b/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/Models/AttributesInCreateGameRequest.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,28 +17,21 @@ public partial class AttributesInCreateGameRequest : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The purchasePrice property public double? PurchasePrice { get { return BackingStore?.Get("purchasePrice"); } set { BackingStore?.Set("purchasePrice", value); } } + /// The title property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Title { get { return BackingStore?.Get("title"); } set { BackingStore?.Set("title", value); } } -#nullable restore -#else - public string Title - { - get { return BackingStore?.Get("title"); } - set { BackingStore?.Set("title", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -44,6 +39,7 @@ public AttributesInCreateGameRequest() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -54,6 +50,7 @@ public AttributesInCreateGameRequest() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models.AttributesInCreateGameRequest(); } + /// /// The deserialization information for the current model /// @@ -66,6 +63,7 @@ public virtual IDictionary> GetFieldDeserializers() { "title", n => { Title = n.GetStringValue(); } }, }; } + /// /// Serializes information the current object /// @@ -79,3 +77,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/Models/AttributesInCreatePlayerGroupRequest.cs b/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/Models/AttributesInCreatePlayerGroupRequest.cs index c4a3f590b..771f8e2f6 100644 --- a/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/Models/AttributesInCreatePlayerGroupRequest.cs +++ b/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/Models/AttributesInCreatePlayerGroupRequest.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,22 +17,14 @@ public partial class AttributesInCreatePlayerGroupRequest : IBackedModel, IParsa { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The name property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Name { get { return BackingStore?.Get("name"); } set { BackingStore?.Set("name", value); } } -#nullable restore -#else - public string Name - { - get { return BackingStore?.Get("name"); } - set { BackingStore?.Set("name", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -38,6 +32,7 @@ public AttributesInCreatePlayerGroupRequest() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -48,6 +43,7 @@ public AttributesInCreatePlayerGroupRequest() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models.AttributesInCreatePlayerGroupRequest(); } + /// /// The deserialization information for the current model /// @@ -59,6 +55,7 @@ public virtual IDictionary> GetFieldDeserializers() { "name", n => { Name = n.GetStringValue(); } }, }; } + /// /// Serializes information the current object /// @@ -71,3 +68,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/Models/AttributesInCreatePlayerRequest.cs b/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/Models/AttributesInCreatePlayerRequest.cs index 504274fcd..e333417de 100644 --- a/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/Models/AttributesInCreatePlayerRequest.cs +++ b/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/Models/AttributesInCreatePlayerRequest.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,22 +17,14 @@ public partial class AttributesInCreatePlayerRequest : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The userName property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? UserName { get { return BackingStore?.Get("userName"); } set { BackingStore?.Set("userName", value); } } -#nullable restore -#else - public string UserName - { - get { return BackingStore?.Get("userName"); } - set { BackingStore?.Set("userName", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -38,6 +32,7 @@ public AttributesInCreatePlayerRequest() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -48,6 +43,7 @@ public AttributesInCreatePlayerRequest() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models.AttributesInCreatePlayerRequest(); } + /// /// The deserialization information for the current model /// @@ -59,6 +55,7 @@ public virtual IDictionary> GetFieldDeserializers() { "userName", n => { UserName = n.GetStringValue(); } }, }; } + /// /// Serializes information the current object /// @@ -71,3 +68,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/Models/CreateGameRequestDocument.cs b/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/Models/CreateGameRequestDocument.cs index c7cc3d0b7..0ad5241ca 100644 --- a/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/Models/CreateGameRequestDocument.cs +++ b/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/Models/CreateGameRequestDocument.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,38 +17,21 @@ public partial class CreateGameRequestDocument : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The data property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models.DataInCreateGameRequest? Data { get { return BackingStore?.Get("data"); } set { BackingStore?.Set("data", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models.DataInCreateGameRequest Data - { - get { return BackingStore?.Get("data"); } - set { BackingStore?.Set("data", value); } - } -#endif + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -54,6 +39,7 @@ public CreateGameRequestDocument() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -64,6 +50,7 @@ public CreateGameRequestDocument() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models.CreateGameRequestDocument(); } + /// /// The deserialization information for the current model /// @@ -76,6 +63,7 @@ public virtual IDictionary> GetFieldDeserializers() { "meta", n => { Meta = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models.Meta.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -89,3 +77,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/Models/CreatePlayerGroupRequestDocument.cs b/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/Models/CreatePlayerGroupRequestDocument.cs index 20f2917fd..4bd655403 100644 --- a/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/Models/CreatePlayerGroupRequestDocument.cs +++ b/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/Models/CreatePlayerGroupRequestDocument.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,38 +17,21 @@ public partial class CreatePlayerGroupRequestDocument : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The data property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models.DataInCreatePlayerGroupRequest? Data { get { return BackingStore?.Get("data"); } set { BackingStore?.Set("data", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models.DataInCreatePlayerGroupRequest Data - { - get { return BackingStore?.Get("data"); } - set { BackingStore?.Set("data", value); } - } -#endif + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -54,6 +39,7 @@ public CreatePlayerGroupRequestDocument() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -64,6 +50,7 @@ public CreatePlayerGroupRequestDocument() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models.CreatePlayerGroupRequestDocument(); } + /// /// The deserialization information for the current model /// @@ -76,6 +63,7 @@ public virtual IDictionary> GetFieldDeserializers() { "meta", n => { Meta = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models.Meta.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -89,3 +77,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/Models/CreatePlayerRequestDocument.cs b/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/Models/CreatePlayerRequestDocument.cs index 879df354d..8d4cabbbb 100644 --- a/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/Models/CreatePlayerRequestDocument.cs +++ b/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/Models/CreatePlayerRequestDocument.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,38 +17,21 @@ public partial class CreatePlayerRequestDocument : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The data property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models.DataInCreatePlayerRequest? Data { get { return BackingStore?.Get("data"); } set { BackingStore?.Set("data", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models.DataInCreatePlayerRequest Data - { - get { return BackingStore?.Get("data"); } - set { BackingStore?.Set("data", value); } - } -#endif + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -54,6 +39,7 @@ public CreatePlayerRequestDocument() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -64,6 +50,7 @@ public CreatePlayerRequestDocument() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models.CreatePlayerRequestDocument(); } + /// /// The deserialization information for the current model /// @@ -76,6 +63,7 @@ public virtual IDictionary> GetFieldDeserializers() { "meta", n => { Meta = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models.Meta.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -89,3 +77,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/Models/DataInCreateGameRequest.cs b/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/Models/DataInCreateGameRequest.cs index e2577f7b5..ccabcd88b 100644 --- a/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/Models/DataInCreateGameRequest.cs +++ b/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/Models/DataInCreateGameRequest.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -14,51 +16,36 @@ public partial class DataInCreateGameRequest : IBackedModel, IParsable #pragma warning restore CS1591 { /// The attributes property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models.AttributesInCreateGameRequest? Attributes { get { return BackingStore?.Get("attributes"); } set { BackingStore?.Set("attributes", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models.AttributesInCreateGameRequest Attributes - { - get { return BackingStore?.Get("attributes"); } - set { BackingStore?.Set("attributes", value); } - } -#endif + /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The id property public Guid? Id { get { return BackingStore?.Get("id"); } set { BackingStore?.Set("id", value); } } + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// The type property public global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models.GameResourceType? Type { get { return BackingStore?.Get("type"); } set { BackingStore?.Set("type", value); } } + /// /// Instantiates a new and sets the default values. /// @@ -66,6 +53,7 @@ public DataInCreateGameRequest() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -76,6 +64,7 @@ public DataInCreateGameRequest() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models.DataInCreateGameRequest(); } + /// /// The deserialization information for the current model /// @@ -90,6 +79,7 @@ public virtual IDictionary> GetFieldDeserializers() { "type", n => { Type = n.GetEnumValue(); } }, }; } + /// /// Serializes information the current object /// @@ -105,3 +95,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/Models/DataInCreatePlayerGroupRequest.cs b/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/Models/DataInCreatePlayerGroupRequest.cs index 7086ff345..5a94fe9e9 100644 --- a/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/Models/DataInCreatePlayerGroupRequest.cs +++ b/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/Models/DataInCreatePlayerGroupRequest.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -14,61 +16,36 @@ public partial class DataInCreatePlayerGroupRequest : IBackedModel, IParsable #pragma warning restore CS1591 { /// The attributes property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models.AttributesInCreatePlayerGroupRequest? Attributes { get { return BackingStore?.Get("attributes"); } set { BackingStore?.Set("attributes", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models.AttributesInCreatePlayerGroupRequest Attributes - { - get { return BackingStore?.Get("attributes"); } - set { BackingStore?.Set("attributes", value); } - } -#endif + /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// The relationships property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models.RelationshipsInCreatePlayerGroupRequest? Relationships { get { return BackingStore?.Get("relationships"); } set { BackingStore?.Set("relationships", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models.RelationshipsInCreatePlayerGroupRequest Relationships - { - get { return BackingStore?.Get("relationships"); } - set { BackingStore?.Set("relationships", value); } - } -#endif + /// The type property public global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models.PlayerGroupResourceType? Type { get { return BackingStore?.Get("type"); } set { BackingStore?.Set("type", value); } } + /// /// Instantiates a new and sets the default values. /// @@ -76,6 +53,7 @@ public DataInCreatePlayerGroupRequest() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -86,6 +64,7 @@ public DataInCreatePlayerGroupRequest() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models.DataInCreatePlayerGroupRequest(); } + /// /// The deserialization information for the current model /// @@ -100,6 +79,7 @@ public virtual IDictionary> GetFieldDeserializers() { "type", n => { Type = n.GetEnumValue(); } }, }; } + /// /// Serializes information the current object /// @@ -115,3 +95,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/Models/DataInCreatePlayerRequest.cs b/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/Models/DataInCreatePlayerRequest.cs index 1ba537081..9d8a51f9e 100644 --- a/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/Models/DataInCreatePlayerRequest.cs +++ b/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/Models/DataInCreatePlayerRequest.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -14,67 +16,43 @@ public partial class DataInCreatePlayerRequest : IBackedModel, IParsable #pragma warning restore CS1591 { /// The attributes property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models.AttributesInCreatePlayerRequest? Attributes { get { return BackingStore?.Get("attributes"); } set { BackingStore?.Set("attributes", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models.AttributesInCreatePlayerRequest Attributes - { - get { return BackingStore?.Get("attributes"); } - set { BackingStore?.Set("attributes", value); } - } -#endif + /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The id property public Guid? Id { get { return BackingStore?.Get("id"); } set { BackingStore?.Set("id", value); } } + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// The relationships property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models.RelationshipsInCreatePlayerRequest? Relationships { get { return BackingStore?.Get("relationships"); } set { BackingStore?.Set("relationships", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models.RelationshipsInCreatePlayerRequest Relationships - { - get { return BackingStore?.Get("relationships"); } - set { BackingStore?.Set("relationships", value); } - } -#endif + /// The type property public global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models.PlayerResourceType? Type { get { return BackingStore?.Get("type"); } set { BackingStore?.Set("type", value); } } + /// /// Instantiates a new and sets the default values. /// @@ -82,6 +60,7 @@ public DataInCreatePlayerRequest() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -92,6 +71,7 @@ public DataInCreatePlayerRequest() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models.DataInCreatePlayerRequest(); } + /// /// The deserialization information for the current model /// @@ -107,6 +87,7 @@ public virtual IDictionary> GetFieldDeserializers() { "type", n => { Type = n.GetEnumValue(); } }, }; } + /// /// Serializes information the current object /// @@ -123,3 +104,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/Models/DataInResponse.cs b/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/Models/DataInResponse.cs index fff6a58ec..c4ef67bf2 100644 --- a/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/Models/DataInResponse.cs +++ b/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/Models/DataInResponse.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,28 +17,21 @@ public partial class DataInResponse : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// The type property public global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models.ResourceType? Type { get { return BackingStore?.Get("type"); } set { BackingStore?.Set("type", value); } } + /// /// Instantiates a new and sets the default values. /// @@ -44,6 +39,7 @@ public DataInResponse() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -61,6 +57,7 @@ public DataInResponse() _ => new global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models.DataInResponse(), }; } + /// /// The deserialization information for the current model /// @@ -73,6 +70,7 @@ public virtual IDictionary> GetFieldDeserializers() { "type", n => { Type = n.GetEnumValue(); } }, }; } + /// /// Serializes information the current object /// @@ -86,3 +84,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/Models/ErrorLinks.cs b/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/Models/ErrorLinks.cs index b7c54ab10..543849b5a 100644 --- a/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/Models/ErrorLinks.cs +++ b/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/Models/ErrorLinks.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -14,39 +16,22 @@ public partial class ErrorLinks : IBackedModel, IParsable #pragma warning restore CS1591 { /// The about property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? About { get { return BackingStore?.Get("about"); } set { BackingStore?.Set("about", value); } } -#nullable restore -#else - public string About - { - get { return BackingStore?.Get("about"); } - set { BackingStore?.Set("about", value); } - } -#endif + /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// 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 and sets the default values. /// @@ -54,6 +39,7 @@ public ErrorLinks() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -64,6 +50,7 @@ public ErrorLinks() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models.ErrorLinks(); } + /// /// The deserialization information for the current model /// @@ -76,6 +63,7 @@ public virtual IDictionary> GetFieldDeserializers() { "type", n => { Type = n.GetStringValue(); } }, }; } + /// /// Serializes information the current object /// @@ -89,3 +77,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/Models/ErrorObject.cs b/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/Models/ErrorObject.cs index bdc0539be..45adca8d8 100644 --- a/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/Models/ErrorObject.cs +++ b/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/Models/ErrorObject.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,134 +17,63 @@ public partial class ErrorObject : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The code property -#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 detail property -#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 id property -#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 links property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models.ErrorLinks? Links { get { return BackingStore?.Get("links"); } set { BackingStore?.Set("links", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models.ErrorLinks Links - { - get { return BackingStore?.Get("links"); } - set { BackingStore?.Set("links", value); } - } -#endif + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// The source property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models.ErrorSource? Source { get { return BackingStore?.Get("source"); } set { BackingStore?.Set("source", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models.ErrorSource Source - { - get { return BackingStore?.Get("source"); } - set { BackingStore?.Set("source", value); } - } -#endif + /// The status property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Status { get { return BackingStore?.Get("status"); } set { BackingStore?.Set("status", value); } } -#nullable restore -#else - public string Status - { - get { return BackingStore?.Get("status"); } - set { BackingStore?.Set("status", value); } - } -#endif + /// The title property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Title { get { return BackingStore?.Get("title"); } set { BackingStore?.Set("title", value); } } -#nullable restore -#else - public string Title - { - get { return BackingStore?.Get("title"); } - set { BackingStore?.Set("title", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -150,6 +81,7 @@ public ErrorObject() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -160,6 +92,7 @@ public ErrorObject() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models.ErrorObject(); } + /// /// The deserialization information for the current model /// @@ -178,6 +111,7 @@ public virtual IDictionary> GetFieldDeserializers() { "title", n => { Title = n.GetStringValue(); } }, }; } + /// /// Serializes information the current object /// @@ -197,3 +131,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/Models/ErrorResponseDocument.cs b/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/Models/ErrorResponseDocument.cs index f141b57dd..7094b0cb0 100644 --- a/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/Models/ErrorResponseDocument.cs +++ b/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/Models/ErrorResponseDocument.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -16,56 +18,31 @@ public partial class ErrorResponseDocument : ApiException, IBackedModel, IParsab { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The errors property -#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 + /// The links property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models.ErrorTopLevelLinks? Links { get { return BackingStore?.Get("links"); } set { BackingStore?.Set("links", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models.ErrorTopLevelLinks Links - { - get { return BackingStore?.Get("links"); } - set { BackingStore?.Set("links", value); } - } -#endif + /// The primary error message. public override string Message { get => base.Message; } + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -73,6 +50,7 @@ public ErrorResponseDocument() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -83,6 +61,7 @@ public ErrorResponseDocument() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models.ErrorResponseDocument(); } + /// /// The deserialization information for the current model /// @@ -96,6 +75,7 @@ public virtual IDictionary> GetFieldDeserializers() { "meta", n => { Meta = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models.Meta.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -110,3 +90,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/Models/ErrorSource.cs b/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/Models/ErrorSource.cs index c0b8589f9..cded38619 100644 --- a/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/Models/ErrorSource.cs +++ b/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/Models/ErrorSource.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,54 +17,28 @@ public partial class ErrorSource : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The header property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Header { get { return BackingStore?.Get("header"); } set { BackingStore?.Set("header", value); } } -#nullable restore -#else - public string Header - { - get { return BackingStore?.Get("header"); } - set { BackingStore?.Set("header", value); } - } -#endif + /// The parameter property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Parameter { get { return BackingStore?.Get("parameter"); } set { BackingStore?.Set("parameter", value); } } -#nullable restore -#else - public string Parameter - { - get { return BackingStore?.Get("parameter"); } - set { BackingStore?.Set("parameter", value); } - } -#endif + /// The pointer property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Pointer { get { return BackingStore?.Get("pointer"); } set { BackingStore?.Set("pointer", value); } } -#nullable restore -#else - public string Pointer - { - get { return BackingStore?.Get("pointer"); } - set { BackingStore?.Set("pointer", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -70,6 +46,7 @@ public ErrorSource() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -80,6 +57,7 @@ public ErrorSource() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models.ErrorSource(); } + /// /// The deserialization information for the current model /// @@ -93,6 +71,7 @@ public virtual IDictionary> GetFieldDeserializers() { "pointer", n => { Pointer = n.GetStringValue(); } }, }; } + /// /// Serializes information the current object /// @@ -107,3 +86,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/Models/ErrorTopLevelLinks.cs b/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/Models/ErrorTopLevelLinks.cs index fc8b4f74c..26ea7a263 100644 --- a/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/Models/ErrorTopLevelLinks.cs +++ b/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/Models/ErrorTopLevelLinks.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,38 +17,21 @@ public partial class ErrorTopLevelLinks : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The describedby property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Describedby { get { return BackingStore?.Get("describedby"); } set { BackingStore?.Set("describedby", value); } } -#nullable restore -#else - public string Describedby - { - get { return BackingStore?.Get("describedby"); } - set { BackingStore?.Set("describedby", value); } - } -#endif + /// The self property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Self { get { return BackingStore?.Get("self"); } set { BackingStore?.Set("self", value); } } -#nullable restore -#else - public string Self - { - get { return BackingStore?.Get("self"); } - set { BackingStore?.Set("self", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -54,6 +39,7 @@ public ErrorTopLevelLinks() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -64,6 +50,7 @@ public ErrorTopLevelLinks() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models.ErrorTopLevelLinks(); } + /// /// The deserialization information for the current model /// @@ -76,6 +63,7 @@ public virtual IDictionary> GetFieldDeserializers() { "self", n => { Self = n.GetStringValue(); } }, }; } + /// /// Serializes information the current object /// @@ -89,3 +77,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/Models/GameAttributesInResponse.cs b/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/Models/GameAttributesInResponse.cs index d8f6473c7..4a3503ee3 100644 --- a/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/Models/GameAttributesInResponse.cs +++ b/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/Models/GameAttributesInResponse.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,28 +17,21 @@ public partial class GameAttributesInResponse : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The purchasePrice property public double? PurchasePrice { get { return BackingStore?.Get("purchasePrice"); } set { BackingStore?.Set("purchasePrice", value); } } + /// The title property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Title { get { return BackingStore?.Get("title"); } set { BackingStore?.Set("title", value); } } -#nullable restore -#else - public string Title - { - get { return BackingStore?.Get("title"); } - set { BackingStore?.Set("title", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -44,6 +39,7 @@ public GameAttributesInResponse() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -54,6 +50,7 @@ public GameAttributesInResponse() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models.GameAttributesInResponse(); } + /// /// The deserialization information for the current model /// @@ -66,6 +63,7 @@ public virtual IDictionary> GetFieldDeserializers() { "title", n => { Title = n.GetStringValue(); } }, }; } + /// /// Serializes information the current object /// @@ -79,3 +77,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/Models/GameDataInResponse.cs b/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/Models/GameDataInResponse.cs index 01e6ecb90..4dc0718a0 100644 --- a/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/Models/GameDataInResponse.cs +++ b/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/Models/GameDataInResponse.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -13,43 +15,26 @@ public partial class GameDataInResponse : global::OpenApiKiotaEndToEndTests.Clie #pragma warning restore CS1591 { /// The attributes property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models.GameAttributesInResponse? Attributes { get { return BackingStore?.Get("attributes"); } set { BackingStore?.Set("attributes", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models.GameAttributesInResponse Attributes - { - get { return BackingStore?.Get("attributes"); } - set { BackingStore?.Set("attributes", value); } - } -#endif + /// The id property public Guid? Id { get { return BackingStore?.Get("id"); } set { BackingStore?.Set("id", value); } } + /// The links property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models.ResourceLinks? Links { get { return BackingStore?.Get("links"); } set { BackingStore?.Set("links", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models.ResourceLinks Links - { - get { return BackingStore?.Get("links"); } - set { BackingStore?.Set("links", value); } - } -#endif + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -60,6 +45,7 @@ public Guid? Id _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models.GameDataInResponse(); } + /// /// The deserialization information for the current model /// @@ -73,6 +59,7 @@ public override IDictionary> GetFieldDeserializers() { "links", n => { Links = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models.ResourceLinks.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -88,3 +75,4 @@ public override void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/Models/GameIdentifierInRequest.cs b/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/Models/GameIdentifierInRequest.cs index 4f59cba8b..e76b77fc4 100644 --- a/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/Models/GameIdentifierInRequest.cs +++ b/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/Models/GameIdentifierInRequest.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,34 +17,28 @@ public partial class GameIdentifierInRequest : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The id property public Guid? Id { get { return BackingStore?.Get("id"); } set { BackingStore?.Set("id", value); } } + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// The type property public global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models.GameResourceType? Type { get { return BackingStore?.Get("type"); } set { BackingStore?.Set("type", value); } } + /// /// Instantiates a new and sets the default values. /// @@ -50,6 +46,7 @@ public GameIdentifierInRequest() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -60,6 +57,7 @@ public GameIdentifierInRequest() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models.GameIdentifierInRequest(); } + /// /// The deserialization information for the current model /// @@ -73,6 +71,7 @@ public virtual IDictionary> GetFieldDeserializers() { "type", n => { Type = n.GetEnumValue(); } }, }; } + /// /// Serializes information the current object /// @@ -87,3 +86,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/Models/GameIdentifierInResponse.cs b/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/Models/GameIdentifierInResponse.cs index d1d85931d..92fe6efe3 100644 --- a/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/Models/GameIdentifierInResponse.cs +++ b/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/Models/GameIdentifierInResponse.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,34 +17,28 @@ public partial class GameIdentifierInResponse : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The id property public Guid? Id { get { return BackingStore?.Get("id"); } set { BackingStore?.Set("id", value); } } + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// The type property public global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models.GameResourceType? Type { get { return BackingStore?.Get("type"); } set { BackingStore?.Set("type", value); } } + /// /// Instantiates a new and sets the default values. /// @@ -50,6 +46,7 @@ public GameIdentifierInResponse() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -60,6 +57,7 @@ public GameIdentifierInResponse() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models.GameIdentifierInResponse(); } + /// /// The deserialization information for the current model /// @@ -73,6 +71,7 @@ public virtual IDictionary> GetFieldDeserializers() { "type", n => { Type = n.GetEnumValue(); } }, }; } + /// /// Serializes information the current object /// @@ -87,3 +86,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/Models/GamePrimaryResponseDocument.cs b/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/Models/GamePrimaryResponseDocument.cs index 096fbe8ae..e9bb67390 100644 --- a/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/Models/GamePrimaryResponseDocument.cs +++ b/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/Models/GamePrimaryResponseDocument.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,70 +17,35 @@ public partial class GamePrimaryResponseDocument : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The data property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models.GameDataInResponse? Data { get { return BackingStore?.Get("data"); } set { BackingStore?.Set("data", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models.GameDataInResponse Data - { - get { return BackingStore?.Get("data"); } - set { BackingStore?.Set("data", value); } - } -#endif + /// The included property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public List? Included { get { return BackingStore?.Get?>("included"); } set { BackingStore?.Set("included", value); } } -#nullable restore -#else - public List Included - { - get { return BackingStore?.Get>("included"); } - set { BackingStore?.Set("included", value); } - } -#endif + /// The links property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models.ResourceTopLevelLinks? Links { get { return BackingStore?.Get("links"); } set { BackingStore?.Set("links", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models.ResourceTopLevelLinks Links - { - get { return BackingStore?.Get("links"); } - set { BackingStore?.Set("links", value); } - } -#endif + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -86,6 +53,7 @@ public GamePrimaryResponseDocument() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -96,6 +64,7 @@ public GamePrimaryResponseDocument() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models.GamePrimaryResponseDocument(); } + /// /// The deserialization information for the current model /// @@ -110,6 +79,7 @@ public virtual IDictionary> GetFieldDeserializers() { "meta", n => { Meta = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models.Meta.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -125,3 +95,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/Models/GameResourceType.cs b/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/Models/GameResourceType.cs index 2732ec167..2605c68f3 100644 --- a/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/Models/GameResourceType.cs +++ b/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/Models/GameResourceType.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 using System.Runtime.Serialization; using System; namespace OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models @@ -14,3 +16,4 @@ public enum GameResourceType #pragma warning restore CS1591 } } + diff --git a/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/Models/Meta.cs b/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/Models/Meta.cs index 296554628..8ef45fa01 100644 --- a/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/Models/Meta.cs +++ b/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/Models/Meta.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -19,8 +21,10 @@ public IDictionary AdditionalData get { return BackingStore.Get>("AdditionalData") ?? new Dictionary(); } set { BackingStore.Set("AdditionalData", value); } } + /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// /// Instantiates a new and sets the default values. /// @@ -29,6 +33,7 @@ public Meta() BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); AdditionalData = new Dictionary(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -39,6 +44,7 @@ public Meta() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models.Meta(); } + /// /// The deserialization information for the current model /// @@ -49,6 +55,7 @@ public virtual IDictionary> GetFieldDeserializers() { }; } + /// /// Serializes information the current object /// @@ -61,3 +68,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/Models/PlayerAttributesInResponse.cs b/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/Models/PlayerAttributesInResponse.cs index 547b41b80..a7c873849 100644 --- a/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/Models/PlayerAttributesInResponse.cs +++ b/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/Models/PlayerAttributesInResponse.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,22 +17,14 @@ public partial class PlayerAttributesInResponse : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The userName property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? UserName { get { return BackingStore?.Get("userName"); } set { BackingStore?.Set("userName", value); } } -#nullable restore -#else - public string UserName - { - get { return BackingStore?.Get("userName"); } - set { BackingStore?.Set("userName", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -38,6 +32,7 @@ public PlayerAttributesInResponse() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -48,6 +43,7 @@ public PlayerAttributesInResponse() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models.PlayerAttributesInResponse(); } + /// /// The deserialization information for the current model /// @@ -59,6 +55,7 @@ public virtual IDictionary> GetFieldDeserializers() { "userName", n => { UserName = n.GetStringValue(); } }, }; } + /// /// Serializes information the current object /// @@ -71,3 +68,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/Models/PlayerDataInResponse.cs b/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/Models/PlayerDataInResponse.cs index 2d4f04c10..93f912f3f 100644 --- a/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/Models/PlayerDataInResponse.cs +++ b/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/Models/PlayerDataInResponse.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -13,59 +15,33 @@ public partial class PlayerDataInResponse : global::OpenApiKiotaEndToEndTests.Cl #pragma warning restore CS1591 { /// The attributes property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models.PlayerAttributesInResponse? Attributes { get { return BackingStore?.Get("attributes"); } set { BackingStore?.Set("attributes", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models.PlayerAttributesInResponse Attributes - { - get { return BackingStore?.Get("attributes"); } - set { BackingStore?.Set("attributes", value); } - } -#endif + /// The id property public Guid? Id { get { return BackingStore?.Get("id"); } set { BackingStore?.Set("id", value); } } + /// The links property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models.ResourceLinks? Links { get { return BackingStore?.Get("links"); } set { BackingStore?.Set("links", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models.ResourceLinks Links - { - get { return BackingStore?.Get("links"); } - set { BackingStore?.Set("links", value); } - } -#endif + /// The relationships property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models.PlayerRelationshipsInResponse? Relationships { get { return BackingStore?.Get("relationships"); } set { BackingStore?.Set("relationships", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models.PlayerRelationshipsInResponse Relationships - { - get { return BackingStore?.Get("relationships"); } - set { BackingStore?.Set("relationships", value); } - } -#endif + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -76,6 +52,7 @@ public Guid? Id _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models.PlayerDataInResponse(); } + /// /// The deserialization information for the current model /// @@ -90,6 +67,7 @@ public override IDictionary> GetFieldDeserializers() { "relationships", n => { Relationships = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models.PlayerRelationshipsInResponse.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -106,3 +84,4 @@ public override void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/Models/PlayerGroupAttributesInResponse.cs b/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/Models/PlayerGroupAttributesInResponse.cs index 55fbaff00..3b603a816 100644 --- a/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/Models/PlayerGroupAttributesInResponse.cs +++ b/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/Models/PlayerGroupAttributesInResponse.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,22 +17,14 @@ public partial class PlayerGroupAttributesInResponse : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The name property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Name { get { return BackingStore?.Get("name"); } set { BackingStore?.Set("name", value); } } -#nullable restore -#else - public string Name - { - get { return BackingStore?.Get("name"); } - set { BackingStore?.Set("name", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -38,6 +32,7 @@ public PlayerGroupAttributesInResponse() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -48,6 +43,7 @@ public PlayerGroupAttributesInResponse() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models.PlayerGroupAttributesInResponse(); } + /// /// The deserialization information for the current model /// @@ -59,6 +55,7 @@ public virtual IDictionary> GetFieldDeserializers() { "name", n => { Name = n.GetStringValue(); } }, }; } + /// /// Serializes information the current object /// @@ -71,3 +68,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/Models/PlayerGroupDataInResponse.cs b/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/Models/PlayerGroupDataInResponse.cs index 7610ac3f1..5c2b20fea 100644 --- a/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/Models/PlayerGroupDataInResponse.cs +++ b/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/Models/PlayerGroupDataInResponse.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -13,69 +15,33 @@ public partial class PlayerGroupDataInResponse : global::OpenApiKiotaEndToEndTes #pragma warning restore CS1591 { /// The attributes property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models.PlayerGroupAttributesInResponse? Attributes { get { return BackingStore?.Get("attributes"); } set { BackingStore?.Set("attributes", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models.PlayerGroupAttributesInResponse Attributes - { - get { return BackingStore?.Get("attributes"); } - set { BackingStore?.Set("attributes", value); } - } -#endif + /// The id property -#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 links property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models.ResourceLinks? Links { get { return BackingStore?.Get("links"); } set { BackingStore?.Set("links", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models.ResourceLinks Links - { - get { return BackingStore?.Get("links"); } - set { BackingStore?.Set("links", value); } - } -#endif + /// The relationships property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models.PlayerGroupRelationshipsInResponse? Relationships { get { return BackingStore?.Get("relationships"); } set { BackingStore?.Set("relationships", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models.PlayerGroupRelationshipsInResponse Relationships - { - get { return BackingStore?.Get("relationships"); } - set { BackingStore?.Set("relationships", value); } - } -#endif + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -86,6 +52,7 @@ public string Id _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models.PlayerGroupDataInResponse(); } + /// /// The deserialization information for the current model /// @@ -100,6 +67,7 @@ public override IDictionary> GetFieldDeserializers() { "relationships", n => { Relationships = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models.PlayerGroupRelationshipsInResponse.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -116,3 +84,4 @@ public override void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/Models/PlayerGroupIdentifierInRequest.cs b/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/Models/PlayerGroupIdentifierInRequest.cs index 52d46b505..a8ba482b8 100644 --- a/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/Models/PlayerGroupIdentifierInRequest.cs +++ b/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/Models/PlayerGroupIdentifierInRequest.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,44 +17,28 @@ public partial class PlayerGroupIdentifierInRequest : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The id property -#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 meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// The type property public global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models.PlayerGroupResourceType? Type { get { return BackingStore?.Get("type"); } set { BackingStore?.Set("type", value); } } + /// /// Instantiates a new and sets the default values. /// @@ -60,6 +46,7 @@ public PlayerGroupIdentifierInRequest() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -70,6 +57,7 @@ public PlayerGroupIdentifierInRequest() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models.PlayerGroupIdentifierInRequest(); } + /// /// The deserialization information for the current model /// @@ -83,6 +71,7 @@ public virtual IDictionary> GetFieldDeserializers() { "type", n => { Type = n.GetEnumValue(); } }, }; } + /// /// Serializes information the current object /// @@ -97,3 +86,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/Models/PlayerGroupIdentifierInResponse.cs b/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/Models/PlayerGroupIdentifierInResponse.cs index 8decacaf9..6f004f246 100644 --- a/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/Models/PlayerGroupIdentifierInResponse.cs +++ b/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/Models/PlayerGroupIdentifierInResponse.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,44 +17,28 @@ public partial class PlayerGroupIdentifierInResponse : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The id property -#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 meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// The type property public global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models.PlayerGroupResourceType? Type { get { return BackingStore?.Get("type"); } set { BackingStore?.Set("type", value); } } + /// /// Instantiates a new and sets the default values. /// @@ -60,6 +46,7 @@ public PlayerGroupIdentifierInResponse() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -70,6 +57,7 @@ public PlayerGroupIdentifierInResponse() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models.PlayerGroupIdentifierInResponse(); } + /// /// The deserialization information for the current model /// @@ -83,6 +71,7 @@ public virtual IDictionary> GetFieldDeserializers() { "type", n => { Type = n.GetEnumValue(); } }, }; } + /// /// Serializes information the current object /// @@ -97,3 +86,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/Models/PlayerGroupPrimaryResponseDocument.cs b/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/Models/PlayerGroupPrimaryResponseDocument.cs index 68bc0728f..c016e0df9 100644 --- a/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/Models/PlayerGroupPrimaryResponseDocument.cs +++ b/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/Models/PlayerGroupPrimaryResponseDocument.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,70 +17,35 @@ public partial class PlayerGroupPrimaryResponseDocument : IBackedModel, IParsabl { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The data property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models.PlayerGroupDataInResponse? Data { get { return BackingStore?.Get("data"); } set { BackingStore?.Set("data", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models.PlayerGroupDataInResponse Data - { - get { return BackingStore?.Get("data"); } - set { BackingStore?.Set("data", value); } - } -#endif + /// The included property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public List? Included { get { return BackingStore?.Get?>("included"); } set { BackingStore?.Set("included", value); } } -#nullable restore -#else - public List Included - { - get { return BackingStore?.Get>("included"); } - set { BackingStore?.Set("included", value); } - } -#endif + /// The links property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models.ResourceTopLevelLinks? Links { get { return BackingStore?.Get("links"); } set { BackingStore?.Set("links", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models.ResourceTopLevelLinks Links - { - get { return BackingStore?.Get("links"); } - set { BackingStore?.Set("links", value); } - } -#endif + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -86,6 +53,7 @@ public PlayerGroupPrimaryResponseDocument() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -96,6 +64,7 @@ public PlayerGroupPrimaryResponseDocument() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models.PlayerGroupPrimaryResponseDocument(); } + /// /// The deserialization information for the current model /// @@ -110,6 +79,7 @@ public virtual IDictionary> GetFieldDeserializers() { "meta", n => { Meta = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models.Meta.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -125,3 +95,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/Models/PlayerGroupRelationshipsInResponse.cs b/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/Models/PlayerGroupRelationshipsInResponse.cs index e2b40c402..3e8a5cc79 100644 --- a/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/Models/PlayerGroupRelationshipsInResponse.cs +++ b/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/Models/PlayerGroupRelationshipsInResponse.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,22 +17,14 @@ public partial class PlayerGroupRelationshipsInResponse : IBackedModel, IParsabl { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The players property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models.ToManyPlayerInResponse? Players { get { return BackingStore?.Get("players"); } set { BackingStore?.Set("players", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models.ToManyPlayerInResponse Players - { - get { return BackingStore?.Get("players"); } - set { BackingStore?.Set("players", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -38,6 +32,7 @@ public PlayerGroupRelationshipsInResponse() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -48,6 +43,7 @@ public PlayerGroupRelationshipsInResponse() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models.PlayerGroupRelationshipsInResponse(); } + /// /// The deserialization information for the current model /// @@ -59,6 +55,7 @@ public virtual IDictionary> GetFieldDeserializers() { "players", n => { Players = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models.ToManyPlayerInResponse.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -71,3 +68,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/Models/PlayerGroupResourceType.cs b/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/Models/PlayerGroupResourceType.cs index 6b5fcd9cb..0562d5aab 100644 --- a/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/Models/PlayerGroupResourceType.cs +++ b/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/Models/PlayerGroupResourceType.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 using System.Runtime.Serialization; using System; namespace OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models @@ -14,3 +16,4 @@ public enum PlayerGroupResourceType #pragma warning restore CS1591 } } + diff --git a/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/Models/PlayerIdentifierInRequest.cs b/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/Models/PlayerIdentifierInRequest.cs index 97c8cab24..1cd34259d 100644 --- a/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/Models/PlayerIdentifierInRequest.cs +++ b/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/Models/PlayerIdentifierInRequest.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,34 +17,28 @@ public partial class PlayerIdentifierInRequest : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The id property public Guid? Id { get { return BackingStore?.Get("id"); } set { BackingStore?.Set("id", value); } } + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// The type property public global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models.PlayerResourceType? Type { get { return BackingStore?.Get("type"); } set { BackingStore?.Set("type", value); } } + /// /// Instantiates a new and sets the default values. /// @@ -50,6 +46,7 @@ public PlayerIdentifierInRequest() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -60,6 +57,7 @@ public PlayerIdentifierInRequest() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models.PlayerIdentifierInRequest(); } + /// /// The deserialization information for the current model /// @@ -73,6 +71,7 @@ public virtual IDictionary> GetFieldDeserializers() { "type", n => { Type = n.GetEnumValue(); } }, }; } + /// /// Serializes information the current object /// @@ -87,3 +86,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/Models/PlayerIdentifierInResponse.cs b/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/Models/PlayerIdentifierInResponse.cs index 639b44a01..2532c8db2 100644 --- a/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/Models/PlayerIdentifierInResponse.cs +++ b/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/Models/PlayerIdentifierInResponse.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,34 +17,28 @@ public partial class PlayerIdentifierInResponse : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The id property public Guid? Id { get { return BackingStore?.Get("id"); } set { BackingStore?.Set("id", value); } } + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// The type property public global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models.PlayerResourceType? Type { get { return BackingStore?.Get("type"); } set { BackingStore?.Set("type", value); } } + /// /// Instantiates a new and sets the default values. /// @@ -50,6 +46,7 @@ public PlayerIdentifierInResponse() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -60,6 +57,7 @@ public PlayerIdentifierInResponse() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models.PlayerIdentifierInResponse(); } + /// /// The deserialization information for the current model /// @@ -73,6 +71,7 @@ public virtual IDictionary> GetFieldDeserializers() { "type", n => { Type = n.GetEnumValue(); } }, }; } + /// /// Serializes information the current object /// @@ -87,3 +86,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/Models/PlayerPrimaryResponseDocument.cs b/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/Models/PlayerPrimaryResponseDocument.cs index a7066a2dc..2cd06b490 100644 --- a/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/Models/PlayerPrimaryResponseDocument.cs +++ b/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/Models/PlayerPrimaryResponseDocument.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,70 +17,35 @@ public partial class PlayerPrimaryResponseDocument : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The data property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models.PlayerDataInResponse? Data { get { return BackingStore?.Get("data"); } set { BackingStore?.Set("data", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models.PlayerDataInResponse Data - { - get { return BackingStore?.Get("data"); } - set { BackingStore?.Set("data", value); } - } -#endif + /// The included property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public List? Included { get { return BackingStore?.Get?>("included"); } set { BackingStore?.Set("included", value); } } -#nullable restore -#else - public List Included - { - get { return BackingStore?.Get>("included"); } - set { BackingStore?.Set("included", value); } - } -#endif + /// The links property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models.ResourceTopLevelLinks? Links { get { return BackingStore?.Get("links"); } set { BackingStore?.Set("links", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models.ResourceTopLevelLinks Links - { - get { return BackingStore?.Get("links"); } - set { BackingStore?.Set("links", value); } - } -#endif + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -86,6 +53,7 @@ public PlayerPrimaryResponseDocument() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -96,6 +64,7 @@ public PlayerPrimaryResponseDocument() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models.PlayerPrimaryResponseDocument(); } + /// /// The deserialization information for the current model /// @@ -110,6 +79,7 @@ public virtual IDictionary> GetFieldDeserializers() { "meta", n => { Meta = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models.Meta.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -125,3 +95,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/Models/PlayerRelationshipsInResponse.cs b/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/Models/PlayerRelationshipsInResponse.cs index a06a6a3c8..4ac959292 100644 --- a/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/Models/PlayerRelationshipsInResponse.cs +++ b/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/Models/PlayerRelationshipsInResponse.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,38 +17,21 @@ public partial class PlayerRelationshipsInResponse : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The memberOf property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models.ToManyPlayerGroupInResponse? MemberOf { get { return BackingStore?.Get("memberOf"); } set { BackingStore?.Set("memberOf", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models.ToManyPlayerGroupInResponse MemberOf - { - get { return BackingStore?.Get("memberOf"); } - set { BackingStore?.Set("memberOf", value); } - } -#endif + /// The ownedGames property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models.ToManyGameInResponse? OwnedGames { get { return BackingStore?.Get("ownedGames"); } set { BackingStore?.Set("ownedGames", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models.ToManyGameInResponse OwnedGames - { - get { return BackingStore?.Get("ownedGames"); } - set { BackingStore?.Set("ownedGames", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -54,6 +39,7 @@ public PlayerRelationshipsInResponse() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -64,6 +50,7 @@ public PlayerRelationshipsInResponse() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models.PlayerRelationshipsInResponse(); } + /// /// The deserialization information for the current model /// @@ -76,6 +63,7 @@ public virtual IDictionary> GetFieldDeserializers() { "ownedGames", n => { OwnedGames = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models.ToManyGameInResponse.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -89,3 +77,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/Models/PlayerResourceType.cs b/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/Models/PlayerResourceType.cs index 2704680e4..69d04a485 100644 --- a/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/Models/PlayerResourceType.cs +++ b/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/Models/PlayerResourceType.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 using System.Runtime.Serialization; using System; namespace OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models @@ -14,3 +16,4 @@ public enum PlayerResourceType #pragma warning restore CS1591 } } + diff --git a/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/Models/RelationshipLinks.cs b/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/Models/RelationshipLinks.cs index 246ba6058..14521a6f2 100644 --- a/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/Models/RelationshipLinks.cs +++ b/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/Models/RelationshipLinks.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,38 +17,21 @@ public partial class RelationshipLinks : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The related property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Related { get { return BackingStore?.Get("related"); } set { BackingStore?.Set("related", value); } } -#nullable restore -#else - public string Related - { - get { return BackingStore?.Get("related"); } - set { BackingStore?.Set("related", value); } - } -#endif + /// The self property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Self { get { return BackingStore?.Get("self"); } set { BackingStore?.Set("self", value); } } -#nullable restore -#else - public string Self - { - get { return BackingStore?.Get("self"); } - set { BackingStore?.Set("self", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -54,6 +39,7 @@ public RelationshipLinks() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -64,6 +50,7 @@ public RelationshipLinks() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models.RelationshipLinks(); } + /// /// The deserialization information for the current model /// @@ -76,6 +63,7 @@ public virtual IDictionary> GetFieldDeserializers() { "self", n => { Self = n.GetStringValue(); } }, }; } + /// /// Serializes information the current object /// @@ -89,3 +77,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/Models/RelationshipsInCreatePlayerGroupRequest.cs b/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/Models/RelationshipsInCreatePlayerGroupRequest.cs index 7678980b5..00fede27f 100644 --- a/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/Models/RelationshipsInCreatePlayerGroupRequest.cs +++ b/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/Models/RelationshipsInCreatePlayerGroupRequest.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,22 +17,14 @@ public partial class RelationshipsInCreatePlayerGroupRequest : IBackedModel, IPa { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The players property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models.ToManyPlayerInRequest? Players { get { return BackingStore?.Get("players"); } set { BackingStore?.Set("players", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models.ToManyPlayerInRequest Players - { - get { return BackingStore?.Get("players"); } - set { BackingStore?.Set("players", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -38,6 +32,7 @@ public RelationshipsInCreatePlayerGroupRequest() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -48,6 +43,7 @@ public RelationshipsInCreatePlayerGroupRequest() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models.RelationshipsInCreatePlayerGroupRequest(); } + /// /// The deserialization information for the current model /// @@ -59,6 +55,7 @@ public virtual IDictionary> GetFieldDeserializers() { "players", n => { Players = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models.ToManyPlayerInRequest.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -71,3 +68,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/Models/RelationshipsInCreatePlayerRequest.cs b/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/Models/RelationshipsInCreatePlayerRequest.cs index e14ddbbfc..c8ab601e2 100644 --- a/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/Models/RelationshipsInCreatePlayerRequest.cs +++ b/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/Models/RelationshipsInCreatePlayerRequest.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,38 +17,21 @@ public partial class RelationshipsInCreatePlayerRequest : IBackedModel, IParsabl { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The memberOf property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models.ToManyPlayerGroupInRequest? MemberOf { get { return BackingStore?.Get("memberOf"); } set { BackingStore?.Set("memberOf", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models.ToManyPlayerGroupInRequest MemberOf - { - get { return BackingStore?.Get("memberOf"); } - set { BackingStore?.Set("memberOf", value); } - } -#endif + /// The ownedGames property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models.ToManyGameInRequest? OwnedGames { get { return BackingStore?.Get("ownedGames"); } set { BackingStore?.Set("ownedGames", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models.ToManyGameInRequest OwnedGames - { - get { return BackingStore?.Get("ownedGames"); } - set { BackingStore?.Set("ownedGames", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -54,6 +39,7 @@ public RelationshipsInCreatePlayerRequest() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -64,6 +50,7 @@ public RelationshipsInCreatePlayerRequest() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models.RelationshipsInCreatePlayerRequest(); } + /// /// The deserialization information for the current model /// @@ -76,6 +63,7 @@ public virtual IDictionary> GetFieldDeserializers() { "ownedGames", n => { OwnedGames = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models.ToManyGameInRequest.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -89,3 +77,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/Models/ResourceLinks.cs b/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/Models/ResourceLinks.cs index fcf1a2367..0912cb655 100644 --- a/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/Models/ResourceLinks.cs +++ b/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/Models/ResourceLinks.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,22 +17,14 @@ public partial class ResourceLinks : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The self property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Self { get { return BackingStore?.Get("self"); } set { BackingStore?.Set("self", value); } } -#nullable restore -#else - public string Self - { - get { return BackingStore?.Get("self"); } - set { BackingStore?.Set("self", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -38,6 +32,7 @@ public ResourceLinks() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -48,6 +43,7 @@ public ResourceLinks() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models.ResourceLinks(); } + /// /// The deserialization information for the current model /// @@ -59,6 +55,7 @@ public virtual IDictionary> GetFieldDeserializers() { "self", n => { Self = n.GetStringValue(); } }, }; } + /// /// Serializes information the current object /// @@ -71,3 +68,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/Models/ResourceTopLevelLinks.cs b/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/Models/ResourceTopLevelLinks.cs index 6e3ba9c10..f3551c61c 100644 --- a/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/Models/ResourceTopLevelLinks.cs +++ b/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/Models/ResourceTopLevelLinks.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,38 +17,21 @@ public partial class ResourceTopLevelLinks : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The describedby property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Describedby { get { return BackingStore?.Get("describedby"); } set { BackingStore?.Set("describedby", value); } } -#nullable restore -#else - public string Describedby - { - get { return BackingStore?.Get("describedby"); } - set { BackingStore?.Set("describedby", value); } - } -#endif + /// The self property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Self { get { return BackingStore?.Get("self"); } set { BackingStore?.Set("self", value); } } -#nullable restore -#else - public string Self - { - get { return BackingStore?.Get("self"); } - set { BackingStore?.Set("self", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -54,6 +39,7 @@ public ResourceTopLevelLinks() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -64,6 +50,7 @@ public ResourceTopLevelLinks() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models.ResourceTopLevelLinks(); } + /// /// The deserialization information for the current model /// @@ -76,6 +63,7 @@ public virtual IDictionary> GetFieldDeserializers() { "self", n => { Self = n.GetStringValue(); } }, }; } + /// /// Serializes information the current object /// @@ -89,3 +77,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/Models/ResourceType.cs b/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/Models/ResourceType.cs index 1ca0b6850..932e6c2e8 100644 --- a/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/Models/ResourceType.cs +++ b/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/Models/ResourceType.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 using System.Runtime.Serialization; using System; namespace OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models @@ -22,3 +24,4 @@ public enum ResourceType #pragma warning restore CS1591 } } + diff --git a/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/Models/ToManyGameInRequest.cs b/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/Models/ToManyGameInRequest.cs index 5ab6c5c96..3dca8439f 100644 --- a/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/Models/ToManyGameInRequest.cs +++ b/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/Models/ToManyGameInRequest.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,38 +17,21 @@ public partial class ToManyGameInRequest : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The data property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public List? Data { get { return BackingStore?.Get?>("data"); } set { BackingStore?.Set("data", value); } } -#nullable restore -#else - public List Data - { - get { return BackingStore?.Get>("data"); } - set { BackingStore?.Set("data", value); } - } -#endif + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -54,6 +39,7 @@ public ToManyGameInRequest() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -64,6 +50,7 @@ public ToManyGameInRequest() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models.ToManyGameInRequest(); } + /// /// The deserialization information for the current model /// @@ -76,6 +63,7 @@ public virtual IDictionary> GetFieldDeserializers() { "meta", n => { Meta = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models.Meta.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -89,3 +77,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/Models/ToManyGameInResponse.cs b/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/Models/ToManyGameInResponse.cs index 71e8f2555..3e99d3e1c 100644 --- a/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/Models/ToManyGameInResponse.cs +++ b/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/Models/ToManyGameInResponse.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,54 +17,28 @@ public partial class ToManyGameInResponse : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The data property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public List? Data { get { return BackingStore?.Get?>("data"); } set { BackingStore?.Set("data", value); } } -#nullable restore -#else - public List Data - { - get { return BackingStore?.Get>("data"); } - set { BackingStore?.Set("data", value); } - } -#endif + /// The links property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models.RelationshipLinks? Links { get { return BackingStore?.Get("links"); } set { BackingStore?.Set("links", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models.RelationshipLinks Links - { - get { return BackingStore?.Get("links"); } - set { BackingStore?.Set("links", value); } - } -#endif + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -70,6 +46,7 @@ public ToManyGameInResponse() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -80,6 +57,7 @@ public ToManyGameInResponse() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models.ToManyGameInResponse(); } + /// /// The deserialization information for the current model /// @@ -93,6 +71,7 @@ public virtual IDictionary> GetFieldDeserializers() { "meta", n => { Meta = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models.Meta.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -107,3 +86,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/Models/ToManyPlayerGroupInRequest.cs b/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/Models/ToManyPlayerGroupInRequest.cs index 4ad2714ed..40fcba119 100644 --- a/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/Models/ToManyPlayerGroupInRequest.cs +++ b/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/Models/ToManyPlayerGroupInRequest.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,38 +17,21 @@ public partial class ToManyPlayerGroupInRequest : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The data property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public List? Data { get { return BackingStore?.Get?>("data"); } set { BackingStore?.Set("data", value); } } -#nullable restore -#else - public List Data - { - get { return BackingStore?.Get>("data"); } - set { BackingStore?.Set("data", value); } - } -#endif + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -54,6 +39,7 @@ public ToManyPlayerGroupInRequest() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -64,6 +50,7 @@ public ToManyPlayerGroupInRequest() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models.ToManyPlayerGroupInRequest(); } + /// /// The deserialization information for the current model /// @@ -76,6 +63,7 @@ public virtual IDictionary> GetFieldDeserializers() { "meta", n => { Meta = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models.Meta.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -89,3 +77,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/Models/ToManyPlayerGroupInResponse.cs b/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/Models/ToManyPlayerGroupInResponse.cs index 22d42e175..a629a025e 100644 --- a/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/Models/ToManyPlayerGroupInResponse.cs +++ b/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/Models/ToManyPlayerGroupInResponse.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,54 +17,28 @@ public partial class ToManyPlayerGroupInResponse : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The data property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public List? Data { get { return BackingStore?.Get?>("data"); } set { BackingStore?.Set("data", value); } } -#nullable restore -#else - public List Data - { - get { return BackingStore?.Get>("data"); } - set { BackingStore?.Set("data", value); } - } -#endif + /// The links property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models.RelationshipLinks? Links { get { return BackingStore?.Get("links"); } set { BackingStore?.Set("links", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models.RelationshipLinks Links - { - get { return BackingStore?.Get("links"); } - set { BackingStore?.Set("links", value); } - } -#endif + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -70,6 +46,7 @@ public ToManyPlayerGroupInResponse() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -80,6 +57,7 @@ public ToManyPlayerGroupInResponse() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models.ToManyPlayerGroupInResponse(); } + /// /// The deserialization information for the current model /// @@ -93,6 +71,7 @@ public virtual IDictionary> GetFieldDeserializers() { "meta", n => { Meta = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models.Meta.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -107,3 +86,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/Models/ToManyPlayerInRequest.cs b/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/Models/ToManyPlayerInRequest.cs index 642eb284c..571f69935 100644 --- a/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/Models/ToManyPlayerInRequest.cs +++ b/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/Models/ToManyPlayerInRequest.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,38 +17,21 @@ public partial class ToManyPlayerInRequest : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The data property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public List? Data { get { return BackingStore?.Get?>("data"); } set { BackingStore?.Set("data", value); } } -#nullable restore -#else - public List Data - { - get { return BackingStore?.Get>("data"); } - set { BackingStore?.Set("data", value); } - } -#endif + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -54,6 +39,7 @@ public ToManyPlayerInRequest() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -64,6 +50,7 @@ public ToManyPlayerInRequest() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models.ToManyPlayerInRequest(); } + /// /// The deserialization information for the current model /// @@ -76,6 +63,7 @@ public virtual IDictionary> GetFieldDeserializers() { "meta", n => { Meta = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models.Meta.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -89,3 +77,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/Models/ToManyPlayerInResponse.cs b/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/Models/ToManyPlayerInResponse.cs index e87595296..2d618fd2c 100644 --- a/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/Models/ToManyPlayerInResponse.cs +++ b/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/Models/ToManyPlayerInResponse.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,54 +17,28 @@ public partial class ToManyPlayerInResponse : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The data property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public List? Data { get { return BackingStore?.Get?>("data"); } set { BackingStore?.Set("data", value); } } -#nullable restore -#else - public List Data - { - get { return BackingStore?.Get>("data"); } - set { BackingStore?.Set("data", value); } - } -#endif + /// The links property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models.RelationshipLinks? Links { get { return BackingStore?.Get("links"); } set { BackingStore?.Set("links", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models.RelationshipLinks Links - { - get { return BackingStore?.Get("links"); } - set { BackingStore?.Set("links", value); } - } -#endif + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -70,6 +46,7 @@ public ToManyPlayerInResponse() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -80,6 +57,7 @@ public ToManyPlayerInResponse() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models.ToManyPlayerInResponse(); } + /// /// The deserialization information for the current model /// @@ -93,6 +71,7 @@ public virtual IDictionary> GetFieldDeserializers() { "meta", n => { Meta = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models.Meta.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -107,3 +86,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/PlayerGroups/PlayerGroupsRequestBuilder.cs b/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/PlayerGroups/PlayerGroupsRequestBuilder.cs index a44ba5abb..ca6bb9393 100644 --- a/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/PlayerGroups/PlayerGroupsRequestBuilder.cs +++ b/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/PlayerGroups/PlayerGroupsRequestBuilder.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -25,6 +27,7 @@ public partial class PlayerGroupsRequestBuilder : BaseRequestBuilder public PlayerGroupsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/playerGroups{?query*}", pathParameters) { } + /// /// Instantiates a new and sets the default values. /// @@ -33,6 +36,7 @@ public PlayerGroupsRequestBuilder(Dictionary pathParameters, IRe public PlayerGroupsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/playerGroups{?query*}", rawUrl) { } + /// /// Creates a new playerGroup. /// @@ -45,15 +49,8 @@ public PlayerGroupsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) /// When receiving a 404 status code /// When receiving a 409 status code /// When receiving a 422 status code -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public async Task PostAsync(global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models.CreatePlayerGroupRequestDocument body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { -#nullable restore -#else - public async Task PostAsync(global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models.CreatePlayerGroupRequestDocument body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) - { -#endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> @@ -66,21 +63,15 @@ public PlayerGroupsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) }; return await RequestAdapter.SendAsync(requestInfo, global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models.PlayerGroupPrimaryResponseDocument.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } + /// /// Creates a new playerGroup. /// /// A /// 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(global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models.CreatePlayerGroupRequestDocument body, Action>? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToPostRequestInformation(global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models.CreatePlayerGroupRequestDocument body, Action> requestConfiguration = default) - { -#endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); @@ -88,6 +79,7 @@ public RequestInformation ToPostRequestInformation(global::OpenApiKiotaEndToEndT requestInfo.SetContentFromParsable(RequestAdapter, "application/vnd.api+json", body); return requestInfo; } + /// /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. /// @@ -97,6 +89,7 @@ public RequestInformation ToPostRequestInformation(global::OpenApiKiotaEndToEndT { return new global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.PlayerGroups.PlayerGroupsRequestBuilder(rawUrl, RequestAdapter); } + /// /// Creates a new playerGroup. /// @@ -104,16 +97,10 @@ public RequestInformation ToPostRequestInformation(global::OpenApiKiotaEndToEndT public partial class PlayerGroupsRequestBuilderPostQueryParameters { /// For syntax, see the documentation for the [`include`](https://www.jsonapi.net/usage/reading/including-relationships.html)/[`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/Players/PlayersRequestBuilder.cs b/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/Players/PlayersRequestBuilder.cs index 558a309d9..9707a8706 100644 --- a/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/Players/PlayersRequestBuilder.cs +++ b/test/OpenApiKiotaEndToEndTests/ClientIdGenerationModes/GeneratedCode/Players/PlayersRequestBuilder.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -25,6 +27,7 @@ public partial class PlayersRequestBuilder : BaseRequestBuilder public PlayersRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/players{?query*}", pathParameters) { } + /// /// Instantiates a new and sets the default values. /// @@ -33,6 +36,7 @@ public PlayersRequestBuilder(Dictionary pathParameters, IRequest public PlayersRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/players{?query*}", rawUrl) { } + /// /// Creates a new player. /// @@ -44,15 +48,8 @@ public PlayersRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba /// When receiving a 404 status code /// When receiving a 409 status code /// When receiving a 422 status code -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public async Task PostAsync(global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models.CreatePlayerRequestDocument body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { -#nullable restore -#else - public async Task PostAsync(global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models.CreatePlayerRequestDocument body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) - { -#endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> @@ -64,21 +61,15 @@ public PlayersRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba }; return await RequestAdapter.SendAsync(requestInfo, global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models.PlayerPrimaryResponseDocument.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } + /// /// Creates a new player. /// /// A /// 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(global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models.CreatePlayerRequestDocument body, Action>? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToPostRequestInformation(global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Models.CreatePlayerRequestDocument body, Action> requestConfiguration = default) - { -#endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); @@ -86,6 +77,7 @@ public RequestInformation ToPostRequestInformation(global::OpenApiKiotaEndToEndT requestInfo.SetContentFromParsable(RequestAdapter, "application/vnd.api+json", body); return requestInfo; } + /// /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. /// @@ -95,6 +87,7 @@ public RequestInformation ToPostRequestInformation(global::OpenApiKiotaEndToEndT { return new global::OpenApiKiotaEndToEndTests.ClientIdGenerationModes.GeneratedCode.Players.PlayersRequestBuilder(rawUrl, RequestAdapter); } + /// /// Creates a new player. /// @@ -102,16 +95,10 @@ public RequestInformation ToPostRequestInformation(global::OpenApiKiotaEndToEndT public partial class PlayersRequestBuilderPostQueryParameters { /// For syntax, see the documentation for the [`include`](https://www.jsonapi.net/usage/reading/including-relationships.html)/[`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/Headers/GeneratedCode/Countries/CountriesRequestBuilder.cs b/test/OpenApiKiotaEndToEndTests/Headers/GeneratedCode/Countries/CountriesRequestBuilder.cs index 398eb5506..91ef47c00 100644 --- a/test/OpenApiKiotaEndToEndTests/Headers/GeneratedCode/Countries/CountriesRequestBuilder.cs +++ b/test/OpenApiKiotaEndToEndTests/Headers/GeneratedCode/Countries/CountriesRequestBuilder.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -30,6 +32,7 @@ public partial class CountriesRequestBuilder : BaseRequestBuilder return new global::OpenApiKiotaEndToEndTests.Headers.GeneratedCode.Countries.Item.CountriesItemRequestBuilder(urlTplParams, RequestAdapter); } } + /// /// Instantiates a new and sets the default values. /// @@ -38,6 +41,7 @@ public partial class CountriesRequestBuilder : BaseRequestBuilder public CountriesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/countries{?query*}", pathParameters) { } + /// /// Instantiates a new and sets the default values. /// @@ -46,6 +50,7 @@ public CountriesRequestBuilder(Dictionary pathParameters, IReque public CountriesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/countries{?query*}", rawUrl) { } + /// /// Retrieves a collection of countries. /// @@ -53,15 +58,8 @@ public CountriesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : /// Cancellation token to use when cancelling requests /// Configuration for the request such as headers, query parameters, and middleware options. /// When receiving a 400 status code -#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> { @@ -69,23 +67,18 @@ public CountriesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : }; return await RequestAdapter.SendAsync(requestInfo, global::OpenApiKiotaEndToEndTests.Headers.GeneratedCode.Models.CountryCollectionResponseDocument.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// /// 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 HeadAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { -#nullable restore -#else - public async Task HeadAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) - { -#endif var requestInfo = ToHeadRequestInformation(requestConfiguration); await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); } + /// /// Creates a new country. /// @@ -98,15 +91,8 @@ public async Task HeadAsync(ActionWhen receiving a 404 status code /// When receiving a 409 status code /// When receiving a 422 status code -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public async Task PostAsync(global::OpenApiKiotaEndToEndTests.Headers.GeneratedCode.Models.CreateCountryRequestDocument body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { -#nullable restore -#else - public async Task PostAsync(global::OpenApiKiotaEndToEndTests.Headers.GeneratedCode.Models.CreateCountryRequestDocument body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) - { -#endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> @@ -119,58 +105,40 @@ public async Task HeadAsync(Action(requestInfo, global::OpenApiKiotaEndToEndTests.Headers.GeneratedCode.Models.CountryPrimaryResponseDocument.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } + /// /// Retrieves a collection of countries. /// /// A /// 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(Method.GET, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/vnd.api+json"); return requestInfo; } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// /// A /// 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 ToHeadRequestInformation(Action>? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToHeadRequestInformation(Action> requestConfiguration = default) - { -#endif var requestInfo = new RequestInformation(Method.HEAD, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); return requestInfo; } + /// /// Creates a new country. /// /// A /// 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(global::OpenApiKiotaEndToEndTests.Headers.GeneratedCode.Models.CreateCountryRequestDocument body, Action>? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToPostRequestInformation(global::OpenApiKiotaEndToEndTests.Headers.GeneratedCode.Models.CreateCountryRequestDocument body, Action> requestConfiguration = default) - { -#endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); @@ -178,6 +146,7 @@ public RequestInformation ToPostRequestInformation(global::OpenApiKiotaEndToEndT requestInfo.SetContentFromParsable(RequestAdapter, "application/vnd.api+json", body); return requestInfo; } + /// /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. /// @@ -187,6 +156,7 @@ public RequestInformation ToPostRequestInformation(global::OpenApiKiotaEndToEndT { return new global::OpenApiKiotaEndToEndTests.Headers.GeneratedCode.Countries.CountriesRequestBuilder(rawUrl, RequestAdapter); } + /// /// Retrieves a collection of countries. /// @@ -194,16 +164,10 @@ public RequestInformation ToPostRequestInformation(global::OpenApiKiotaEndToEndT public partial class CountriesRequestBuilderGetQueryParameters { /// For syntax, see the documentation for the [`include`](https://www.jsonapi.net/usage/reading/including-relationships.html)/[`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// @@ -211,16 +175,10 @@ public partial class CountriesRequestBuilderGetQueryParameters public partial class CountriesRequestBuilderHeadQueryParameters { /// For syntax, see the documentation for the [`include`](https://www.jsonapi.net/usage/reading/including-relationships.html)/[`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } + /// /// Creates a new country. /// @@ -228,16 +186,10 @@ public partial class CountriesRequestBuilderHeadQueryParameters public partial class CountriesRequestBuilderPostQueryParameters { /// For syntax, see the documentation for the [`include`](https://www.jsonapi.net/usage/reading/including-relationships.html)/[`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/Headers/GeneratedCode/Countries/Item/CountriesItemRequestBuilder.cs b/test/OpenApiKiotaEndToEndTests/Headers/GeneratedCode/Countries/Item/CountriesItemRequestBuilder.cs index e8011ae9d..b74a2a58f 100644 --- a/test/OpenApiKiotaEndToEndTests/Headers/GeneratedCode/Countries/Item/CountriesItemRequestBuilder.cs +++ b/test/OpenApiKiotaEndToEndTests/Headers/GeneratedCode/Countries/Item/CountriesItemRequestBuilder.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -24,11 +26,13 @@ public partial class CountriesItemRequestBuilder : BaseRequestBuilder { get => new global::OpenApiKiotaEndToEndTests.Headers.GeneratedCode.Countries.Item.Languages.LanguagesRequestBuilder(PathParameters, RequestAdapter); } + /// The relationships property public global::OpenApiKiotaEndToEndTests.Headers.GeneratedCode.Countries.Item.Relationships.RelationshipsRequestBuilder Relationships { get => new global::OpenApiKiotaEndToEndTests.Headers.GeneratedCode.Countries.Item.Relationships.RelationshipsRequestBuilder(PathParameters, RequestAdapter); } + /// /// Instantiates a new and sets the default values. /// @@ -37,6 +41,7 @@ public partial class CountriesItemRequestBuilder : BaseRequestBuilder public CountriesItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/countries/{id}{?query*}", pathParameters) { } + /// /// Instantiates a new and sets the default values. /// @@ -45,21 +50,15 @@ public CountriesItemRequestBuilder(Dictionary pathParameters, IR public CountriesItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/countries/{id}{?query*}", rawUrl) { } + /// /// Deletes an existing country by its identifier. /// /// Cancellation token to use when cancelling requests /// Configuration for the request such as headers, query parameters, and middleware options. /// When receiving a 404 status code -#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> { @@ -67,6 +66,7 @@ public async Task DeleteAsync(Action /// Retrieves an individual country by its identifier. /// @@ -75,15 +75,8 @@ public async Task DeleteAsync(ActionConfiguration for the request such as headers, query parameters, and middleware options. /// When receiving a 400 status code /// When receiving a 404 status code -#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> { @@ -92,23 +85,18 @@ public async Task DeleteAsync(Action(requestInfo, global::OpenApiKiotaEndToEndTests.Headers.GeneratedCode.Models.CountryPrimaryResponseDocument.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// /// 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 HeadAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { -#nullable restore -#else - public async Task HeadAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) - { -#endif var requestInfo = ToHeadRequestInformation(requestConfiguration); await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); } + /// /// Updates an existing country. /// @@ -120,15 +108,8 @@ public async Task HeadAsync(ActionWhen receiving a 404 status code /// When receiving a 409 status code /// When receiving a 422 status code -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public async Task PatchAsync(global::OpenApiKiotaEndToEndTests.Headers.GeneratedCode.Models.UpdateCountryRequestDocument body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { -#nullable restore -#else - public async Task PatchAsync(global::OpenApiKiotaEndToEndTests.Headers.GeneratedCode.Models.UpdateCountryRequestDocument body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) - { -#endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> @@ -140,77 +121,53 @@ public async Task HeadAsync(Action(requestInfo, global::OpenApiKiotaEndToEndTests.Headers.GeneratedCode.Models.CountryPrimaryResponseDocument.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } + /// /// Deletes an existing country by its identifier. /// /// A /// 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(Method.DELETE, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/vnd.api+json"); return requestInfo; } + /// /// Retrieves an individual country by its identifier. /// /// A /// 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(Method.GET, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/vnd.api+json"); return requestInfo; } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// /// A /// 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 ToHeadRequestInformation(Action>? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToHeadRequestInformation(Action> requestConfiguration = default) - { -#endif var requestInfo = new RequestInformation(Method.HEAD, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); return requestInfo; } + /// /// Updates an existing country. /// /// A /// 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(global::OpenApiKiotaEndToEndTests.Headers.GeneratedCode.Models.UpdateCountryRequestDocument body, Action>? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToPatchRequestInformation(global::OpenApiKiotaEndToEndTests.Headers.GeneratedCode.Models.UpdateCountryRequestDocument body, Action> requestConfiguration = default) - { -#endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); @@ -218,6 +175,7 @@ public RequestInformation ToPatchRequestInformation(global::OpenApiKiotaEndToEnd requestInfo.SetContentFromParsable(RequestAdapter, "application/vnd.api+json", body); return requestInfo; } + /// /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. /// @@ -227,6 +185,7 @@ public RequestInformation ToPatchRequestInformation(global::OpenApiKiotaEndToEnd { return new global::OpenApiKiotaEndToEndTests.Headers.GeneratedCode.Countries.Item.CountriesItemRequestBuilder(rawUrl, RequestAdapter); } + /// /// Retrieves an individual country by its identifier. /// @@ -234,16 +193,10 @@ public RequestInformation ToPatchRequestInformation(global::OpenApiKiotaEndToEnd public partial class CountriesItemRequestBuilderGetQueryParameters { /// For syntax, see the documentation for the [`include`](https://www.jsonapi.net/usage/reading/including-relationships.html)/[`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// @@ -251,16 +204,10 @@ public partial class CountriesItemRequestBuilderGetQueryParameters public partial class CountriesItemRequestBuilderHeadQueryParameters { /// For syntax, see the documentation for the [`include`](https://www.jsonapi.net/usage/reading/including-relationships.html)/[`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } + /// /// Updates an existing country. /// @@ -268,16 +215,10 @@ public partial class CountriesItemRequestBuilderHeadQueryParameters public partial class CountriesItemRequestBuilderPatchQueryParameters { /// For syntax, see the documentation for the [`include`](https://www.jsonapi.net/usage/reading/including-relationships.html)/[`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/Headers/GeneratedCode/Countries/Item/Languages/LanguagesRequestBuilder.cs b/test/OpenApiKiotaEndToEndTests/Headers/GeneratedCode/Countries/Item/Languages/LanguagesRequestBuilder.cs index d5a70e40b..acaf09647 100644 --- a/test/OpenApiKiotaEndToEndTests/Headers/GeneratedCode/Countries/Item/Languages/LanguagesRequestBuilder.cs +++ b/test/OpenApiKiotaEndToEndTests/Headers/GeneratedCode/Countries/Item/Languages/LanguagesRequestBuilder.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -25,6 +27,7 @@ public partial class LanguagesRequestBuilder : BaseRequestBuilder public LanguagesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/countries/{id}/languages{?query*}", pathParameters) { } + /// /// Instantiates a new and sets the default values. /// @@ -33,6 +36,7 @@ public LanguagesRequestBuilder(Dictionary pathParameters, IReque public LanguagesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/countries/{id}/languages{?query*}", rawUrl) { } + /// /// Retrieves the related languages of an individual country's languages relationship. /// @@ -41,15 +45,8 @@ public LanguagesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : /// Configuration for the request such as headers, query parameters, and middleware options. /// When receiving a 400 status code /// When receiving a 404 status code -#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> { @@ -58,60 +55,43 @@ public LanguagesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : }; return await RequestAdapter.SendAsync(requestInfo, global::OpenApiKiotaEndToEndTests.Headers.GeneratedCode.Models.LanguageCollectionResponseDocument.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// /// 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 HeadAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { -#nullable restore -#else - public async Task HeadAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) - { -#endif var requestInfo = ToHeadRequestInformation(requestConfiguration); await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); } + /// /// Retrieves the related languages of an individual country's languages relationship. /// /// A /// 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(Method.GET, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/vnd.api+json"); return requestInfo; } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// /// A /// 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 ToHeadRequestInformation(Action>? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToHeadRequestInformation(Action> requestConfiguration = default) - { -#endif var requestInfo = new RequestInformation(Method.HEAD, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); return requestInfo; } + /// /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. /// @@ -121,6 +101,7 @@ public RequestInformation ToHeadRequestInformation(Action /// Retrieves the related languages of an individual country's languages relationship. /// @@ -128,16 +109,10 @@ public RequestInformation ToHeadRequestInformation(ActionFor syntax, see the documentation for the [`include`](https://www.jsonapi.net/usage/reading/including-relationships.html)/[`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// @@ -145,16 +120,10 @@ public partial class LanguagesRequestBuilderGetQueryParameters public partial class LanguagesRequestBuilderHeadQueryParameters { /// For syntax, see the documentation for the [`include`](https://www.jsonapi.net/usage/reading/including-relationships.html)/[`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/Headers/GeneratedCode/Countries/Item/Relationships/Languages/LanguagesRequestBuilder.cs b/test/OpenApiKiotaEndToEndTests/Headers/GeneratedCode/Countries/Item/Relationships/Languages/LanguagesRequestBuilder.cs index c5931ef04..284744e2b 100644 --- a/test/OpenApiKiotaEndToEndTests/Headers/GeneratedCode/Countries/Item/Relationships/Languages/LanguagesRequestBuilder.cs +++ b/test/OpenApiKiotaEndToEndTests/Headers/GeneratedCode/Countries/Item/Relationships/Languages/LanguagesRequestBuilder.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -25,6 +27,7 @@ public partial class LanguagesRequestBuilder : BaseRequestBuilder public LanguagesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/countries/{id}/relationships/languages{?query*}", pathParameters) { } + /// /// Instantiates a new and sets the default values. /// @@ -33,6 +36,7 @@ public LanguagesRequestBuilder(Dictionary pathParameters, IReque public LanguagesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/countries/{id}/relationships/languages{?query*}", rawUrl) { } + /// /// Removes existing languages from the languages relationship of an individual country. /// @@ -42,15 +46,8 @@ public LanguagesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : /// When receiving a 400 status code /// When receiving a 404 status code /// When receiving a 409 status code -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public async Task DeleteAsync(global::OpenApiKiotaEndToEndTests.Headers.GeneratedCode.Models.ToManyLanguageInRequest body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { -#nullable restore -#else - public async Task DeleteAsync(global::OpenApiKiotaEndToEndTests.Headers.GeneratedCode.Models.ToManyLanguageInRequest body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) - { -#endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = ToDeleteRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> @@ -61,6 +58,7 @@ public async Task DeleteAsync(global::OpenApiKiotaEndToEndTests.Headers.Generate }; await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); } + /// /// Retrieves the related language identities of an individual country's languages relationship. /// @@ -69,15 +67,8 @@ public async Task DeleteAsync(global::OpenApiKiotaEndToEndTests.Headers.Generate /// Configuration for the request such as headers, query parameters, and middleware options. /// When receiving a 400 status code /// When receiving a 404 status code -#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> { @@ -86,23 +77,18 @@ public async Task DeleteAsync(global::OpenApiKiotaEndToEndTests.Headers.Generate }; return await RequestAdapter.SendAsync(requestInfo, global::OpenApiKiotaEndToEndTests.Headers.GeneratedCode.Models.LanguageIdentifierCollectionResponseDocument.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// /// 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 HeadAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { -#nullable restore -#else - public async Task HeadAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) - { -#endif var requestInfo = ToHeadRequestInformation(requestConfiguration); await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); } + /// /// Assigns existing languages to the languages relationship of an individual country. /// @@ -112,15 +98,8 @@ public async Task HeadAsync(ActionWhen receiving a 400 status code /// When receiving a 404 status code /// When receiving a 409 status code -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public async Task PatchAsync(global::OpenApiKiotaEndToEndTests.Headers.GeneratedCode.Models.ToManyLanguageInRequest body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { -#nullable restore -#else - public async Task PatchAsync(global::OpenApiKiotaEndToEndTests.Headers.GeneratedCode.Models.ToManyLanguageInRequest body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) - { -#endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> @@ -131,6 +110,7 @@ public async Task PatchAsync(global::OpenApiKiotaEndToEndTests.Headers.Generated }; await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); } + /// /// Adds existing languages to the languages relationship of an individual country. /// @@ -140,15 +120,8 @@ public async Task PatchAsync(global::OpenApiKiotaEndToEndTests.Headers.Generated /// When receiving a 400 status code /// When receiving a 404 status code /// When receiving a 409 status code -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public async Task PostAsync(global::OpenApiKiotaEndToEndTests.Headers.GeneratedCode.Models.ToManyLanguageInRequest body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { -#nullable restore -#else - public async Task PostAsync(global::OpenApiKiotaEndToEndTests.Headers.GeneratedCode.Models.ToManyLanguageInRequest body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) - { -#endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> @@ -159,21 +132,15 @@ public async Task PostAsync(global::OpenApiKiotaEndToEndTests.Headers.GeneratedC }; await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); } + /// /// Removes existing languages from the languages relationship of an individual country. /// /// A /// 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 ToDeleteRequestInformation(global::OpenApiKiotaEndToEndTests.Headers.GeneratedCode.Models.ToManyLanguageInRequest body, Action>? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToDeleteRequestInformation(global::OpenApiKiotaEndToEndTests.Headers.GeneratedCode.Models.ToManyLanguageInRequest body, Action> requestConfiguration = default) - { -#endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); @@ -181,58 +148,40 @@ public RequestInformation ToDeleteRequestInformation(global::OpenApiKiotaEndToEn requestInfo.SetContentFromParsable(RequestAdapter, "application/vnd.api+json", body); return requestInfo; } + /// /// Retrieves the related language identities of an individual country's languages relationship. /// /// A /// 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(Method.GET, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/vnd.api+json"); return requestInfo; } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// /// A /// 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 ToHeadRequestInformation(Action>? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToHeadRequestInformation(Action> requestConfiguration = default) - { -#endif var requestInfo = new RequestInformation(Method.HEAD, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); return requestInfo; } + /// /// Assigns existing languages to the languages relationship of an individual country. /// /// A /// 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(global::OpenApiKiotaEndToEndTests.Headers.GeneratedCode.Models.ToManyLanguageInRequest body, Action>? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToPatchRequestInformation(global::OpenApiKiotaEndToEndTests.Headers.GeneratedCode.Models.ToManyLanguageInRequest body, Action> requestConfiguration = default) - { -#endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); @@ -240,21 +189,15 @@ public RequestInformation ToPatchRequestInformation(global::OpenApiKiotaEndToEnd requestInfo.SetContentFromParsable(RequestAdapter, "application/vnd.api+json", body); return requestInfo; } + /// /// Adds existing languages to the languages relationship of an individual country. /// /// A /// 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(global::OpenApiKiotaEndToEndTests.Headers.GeneratedCode.Models.ToManyLanguageInRequest body, Action>? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToPostRequestInformation(global::OpenApiKiotaEndToEndTests.Headers.GeneratedCode.Models.ToManyLanguageInRequest body, Action> requestConfiguration = default) - { -#endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); @@ -262,6 +205,7 @@ public RequestInformation ToPostRequestInformation(global::OpenApiKiotaEndToEndT requestInfo.SetContentFromParsable(RequestAdapter, "application/vnd.api+json", body); return requestInfo; } + /// /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. /// @@ -271,6 +215,7 @@ public RequestInformation ToPostRequestInformation(global::OpenApiKiotaEndToEndT { return new global::OpenApiKiotaEndToEndTests.Headers.GeneratedCode.Countries.Item.Relationships.Languages.LanguagesRequestBuilder(rawUrl, RequestAdapter); } + /// /// Retrieves the related language identities of an individual country's languages relationship. /// @@ -278,16 +223,10 @@ public RequestInformation ToPostRequestInformation(global::OpenApiKiotaEndToEndT public partial class LanguagesRequestBuilderGetQueryParameters { /// For syntax, see the documentation for the [`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// @@ -295,16 +234,10 @@ public partial class LanguagesRequestBuilderGetQueryParameters public partial class LanguagesRequestBuilderHeadQueryParameters { /// For syntax, see the documentation for the [`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/Headers/GeneratedCode/Countries/Item/Relationships/RelationshipsRequestBuilder.cs b/test/OpenApiKiotaEndToEndTests/Headers/GeneratedCode/Countries/Item/Relationships/RelationshipsRequestBuilder.cs index 6394f1435..5466ac339 100644 --- a/test/OpenApiKiotaEndToEndTests/Headers/GeneratedCode/Countries/Item/Relationships/RelationshipsRequestBuilder.cs +++ b/test/OpenApiKiotaEndToEndTests/Headers/GeneratedCode/Countries/Item/Relationships/RelationshipsRequestBuilder.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions; @@ -20,6 +22,7 @@ public partial class RelationshipsRequestBuilder : BaseRequestBuilder { get => new global::OpenApiKiotaEndToEndTests.Headers.GeneratedCode.Countries.Item.Relationships.Languages.LanguagesRequestBuilder(PathParameters, RequestAdapter); } + /// /// Instantiates a new and sets the default values. /// @@ -28,6 +31,7 @@ public partial class RelationshipsRequestBuilder : BaseRequestBuilder public RelationshipsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/countries/{id}/relationships", pathParameters) { } + /// /// Instantiates a new and sets the default values. /// @@ -39,3 +43,4 @@ public RelationshipsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/Headers/GeneratedCode/HeadersClient.cs b/test/OpenApiKiotaEndToEndTests/Headers/GeneratedCode/HeadersClient.cs index 4bcb4321a..d0683d51f 100644 --- a/test/OpenApiKiotaEndToEndTests/Headers/GeneratedCode/HeadersClient.cs +++ b/test/OpenApiKiotaEndToEndTests/Headers/GeneratedCode/HeadersClient.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Store; @@ -25,6 +27,7 @@ public partial class HeadersClient : BaseRequestBuilder { get => new global::OpenApiKiotaEndToEndTests.Headers.GeneratedCode.Countries.CountriesRequestBuilder(PathParameters, RequestAdapter); } + /// /// Instantiates a new and sets the default values. /// @@ -49,3 +52,4 @@ public partial class HeadersClient : BaseRequestBuilder } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/Headers/GeneratedCode/Models/AttributesInCreateCountryRequest.cs b/test/OpenApiKiotaEndToEndTests/Headers/GeneratedCode/Models/AttributesInCreateCountryRequest.cs index a31d5c626..d4e985c70 100644 --- a/test/OpenApiKiotaEndToEndTests/Headers/GeneratedCode/Models/AttributesInCreateCountryRequest.cs +++ b/test/OpenApiKiotaEndToEndTests/Headers/GeneratedCode/Models/AttributesInCreateCountryRequest.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,28 +17,21 @@ public partial class AttributesInCreateCountryRequest : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The name property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Name { get { return BackingStore?.Get("name"); } set { BackingStore?.Set("name", value); } } -#nullable restore -#else - public string Name - { - get { return BackingStore?.Get("name"); } - set { BackingStore?.Set("name", value); } - } -#endif + /// The population property public long? Population { get { return BackingStore?.Get("population"); } set { BackingStore?.Set("population", value); } } + /// /// Instantiates a new and sets the default values. /// @@ -44,6 +39,7 @@ public AttributesInCreateCountryRequest() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -54,6 +50,7 @@ public AttributesInCreateCountryRequest() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.Headers.GeneratedCode.Models.AttributesInCreateCountryRequest(); } + /// /// The deserialization information for the current model /// @@ -66,6 +63,7 @@ public virtual IDictionary> GetFieldDeserializers() { "population", n => { Population = n.GetLongValue(); } }, }; } + /// /// Serializes information the current object /// @@ -79,3 +77,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/Headers/GeneratedCode/Models/AttributesInUpdateCountryRequest.cs b/test/OpenApiKiotaEndToEndTests/Headers/GeneratedCode/Models/AttributesInUpdateCountryRequest.cs index c08ad793e..16324e47e 100644 --- a/test/OpenApiKiotaEndToEndTests/Headers/GeneratedCode/Models/AttributesInUpdateCountryRequest.cs +++ b/test/OpenApiKiotaEndToEndTests/Headers/GeneratedCode/Models/AttributesInUpdateCountryRequest.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,28 +17,21 @@ public partial class AttributesInUpdateCountryRequest : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The name property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Name { get { return BackingStore?.Get("name"); } set { BackingStore?.Set("name", value); } } -#nullable restore -#else - public string Name - { - get { return BackingStore?.Get("name"); } - set { BackingStore?.Set("name", value); } - } -#endif + /// The population property public long? Population { get { return BackingStore?.Get("population"); } set { BackingStore?.Set("population", value); } } + /// /// Instantiates a new and sets the default values. /// @@ -44,6 +39,7 @@ public AttributesInUpdateCountryRequest() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -54,6 +50,7 @@ public AttributesInUpdateCountryRequest() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.Headers.GeneratedCode.Models.AttributesInUpdateCountryRequest(); } + /// /// The deserialization information for the current model /// @@ -66,6 +63,7 @@ public virtual IDictionary> GetFieldDeserializers() { "population", n => { Population = n.GetLongValue(); } }, }; } + /// /// Serializes information the current object /// @@ -79,3 +77,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/Headers/GeneratedCode/Models/CountryAttributesInResponse.cs b/test/OpenApiKiotaEndToEndTests/Headers/GeneratedCode/Models/CountryAttributesInResponse.cs index 1f7bc4825..8be2b516f 100644 --- a/test/OpenApiKiotaEndToEndTests/Headers/GeneratedCode/Models/CountryAttributesInResponse.cs +++ b/test/OpenApiKiotaEndToEndTests/Headers/GeneratedCode/Models/CountryAttributesInResponse.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,28 +17,21 @@ public partial class CountryAttributesInResponse : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The name property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Name { get { return BackingStore?.Get("name"); } set { BackingStore?.Set("name", value); } } -#nullable restore -#else - public string Name - { - get { return BackingStore?.Get("name"); } - set { BackingStore?.Set("name", value); } - } -#endif + /// The population property public long? Population { get { return BackingStore?.Get("population"); } set { BackingStore?.Set("population", value); } } + /// /// Instantiates a new and sets the default values. /// @@ -44,6 +39,7 @@ public CountryAttributesInResponse() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -54,6 +50,7 @@ public CountryAttributesInResponse() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.Headers.GeneratedCode.Models.CountryAttributesInResponse(); } + /// /// The deserialization information for the current model /// @@ -66,6 +63,7 @@ public virtual IDictionary> GetFieldDeserializers() { "population", n => { Population = n.GetLongValue(); } }, }; } + /// /// Serializes information the current object /// @@ -79,3 +77,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/Headers/GeneratedCode/Models/CountryCollectionResponseDocument.cs b/test/OpenApiKiotaEndToEndTests/Headers/GeneratedCode/Models/CountryCollectionResponseDocument.cs index cb2df51e2..c6ee5bed8 100644 --- a/test/OpenApiKiotaEndToEndTests/Headers/GeneratedCode/Models/CountryCollectionResponseDocument.cs +++ b/test/OpenApiKiotaEndToEndTests/Headers/GeneratedCode/Models/CountryCollectionResponseDocument.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,70 +17,35 @@ public partial class CountryCollectionResponseDocument : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The data property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public List? Data { get { return BackingStore?.Get?>("data"); } set { BackingStore?.Set("data", value); } } -#nullable restore -#else - public List Data - { - get { return BackingStore?.Get>("data"); } - set { BackingStore?.Set("data", value); } - } -#endif + /// The included property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public List? Included { get { return BackingStore?.Get?>("included"); } set { BackingStore?.Set("included", value); } } -#nullable restore -#else - public List Included - { - get { return BackingStore?.Get>("included"); } - set { BackingStore?.Set("included", value); } - } -#endif + /// The links property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.Headers.GeneratedCode.Models.ResourceCollectionTopLevelLinks? Links { get { return BackingStore?.Get("links"); } set { BackingStore?.Set("links", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.Headers.GeneratedCode.Models.ResourceCollectionTopLevelLinks Links - { - get { return BackingStore?.Get("links"); } - set { BackingStore?.Set("links", value); } - } -#endif + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.Headers.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.Headers.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -86,6 +53,7 @@ public CountryCollectionResponseDocument() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -96,6 +64,7 @@ public CountryCollectionResponseDocument() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.Headers.GeneratedCode.Models.CountryCollectionResponseDocument(); } + /// /// The deserialization information for the current model /// @@ -110,6 +79,7 @@ public virtual IDictionary> GetFieldDeserializers() { "meta", n => { Meta = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.Headers.GeneratedCode.Models.Meta.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -125,3 +95,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/Headers/GeneratedCode/Models/CountryDataInResponse.cs b/test/OpenApiKiotaEndToEndTests/Headers/GeneratedCode/Models/CountryDataInResponse.cs index 84adcb014..411e5515b 100644 --- a/test/OpenApiKiotaEndToEndTests/Headers/GeneratedCode/Models/CountryDataInResponse.cs +++ b/test/OpenApiKiotaEndToEndTests/Headers/GeneratedCode/Models/CountryDataInResponse.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -13,59 +15,33 @@ public partial class CountryDataInResponse : global::OpenApiKiotaEndToEndTests.H #pragma warning restore CS1591 { /// The attributes property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.Headers.GeneratedCode.Models.CountryAttributesInResponse? Attributes { get { return BackingStore?.Get("attributes"); } set { BackingStore?.Set("attributes", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.Headers.GeneratedCode.Models.CountryAttributesInResponse Attributes - { - get { return BackingStore?.Get("attributes"); } - set { BackingStore?.Set("attributes", value); } - } -#endif + /// The id property public Guid? Id { get { return BackingStore?.Get("id"); } set { BackingStore?.Set("id", value); } } + /// The links property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.Headers.GeneratedCode.Models.ResourceLinks? Links { get { return BackingStore?.Get("links"); } set { BackingStore?.Set("links", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.Headers.GeneratedCode.Models.ResourceLinks Links - { - get { return BackingStore?.Get("links"); } - set { BackingStore?.Set("links", value); } - } -#endif + /// The relationships property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.Headers.GeneratedCode.Models.CountryRelationshipsInResponse? Relationships { get { return BackingStore?.Get("relationships"); } set { BackingStore?.Set("relationships", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.Headers.GeneratedCode.Models.CountryRelationshipsInResponse Relationships - { - get { return BackingStore?.Get("relationships"); } - set { BackingStore?.Set("relationships", value); } - } -#endif + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -76,6 +52,7 @@ public Guid? Id _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.Headers.GeneratedCode.Models.CountryDataInResponse(); } + /// /// The deserialization information for the current model /// @@ -90,6 +67,7 @@ public override IDictionary> GetFieldDeserializers() { "relationships", n => { Relationships = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.Headers.GeneratedCode.Models.CountryRelationshipsInResponse.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -106,3 +84,4 @@ public override void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/Headers/GeneratedCode/Models/CountryPrimaryResponseDocument.cs b/test/OpenApiKiotaEndToEndTests/Headers/GeneratedCode/Models/CountryPrimaryResponseDocument.cs index 6c8611d0c..71abeb468 100644 --- a/test/OpenApiKiotaEndToEndTests/Headers/GeneratedCode/Models/CountryPrimaryResponseDocument.cs +++ b/test/OpenApiKiotaEndToEndTests/Headers/GeneratedCode/Models/CountryPrimaryResponseDocument.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,70 +17,35 @@ public partial class CountryPrimaryResponseDocument : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The data property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.Headers.GeneratedCode.Models.CountryDataInResponse? Data { get { return BackingStore?.Get("data"); } set { BackingStore?.Set("data", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.Headers.GeneratedCode.Models.CountryDataInResponse Data - { - get { return BackingStore?.Get("data"); } - set { BackingStore?.Set("data", value); } - } -#endif + /// The included property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public List? Included { get { return BackingStore?.Get?>("included"); } set { BackingStore?.Set("included", value); } } -#nullable restore -#else - public List Included - { - get { return BackingStore?.Get>("included"); } - set { BackingStore?.Set("included", value); } - } -#endif + /// The links property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.Headers.GeneratedCode.Models.ResourceTopLevelLinks? Links { get { return BackingStore?.Get("links"); } set { BackingStore?.Set("links", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.Headers.GeneratedCode.Models.ResourceTopLevelLinks Links - { - get { return BackingStore?.Get("links"); } - set { BackingStore?.Set("links", value); } - } -#endif + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.Headers.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.Headers.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -86,6 +53,7 @@ public CountryPrimaryResponseDocument() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -96,6 +64,7 @@ public CountryPrimaryResponseDocument() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.Headers.GeneratedCode.Models.CountryPrimaryResponseDocument(); } + /// /// The deserialization information for the current model /// @@ -110,6 +79,7 @@ public virtual IDictionary> GetFieldDeserializers() { "meta", n => { Meta = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.Headers.GeneratedCode.Models.Meta.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -125,3 +95,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/Headers/GeneratedCode/Models/CountryRelationshipsInResponse.cs b/test/OpenApiKiotaEndToEndTests/Headers/GeneratedCode/Models/CountryRelationshipsInResponse.cs index 34d0f1ac9..552b3c7c9 100644 --- a/test/OpenApiKiotaEndToEndTests/Headers/GeneratedCode/Models/CountryRelationshipsInResponse.cs +++ b/test/OpenApiKiotaEndToEndTests/Headers/GeneratedCode/Models/CountryRelationshipsInResponse.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,22 +17,14 @@ public partial class CountryRelationshipsInResponse : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The languages property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.Headers.GeneratedCode.Models.ToManyLanguageInResponse? Languages { get { return BackingStore?.Get("languages"); } set { BackingStore?.Set("languages", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.Headers.GeneratedCode.Models.ToManyLanguageInResponse Languages - { - get { return BackingStore?.Get("languages"); } - set { BackingStore?.Set("languages", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -38,6 +32,7 @@ public CountryRelationshipsInResponse() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -48,6 +43,7 @@ public CountryRelationshipsInResponse() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.Headers.GeneratedCode.Models.CountryRelationshipsInResponse(); } + /// /// The deserialization information for the current model /// @@ -59,6 +55,7 @@ public virtual IDictionary> GetFieldDeserializers() { "languages", n => { Languages = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.Headers.GeneratedCode.Models.ToManyLanguageInResponse.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -71,3 +68,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/Headers/GeneratedCode/Models/CountryResourceType.cs b/test/OpenApiKiotaEndToEndTests/Headers/GeneratedCode/Models/CountryResourceType.cs index fc11a8eb6..5b5ff4443 100644 --- a/test/OpenApiKiotaEndToEndTests/Headers/GeneratedCode/Models/CountryResourceType.cs +++ b/test/OpenApiKiotaEndToEndTests/Headers/GeneratedCode/Models/CountryResourceType.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 using System.Runtime.Serialization; using System; namespace OpenApiKiotaEndToEndTests.Headers.GeneratedCode.Models @@ -14,3 +16,4 @@ public enum CountryResourceType #pragma warning restore CS1591 } } + diff --git a/test/OpenApiKiotaEndToEndTests/Headers/GeneratedCode/Models/CreateCountryRequestDocument.cs b/test/OpenApiKiotaEndToEndTests/Headers/GeneratedCode/Models/CreateCountryRequestDocument.cs index a02ff478a..b7d404678 100644 --- a/test/OpenApiKiotaEndToEndTests/Headers/GeneratedCode/Models/CreateCountryRequestDocument.cs +++ b/test/OpenApiKiotaEndToEndTests/Headers/GeneratedCode/Models/CreateCountryRequestDocument.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,38 +17,21 @@ public partial class CreateCountryRequestDocument : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The data property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.Headers.GeneratedCode.Models.DataInCreateCountryRequest? Data { get { return BackingStore?.Get("data"); } set { BackingStore?.Set("data", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.Headers.GeneratedCode.Models.DataInCreateCountryRequest Data - { - get { return BackingStore?.Get("data"); } - set { BackingStore?.Set("data", value); } - } -#endif + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.Headers.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.Headers.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -54,6 +39,7 @@ public CreateCountryRequestDocument() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -64,6 +50,7 @@ public CreateCountryRequestDocument() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.Headers.GeneratedCode.Models.CreateCountryRequestDocument(); } + /// /// The deserialization information for the current model /// @@ -76,6 +63,7 @@ public virtual IDictionary> GetFieldDeserializers() { "meta", n => { Meta = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.Headers.GeneratedCode.Models.Meta.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -89,3 +77,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/Headers/GeneratedCode/Models/DataInCreateCountryRequest.cs b/test/OpenApiKiotaEndToEndTests/Headers/GeneratedCode/Models/DataInCreateCountryRequest.cs index cfc3b15ac..8916ccd71 100644 --- a/test/OpenApiKiotaEndToEndTests/Headers/GeneratedCode/Models/DataInCreateCountryRequest.cs +++ b/test/OpenApiKiotaEndToEndTests/Headers/GeneratedCode/Models/DataInCreateCountryRequest.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -14,61 +16,36 @@ public partial class DataInCreateCountryRequest : IBackedModel, IParsable #pragma warning restore CS1591 { /// The attributes property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.Headers.GeneratedCode.Models.AttributesInCreateCountryRequest? Attributes { get { return BackingStore?.Get("attributes"); } set { BackingStore?.Set("attributes", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.Headers.GeneratedCode.Models.AttributesInCreateCountryRequest Attributes - { - get { return BackingStore?.Get("attributes"); } - set { BackingStore?.Set("attributes", value); } - } -#endif + /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.Headers.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.Headers.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// The relationships property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.Headers.GeneratedCode.Models.RelationshipsInCreateCountryRequest? Relationships { get { return BackingStore?.Get("relationships"); } set { BackingStore?.Set("relationships", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.Headers.GeneratedCode.Models.RelationshipsInCreateCountryRequest Relationships - { - get { return BackingStore?.Get("relationships"); } - set { BackingStore?.Set("relationships", value); } - } -#endif + /// The type property public global::OpenApiKiotaEndToEndTests.Headers.GeneratedCode.Models.CountryResourceType? Type { get { return BackingStore?.Get("type"); } set { BackingStore?.Set("type", value); } } + /// /// Instantiates a new and sets the default values. /// @@ -76,6 +53,7 @@ public DataInCreateCountryRequest() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -86,6 +64,7 @@ public DataInCreateCountryRequest() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.Headers.GeneratedCode.Models.DataInCreateCountryRequest(); } + /// /// The deserialization information for the current model /// @@ -100,6 +79,7 @@ public virtual IDictionary> GetFieldDeserializers() { "type", n => { Type = n.GetEnumValue(); } }, }; } + /// /// Serializes information the current object /// @@ -115,3 +95,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/Headers/GeneratedCode/Models/DataInResponse.cs b/test/OpenApiKiotaEndToEndTests/Headers/GeneratedCode/Models/DataInResponse.cs index fa0d56b62..4600c9874 100644 --- a/test/OpenApiKiotaEndToEndTests/Headers/GeneratedCode/Models/DataInResponse.cs +++ b/test/OpenApiKiotaEndToEndTests/Headers/GeneratedCode/Models/DataInResponse.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,28 +17,21 @@ public partial class DataInResponse : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.Headers.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.Headers.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// The type property public global::OpenApiKiotaEndToEndTests.Headers.GeneratedCode.Models.ResourceType? Type { get { return BackingStore?.Get("type"); } set { BackingStore?.Set("type", value); } } + /// /// Instantiates a new and sets the default values. /// @@ -44,6 +39,7 @@ public DataInResponse() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -60,6 +56,7 @@ public DataInResponse() _ => new global::OpenApiKiotaEndToEndTests.Headers.GeneratedCode.Models.DataInResponse(), }; } + /// /// The deserialization information for the current model /// @@ -72,6 +69,7 @@ public virtual IDictionary> GetFieldDeserializers() { "type", n => { Type = n.GetEnumValue(); } }, }; } + /// /// Serializes information the current object /// @@ -85,3 +83,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/Headers/GeneratedCode/Models/DataInUpdateCountryRequest.cs b/test/OpenApiKiotaEndToEndTests/Headers/GeneratedCode/Models/DataInUpdateCountryRequest.cs index e2b312c80..06210c907 100644 --- a/test/OpenApiKiotaEndToEndTests/Headers/GeneratedCode/Models/DataInUpdateCountryRequest.cs +++ b/test/OpenApiKiotaEndToEndTests/Headers/GeneratedCode/Models/DataInUpdateCountryRequest.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -14,67 +16,43 @@ public partial class DataInUpdateCountryRequest : IBackedModel, IParsable #pragma warning restore CS1591 { /// The attributes property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.Headers.GeneratedCode.Models.AttributesInUpdateCountryRequest? Attributes { get { return BackingStore?.Get("attributes"); } set { BackingStore?.Set("attributes", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.Headers.GeneratedCode.Models.AttributesInUpdateCountryRequest Attributes - { - get { return BackingStore?.Get("attributes"); } - set { BackingStore?.Set("attributes", value); } - } -#endif + /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The id property public Guid? Id { get { return BackingStore?.Get("id"); } set { BackingStore?.Set("id", value); } } + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.Headers.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.Headers.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// The relationships property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.Headers.GeneratedCode.Models.RelationshipsInUpdateCountryRequest? Relationships { get { return BackingStore?.Get("relationships"); } set { BackingStore?.Set("relationships", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.Headers.GeneratedCode.Models.RelationshipsInUpdateCountryRequest Relationships - { - get { return BackingStore?.Get("relationships"); } - set { BackingStore?.Set("relationships", value); } - } -#endif + /// The type property public global::OpenApiKiotaEndToEndTests.Headers.GeneratedCode.Models.CountryResourceType? Type { get { return BackingStore?.Get("type"); } set { BackingStore?.Set("type", value); } } + /// /// Instantiates a new and sets the default values. /// @@ -82,6 +60,7 @@ public DataInUpdateCountryRequest() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -92,6 +71,7 @@ public DataInUpdateCountryRequest() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.Headers.GeneratedCode.Models.DataInUpdateCountryRequest(); } + /// /// The deserialization information for the current model /// @@ -107,6 +87,7 @@ public virtual IDictionary> GetFieldDeserializers() { "type", n => { Type = n.GetEnumValue(); } }, }; } + /// /// Serializes information the current object /// @@ -123,3 +104,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/Headers/GeneratedCode/Models/ErrorLinks.cs b/test/OpenApiKiotaEndToEndTests/Headers/GeneratedCode/Models/ErrorLinks.cs index 645e9fdc7..3cf1ccd2b 100644 --- a/test/OpenApiKiotaEndToEndTests/Headers/GeneratedCode/Models/ErrorLinks.cs +++ b/test/OpenApiKiotaEndToEndTests/Headers/GeneratedCode/Models/ErrorLinks.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -14,39 +16,22 @@ public partial class ErrorLinks : IBackedModel, IParsable #pragma warning restore CS1591 { /// The about property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? About { get { return BackingStore?.Get("about"); } set { BackingStore?.Set("about", value); } } -#nullable restore -#else - public string About - { - get { return BackingStore?.Get("about"); } - set { BackingStore?.Set("about", value); } - } -#endif + /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// 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 and sets the default values. /// @@ -54,6 +39,7 @@ public ErrorLinks() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -64,6 +50,7 @@ public ErrorLinks() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.Headers.GeneratedCode.Models.ErrorLinks(); } + /// /// The deserialization information for the current model /// @@ -76,6 +63,7 @@ public virtual IDictionary> GetFieldDeserializers() { "type", n => { Type = n.GetStringValue(); } }, }; } + /// /// Serializes information the current object /// @@ -89,3 +77,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/Headers/GeneratedCode/Models/ErrorObject.cs b/test/OpenApiKiotaEndToEndTests/Headers/GeneratedCode/Models/ErrorObject.cs index 85f524100..87ee500d5 100644 --- a/test/OpenApiKiotaEndToEndTests/Headers/GeneratedCode/Models/ErrorObject.cs +++ b/test/OpenApiKiotaEndToEndTests/Headers/GeneratedCode/Models/ErrorObject.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,134 +17,63 @@ public partial class ErrorObject : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The code property -#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 detail property -#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 id property -#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 links property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.Headers.GeneratedCode.Models.ErrorLinks? Links { get { return BackingStore?.Get("links"); } set { BackingStore?.Set("links", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.Headers.GeneratedCode.Models.ErrorLinks Links - { - get { return BackingStore?.Get("links"); } - set { BackingStore?.Set("links", value); } - } -#endif + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.Headers.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.Headers.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// The source property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.Headers.GeneratedCode.Models.ErrorSource? Source { get { return BackingStore?.Get("source"); } set { BackingStore?.Set("source", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.Headers.GeneratedCode.Models.ErrorSource Source - { - get { return BackingStore?.Get("source"); } - set { BackingStore?.Set("source", value); } - } -#endif + /// The status property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Status { get { return BackingStore?.Get("status"); } set { BackingStore?.Set("status", value); } } -#nullable restore -#else - public string Status - { - get { return BackingStore?.Get("status"); } - set { BackingStore?.Set("status", value); } - } -#endif + /// The title property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Title { get { return BackingStore?.Get("title"); } set { BackingStore?.Set("title", value); } } -#nullable restore -#else - public string Title - { - get { return BackingStore?.Get("title"); } - set { BackingStore?.Set("title", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -150,6 +81,7 @@ public ErrorObject() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -160,6 +92,7 @@ public ErrorObject() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.Headers.GeneratedCode.Models.ErrorObject(); } + /// /// The deserialization information for the current model /// @@ -178,6 +111,7 @@ public virtual IDictionary> GetFieldDeserializers() { "title", n => { Title = n.GetStringValue(); } }, }; } + /// /// Serializes information the current object /// @@ -197,3 +131,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/Headers/GeneratedCode/Models/ErrorResponseDocument.cs b/test/OpenApiKiotaEndToEndTests/Headers/GeneratedCode/Models/ErrorResponseDocument.cs index 47bcd4281..32f9621eb 100644 --- a/test/OpenApiKiotaEndToEndTests/Headers/GeneratedCode/Models/ErrorResponseDocument.cs +++ b/test/OpenApiKiotaEndToEndTests/Headers/GeneratedCode/Models/ErrorResponseDocument.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -16,56 +18,31 @@ public partial class ErrorResponseDocument : ApiException, IBackedModel, IParsab { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The errors property -#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 + /// The links property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.Headers.GeneratedCode.Models.ErrorTopLevelLinks? Links { get { return BackingStore?.Get("links"); } set { BackingStore?.Set("links", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.Headers.GeneratedCode.Models.ErrorTopLevelLinks Links - { - get { return BackingStore?.Get("links"); } - set { BackingStore?.Set("links", value); } - } -#endif + /// The primary error message. public override string Message { get => base.Message; } + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.Headers.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.Headers.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -73,6 +50,7 @@ public ErrorResponseDocument() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -83,6 +61,7 @@ public ErrorResponseDocument() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.Headers.GeneratedCode.Models.ErrorResponseDocument(); } + /// /// The deserialization information for the current model /// @@ -96,6 +75,7 @@ public virtual IDictionary> GetFieldDeserializers() { "meta", n => { Meta = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.Headers.GeneratedCode.Models.Meta.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -110,3 +90,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/Headers/GeneratedCode/Models/ErrorSource.cs b/test/OpenApiKiotaEndToEndTests/Headers/GeneratedCode/Models/ErrorSource.cs index 4d9d303f0..38d3b53fb 100644 --- a/test/OpenApiKiotaEndToEndTests/Headers/GeneratedCode/Models/ErrorSource.cs +++ b/test/OpenApiKiotaEndToEndTests/Headers/GeneratedCode/Models/ErrorSource.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,54 +17,28 @@ public partial class ErrorSource : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The header property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Header { get { return BackingStore?.Get("header"); } set { BackingStore?.Set("header", value); } } -#nullable restore -#else - public string Header - { - get { return BackingStore?.Get("header"); } - set { BackingStore?.Set("header", value); } - } -#endif + /// The parameter property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Parameter { get { return BackingStore?.Get("parameter"); } set { BackingStore?.Set("parameter", value); } } -#nullable restore -#else - public string Parameter - { - get { return BackingStore?.Get("parameter"); } - set { BackingStore?.Set("parameter", value); } - } -#endif + /// The pointer property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Pointer { get { return BackingStore?.Get("pointer"); } set { BackingStore?.Set("pointer", value); } } -#nullable restore -#else - public string Pointer - { - get { return BackingStore?.Get("pointer"); } - set { BackingStore?.Set("pointer", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -70,6 +46,7 @@ public ErrorSource() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -80,6 +57,7 @@ public ErrorSource() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.Headers.GeneratedCode.Models.ErrorSource(); } + /// /// The deserialization information for the current model /// @@ -93,6 +71,7 @@ public virtual IDictionary> GetFieldDeserializers() { "pointer", n => { Pointer = n.GetStringValue(); } }, }; } + /// /// Serializes information the current object /// @@ -107,3 +86,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/Headers/GeneratedCode/Models/ErrorTopLevelLinks.cs b/test/OpenApiKiotaEndToEndTests/Headers/GeneratedCode/Models/ErrorTopLevelLinks.cs index 60e2b1875..3bf179ab8 100644 --- a/test/OpenApiKiotaEndToEndTests/Headers/GeneratedCode/Models/ErrorTopLevelLinks.cs +++ b/test/OpenApiKiotaEndToEndTests/Headers/GeneratedCode/Models/ErrorTopLevelLinks.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,38 +17,21 @@ public partial class ErrorTopLevelLinks : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The describedby property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Describedby { get { return BackingStore?.Get("describedby"); } set { BackingStore?.Set("describedby", value); } } -#nullable restore -#else - public string Describedby - { - get { return BackingStore?.Get("describedby"); } - set { BackingStore?.Set("describedby", value); } - } -#endif + /// The self property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Self { get { return BackingStore?.Get("self"); } set { BackingStore?.Set("self", value); } } -#nullable restore -#else - public string Self - { - get { return BackingStore?.Get("self"); } - set { BackingStore?.Set("self", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -54,6 +39,7 @@ public ErrorTopLevelLinks() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -64,6 +50,7 @@ public ErrorTopLevelLinks() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.Headers.GeneratedCode.Models.ErrorTopLevelLinks(); } + /// /// The deserialization information for the current model /// @@ -76,6 +63,7 @@ public virtual IDictionary> GetFieldDeserializers() { "self", n => { Self = n.GetStringValue(); } }, }; } + /// /// Serializes information the current object /// @@ -89,3 +77,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/Headers/GeneratedCode/Models/LanguageAttributesInResponse.cs b/test/OpenApiKiotaEndToEndTests/Headers/GeneratedCode/Models/LanguageAttributesInResponse.cs index 99985e688..46e500381 100644 --- a/test/OpenApiKiotaEndToEndTests/Headers/GeneratedCode/Models/LanguageAttributesInResponse.cs +++ b/test/OpenApiKiotaEndToEndTests/Headers/GeneratedCode/Models/LanguageAttributesInResponse.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,38 +17,21 @@ public partial class LanguageAttributesInResponse : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The code property -#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 name property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Name { get { return BackingStore?.Get("name"); } set { BackingStore?.Set("name", value); } } -#nullable restore -#else - public string Name - { - get { return BackingStore?.Get("name"); } - set { BackingStore?.Set("name", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -54,6 +39,7 @@ public LanguageAttributesInResponse() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -64,6 +50,7 @@ public LanguageAttributesInResponse() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.Headers.GeneratedCode.Models.LanguageAttributesInResponse(); } + /// /// The deserialization information for the current model /// @@ -76,6 +63,7 @@ public virtual IDictionary> GetFieldDeserializers() { "name", n => { Name = n.GetStringValue(); } }, }; } + /// /// Serializes information the current object /// @@ -89,3 +77,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/Headers/GeneratedCode/Models/LanguageCollectionResponseDocument.cs b/test/OpenApiKiotaEndToEndTests/Headers/GeneratedCode/Models/LanguageCollectionResponseDocument.cs index bd3d89d55..0cc33d9ff 100644 --- a/test/OpenApiKiotaEndToEndTests/Headers/GeneratedCode/Models/LanguageCollectionResponseDocument.cs +++ b/test/OpenApiKiotaEndToEndTests/Headers/GeneratedCode/Models/LanguageCollectionResponseDocument.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,70 +17,35 @@ public partial class LanguageCollectionResponseDocument : IBackedModel, IParsabl { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The data property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public List? Data { get { return BackingStore?.Get?>("data"); } set { BackingStore?.Set("data", value); } } -#nullable restore -#else - public List Data - { - get { return BackingStore?.Get>("data"); } - set { BackingStore?.Set("data", value); } - } -#endif + /// The included property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public List? Included { get { return BackingStore?.Get?>("included"); } set { BackingStore?.Set("included", value); } } -#nullable restore -#else - public List Included - { - get { return BackingStore?.Get>("included"); } - set { BackingStore?.Set("included", value); } - } -#endif + /// The links property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.Headers.GeneratedCode.Models.ResourceCollectionTopLevelLinks? Links { get { return BackingStore?.Get("links"); } set { BackingStore?.Set("links", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.Headers.GeneratedCode.Models.ResourceCollectionTopLevelLinks Links - { - get { return BackingStore?.Get("links"); } - set { BackingStore?.Set("links", value); } - } -#endif + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.Headers.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.Headers.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -86,6 +53,7 @@ public LanguageCollectionResponseDocument() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -96,6 +64,7 @@ public LanguageCollectionResponseDocument() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.Headers.GeneratedCode.Models.LanguageCollectionResponseDocument(); } + /// /// The deserialization information for the current model /// @@ -110,6 +79,7 @@ public virtual IDictionary> GetFieldDeserializers() { "meta", n => { Meta = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.Headers.GeneratedCode.Models.Meta.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -125,3 +95,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/Headers/GeneratedCode/Models/LanguageDataInResponse.cs b/test/OpenApiKiotaEndToEndTests/Headers/GeneratedCode/Models/LanguageDataInResponse.cs index db67e3a53..bc0d39285 100644 --- a/test/OpenApiKiotaEndToEndTests/Headers/GeneratedCode/Models/LanguageDataInResponse.cs +++ b/test/OpenApiKiotaEndToEndTests/Headers/GeneratedCode/Models/LanguageDataInResponse.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -13,43 +15,26 @@ public partial class LanguageDataInResponse : global::OpenApiKiotaEndToEndTests. #pragma warning restore CS1591 { /// The attributes property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.Headers.GeneratedCode.Models.LanguageAttributesInResponse? Attributes { get { return BackingStore?.Get("attributes"); } set { BackingStore?.Set("attributes", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.Headers.GeneratedCode.Models.LanguageAttributesInResponse Attributes - { - get { return BackingStore?.Get("attributes"); } - set { BackingStore?.Set("attributes", value); } - } -#endif + /// The id property public Guid? Id { get { return BackingStore?.Get("id"); } set { BackingStore?.Set("id", value); } } + /// The links property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.Headers.GeneratedCode.Models.ResourceLinks? Links { get { return BackingStore?.Get("links"); } set { BackingStore?.Set("links", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.Headers.GeneratedCode.Models.ResourceLinks Links - { - get { return BackingStore?.Get("links"); } - set { BackingStore?.Set("links", value); } - } -#endif + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -60,6 +45,7 @@ public Guid? Id _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.Headers.GeneratedCode.Models.LanguageDataInResponse(); } + /// /// The deserialization information for the current model /// @@ -73,6 +59,7 @@ public override IDictionary> GetFieldDeserializers() { "links", n => { Links = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.Headers.GeneratedCode.Models.ResourceLinks.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -88,3 +75,4 @@ public override void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/Headers/GeneratedCode/Models/LanguageIdentifierCollectionResponseDocument.cs b/test/OpenApiKiotaEndToEndTests/Headers/GeneratedCode/Models/LanguageIdentifierCollectionResponseDocument.cs index 093437355..1d2d7b678 100644 --- a/test/OpenApiKiotaEndToEndTests/Headers/GeneratedCode/Models/LanguageIdentifierCollectionResponseDocument.cs +++ b/test/OpenApiKiotaEndToEndTests/Headers/GeneratedCode/Models/LanguageIdentifierCollectionResponseDocument.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,54 +17,28 @@ public partial class LanguageIdentifierCollectionResponseDocument : IBackedModel { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The data property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public List? Data { get { return BackingStore?.Get?>("data"); } set { BackingStore?.Set("data", value); } } -#nullable restore -#else - public List Data - { - get { return BackingStore?.Get>("data"); } - set { BackingStore?.Set("data", value); } - } -#endif + /// The links property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.Headers.GeneratedCode.Models.ResourceIdentifierCollectionTopLevelLinks? Links { get { return BackingStore?.Get("links"); } set { BackingStore?.Set("links", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.Headers.GeneratedCode.Models.ResourceIdentifierCollectionTopLevelLinks Links - { - get { return BackingStore?.Get("links"); } - set { BackingStore?.Set("links", value); } - } -#endif + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.Headers.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.Headers.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -70,6 +46,7 @@ public LanguageIdentifierCollectionResponseDocument() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -80,6 +57,7 @@ public LanguageIdentifierCollectionResponseDocument() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.Headers.GeneratedCode.Models.LanguageIdentifierCollectionResponseDocument(); } + /// /// The deserialization information for the current model /// @@ -93,6 +71,7 @@ public virtual IDictionary> GetFieldDeserializers() { "meta", n => { Meta = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.Headers.GeneratedCode.Models.Meta.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -107,3 +86,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/Headers/GeneratedCode/Models/LanguageIdentifierInRequest.cs b/test/OpenApiKiotaEndToEndTests/Headers/GeneratedCode/Models/LanguageIdentifierInRequest.cs index 5e1a01ce3..8961841e7 100644 --- a/test/OpenApiKiotaEndToEndTests/Headers/GeneratedCode/Models/LanguageIdentifierInRequest.cs +++ b/test/OpenApiKiotaEndToEndTests/Headers/GeneratedCode/Models/LanguageIdentifierInRequest.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,34 +17,28 @@ public partial class LanguageIdentifierInRequest : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The id property public Guid? Id { get { return BackingStore?.Get("id"); } set { BackingStore?.Set("id", value); } } + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.Headers.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.Headers.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// The type property public global::OpenApiKiotaEndToEndTests.Headers.GeneratedCode.Models.LanguageResourceType? Type { get { return BackingStore?.Get("type"); } set { BackingStore?.Set("type", value); } } + /// /// Instantiates a new and sets the default values. /// @@ -50,6 +46,7 @@ public LanguageIdentifierInRequest() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -60,6 +57,7 @@ public LanguageIdentifierInRequest() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.Headers.GeneratedCode.Models.LanguageIdentifierInRequest(); } + /// /// The deserialization information for the current model /// @@ -73,6 +71,7 @@ public virtual IDictionary> GetFieldDeserializers() { "type", n => { Type = n.GetEnumValue(); } }, }; } + /// /// Serializes information the current object /// @@ -87,3 +86,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/Headers/GeneratedCode/Models/LanguageIdentifierInResponse.cs b/test/OpenApiKiotaEndToEndTests/Headers/GeneratedCode/Models/LanguageIdentifierInResponse.cs index a421e0aca..0485c206f 100644 --- a/test/OpenApiKiotaEndToEndTests/Headers/GeneratedCode/Models/LanguageIdentifierInResponse.cs +++ b/test/OpenApiKiotaEndToEndTests/Headers/GeneratedCode/Models/LanguageIdentifierInResponse.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,34 +17,28 @@ public partial class LanguageIdentifierInResponse : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The id property public Guid? Id { get { return BackingStore?.Get("id"); } set { BackingStore?.Set("id", value); } } + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.Headers.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.Headers.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// The type property public global::OpenApiKiotaEndToEndTests.Headers.GeneratedCode.Models.LanguageResourceType? Type { get { return BackingStore?.Get("type"); } set { BackingStore?.Set("type", value); } } + /// /// Instantiates a new and sets the default values. /// @@ -50,6 +46,7 @@ public LanguageIdentifierInResponse() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -60,6 +57,7 @@ public LanguageIdentifierInResponse() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.Headers.GeneratedCode.Models.LanguageIdentifierInResponse(); } + /// /// The deserialization information for the current model /// @@ -73,6 +71,7 @@ public virtual IDictionary> GetFieldDeserializers() { "type", n => { Type = n.GetEnumValue(); } }, }; } + /// /// Serializes information the current object /// @@ -87,3 +86,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/Headers/GeneratedCode/Models/LanguageResourceType.cs b/test/OpenApiKiotaEndToEndTests/Headers/GeneratedCode/Models/LanguageResourceType.cs index c3baf4794..2fa4e9a58 100644 --- a/test/OpenApiKiotaEndToEndTests/Headers/GeneratedCode/Models/LanguageResourceType.cs +++ b/test/OpenApiKiotaEndToEndTests/Headers/GeneratedCode/Models/LanguageResourceType.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 using System.Runtime.Serialization; using System; namespace OpenApiKiotaEndToEndTests.Headers.GeneratedCode.Models @@ -14,3 +16,4 @@ public enum LanguageResourceType #pragma warning restore CS1591 } } + diff --git a/test/OpenApiKiotaEndToEndTests/Headers/GeneratedCode/Models/Meta.cs b/test/OpenApiKiotaEndToEndTests/Headers/GeneratedCode/Models/Meta.cs index 2a04332ce..c1f7de918 100644 --- a/test/OpenApiKiotaEndToEndTests/Headers/GeneratedCode/Models/Meta.cs +++ b/test/OpenApiKiotaEndToEndTests/Headers/GeneratedCode/Models/Meta.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -19,8 +21,10 @@ public IDictionary AdditionalData get { return BackingStore.Get>("AdditionalData") ?? new Dictionary(); } set { BackingStore.Set("AdditionalData", value); } } + /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// /// Instantiates a new and sets the default values. /// @@ -29,6 +33,7 @@ public Meta() BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); AdditionalData = new Dictionary(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -39,6 +44,7 @@ public Meta() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.Headers.GeneratedCode.Models.Meta(); } + /// /// The deserialization information for the current model /// @@ -49,6 +55,7 @@ public virtual IDictionary> GetFieldDeserializers() { }; } + /// /// Serializes information the current object /// @@ -61,3 +68,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/Headers/GeneratedCode/Models/RelationshipLinks.cs b/test/OpenApiKiotaEndToEndTests/Headers/GeneratedCode/Models/RelationshipLinks.cs index ac6983957..ee32e8f7c 100644 --- a/test/OpenApiKiotaEndToEndTests/Headers/GeneratedCode/Models/RelationshipLinks.cs +++ b/test/OpenApiKiotaEndToEndTests/Headers/GeneratedCode/Models/RelationshipLinks.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,38 +17,21 @@ public partial class RelationshipLinks : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The related property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Related { get { return BackingStore?.Get("related"); } set { BackingStore?.Set("related", value); } } -#nullable restore -#else - public string Related - { - get { return BackingStore?.Get("related"); } - set { BackingStore?.Set("related", value); } - } -#endif + /// The self property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Self { get { return BackingStore?.Get("self"); } set { BackingStore?.Set("self", value); } } -#nullable restore -#else - public string Self - { - get { return BackingStore?.Get("self"); } - set { BackingStore?.Set("self", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -54,6 +39,7 @@ public RelationshipLinks() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -64,6 +50,7 @@ public RelationshipLinks() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.Headers.GeneratedCode.Models.RelationshipLinks(); } + /// /// The deserialization information for the current model /// @@ -76,6 +63,7 @@ public virtual IDictionary> GetFieldDeserializers() { "self", n => { Self = n.GetStringValue(); } }, }; } + /// /// Serializes information the current object /// @@ -89,3 +77,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/Headers/GeneratedCode/Models/RelationshipsInCreateCountryRequest.cs b/test/OpenApiKiotaEndToEndTests/Headers/GeneratedCode/Models/RelationshipsInCreateCountryRequest.cs index c2d3ca14c..72873bbd8 100644 --- a/test/OpenApiKiotaEndToEndTests/Headers/GeneratedCode/Models/RelationshipsInCreateCountryRequest.cs +++ b/test/OpenApiKiotaEndToEndTests/Headers/GeneratedCode/Models/RelationshipsInCreateCountryRequest.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,22 +17,14 @@ public partial class RelationshipsInCreateCountryRequest : IBackedModel, IParsab { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The languages property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.Headers.GeneratedCode.Models.ToManyLanguageInRequest? Languages { get { return BackingStore?.Get("languages"); } set { BackingStore?.Set("languages", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.Headers.GeneratedCode.Models.ToManyLanguageInRequest Languages - { - get { return BackingStore?.Get("languages"); } - set { BackingStore?.Set("languages", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -38,6 +32,7 @@ public RelationshipsInCreateCountryRequest() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -48,6 +43,7 @@ public RelationshipsInCreateCountryRequest() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.Headers.GeneratedCode.Models.RelationshipsInCreateCountryRequest(); } + /// /// The deserialization information for the current model /// @@ -59,6 +55,7 @@ public virtual IDictionary> GetFieldDeserializers() { "languages", n => { Languages = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.Headers.GeneratedCode.Models.ToManyLanguageInRequest.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -71,3 +68,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/Headers/GeneratedCode/Models/RelationshipsInUpdateCountryRequest.cs b/test/OpenApiKiotaEndToEndTests/Headers/GeneratedCode/Models/RelationshipsInUpdateCountryRequest.cs index 5d1f96fb5..40937a223 100644 --- a/test/OpenApiKiotaEndToEndTests/Headers/GeneratedCode/Models/RelationshipsInUpdateCountryRequest.cs +++ b/test/OpenApiKiotaEndToEndTests/Headers/GeneratedCode/Models/RelationshipsInUpdateCountryRequest.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,22 +17,14 @@ public partial class RelationshipsInUpdateCountryRequest : IBackedModel, IParsab { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The languages property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.Headers.GeneratedCode.Models.ToManyLanguageInRequest? Languages { get { return BackingStore?.Get("languages"); } set { BackingStore?.Set("languages", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.Headers.GeneratedCode.Models.ToManyLanguageInRequest Languages - { - get { return BackingStore?.Get("languages"); } - set { BackingStore?.Set("languages", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -38,6 +32,7 @@ public RelationshipsInUpdateCountryRequest() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -48,6 +43,7 @@ public RelationshipsInUpdateCountryRequest() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.Headers.GeneratedCode.Models.RelationshipsInUpdateCountryRequest(); } + /// /// The deserialization information for the current model /// @@ -59,6 +55,7 @@ public virtual IDictionary> GetFieldDeserializers() { "languages", n => { Languages = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.Headers.GeneratedCode.Models.ToManyLanguageInRequest.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -71,3 +68,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/Headers/GeneratedCode/Models/ResourceCollectionTopLevelLinks.cs b/test/OpenApiKiotaEndToEndTests/Headers/GeneratedCode/Models/ResourceCollectionTopLevelLinks.cs index f07b48a0c..088f20daf 100644 --- a/test/OpenApiKiotaEndToEndTests/Headers/GeneratedCode/Models/ResourceCollectionTopLevelLinks.cs +++ b/test/OpenApiKiotaEndToEndTests/Headers/GeneratedCode/Models/ResourceCollectionTopLevelLinks.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,102 +17,49 @@ public partial class ResourceCollectionTopLevelLinks : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The describedby property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Describedby { get { return BackingStore?.Get("describedby"); } set { BackingStore?.Set("describedby", value); } } -#nullable restore -#else - public string Describedby - { - get { return BackingStore?.Get("describedby"); } - set { BackingStore?.Set("describedby", value); } - } -#endif + /// The first property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? First { get { return BackingStore?.Get("first"); } set { BackingStore?.Set("first", value); } } -#nullable restore -#else - public string First - { - get { return BackingStore?.Get("first"); } - set { BackingStore?.Set("first", value); } - } -#endif + /// The last property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Last { get { return BackingStore?.Get("last"); } set { BackingStore?.Set("last", value); } } -#nullable restore -#else - public string Last - { - get { return BackingStore?.Get("last"); } - set { BackingStore?.Set("last", value); } - } -#endif + /// The next property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Next { get { return BackingStore?.Get("next"); } set { BackingStore?.Set("next", value); } } -#nullable restore -#else - public string Next - { - get { return BackingStore?.Get("next"); } - set { BackingStore?.Set("next", value); } - } -#endif + /// The prev property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Prev { get { return BackingStore?.Get("prev"); } set { BackingStore?.Set("prev", value); } } -#nullable restore -#else - public string Prev - { - get { return BackingStore?.Get("prev"); } - set { BackingStore?.Set("prev", value); } - } -#endif + /// The self property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Self { get { return BackingStore?.Get("self"); } set { BackingStore?.Set("self", value); } } -#nullable restore -#else - public string Self - { - get { return BackingStore?.Get("self"); } - set { BackingStore?.Set("self", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -118,6 +67,7 @@ public ResourceCollectionTopLevelLinks() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -128,6 +78,7 @@ public ResourceCollectionTopLevelLinks() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.Headers.GeneratedCode.Models.ResourceCollectionTopLevelLinks(); } + /// /// The deserialization information for the current model /// @@ -144,6 +95,7 @@ public virtual IDictionary> GetFieldDeserializers() { "self", n => { Self = n.GetStringValue(); } }, }; } + /// /// Serializes information the current object /// @@ -161,3 +113,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/Headers/GeneratedCode/Models/ResourceIdentifierCollectionTopLevelLinks.cs b/test/OpenApiKiotaEndToEndTests/Headers/GeneratedCode/Models/ResourceIdentifierCollectionTopLevelLinks.cs index a57b5f6bc..1814b3980 100644 --- a/test/OpenApiKiotaEndToEndTests/Headers/GeneratedCode/Models/ResourceIdentifierCollectionTopLevelLinks.cs +++ b/test/OpenApiKiotaEndToEndTests/Headers/GeneratedCode/Models/ResourceIdentifierCollectionTopLevelLinks.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,118 +17,56 @@ public partial class ResourceIdentifierCollectionTopLevelLinks : IBackedModel, I { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The describedby property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Describedby { get { return BackingStore?.Get("describedby"); } set { BackingStore?.Set("describedby", value); } } -#nullable restore -#else - public string Describedby - { - get { return BackingStore?.Get("describedby"); } - set { BackingStore?.Set("describedby", value); } - } -#endif + /// The first property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? First { get { return BackingStore?.Get("first"); } set { BackingStore?.Set("first", value); } } -#nullable restore -#else - public string First - { - get { return BackingStore?.Get("first"); } - set { BackingStore?.Set("first", value); } - } -#endif + /// The last property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Last { get { return BackingStore?.Get("last"); } set { BackingStore?.Set("last", value); } } -#nullable restore -#else - public string Last - { - get { return BackingStore?.Get("last"); } - set { BackingStore?.Set("last", value); } - } -#endif + /// The next property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Next { get { return BackingStore?.Get("next"); } set { BackingStore?.Set("next", value); } } -#nullable restore -#else - public string Next - { - get { return BackingStore?.Get("next"); } - set { BackingStore?.Set("next", value); } - } -#endif + /// The prev property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Prev { get { return BackingStore?.Get("prev"); } set { BackingStore?.Set("prev", value); } } -#nullable restore -#else - public string Prev - { - get { return BackingStore?.Get("prev"); } - set { BackingStore?.Set("prev", value); } - } -#endif + /// The related property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Related { get { return BackingStore?.Get("related"); } set { BackingStore?.Set("related", value); } } -#nullable restore -#else - public string Related - { - get { return BackingStore?.Get("related"); } - set { BackingStore?.Set("related", value); } - } -#endif + /// The self property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Self { get { return BackingStore?.Get("self"); } set { BackingStore?.Set("self", value); } } -#nullable restore -#else - public string Self - { - get { return BackingStore?.Get("self"); } - set { BackingStore?.Set("self", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -134,6 +74,7 @@ public ResourceIdentifierCollectionTopLevelLinks() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -144,6 +85,7 @@ public ResourceIdentifierCollectionTopLevelLinks() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.Headers.GeneratedCode.Models.ResourceIdentifierCollectionTopLevelLinks(); } + /// /// The deserialization information for the current model /// @@ -161,6 +103,7 @@ public virtual IDictionary> GetFieldDeserializers() { "self", n => { Self = n.GetStringValue(); } }, }; } + /// /// Serializes information the current object /// @@ -179,3 +122,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/Headers/GeneratedCode/Models/ResourceLinks.cs b/test/OpenApiKiotaEndToEndTests/Headers/GeneratedCode/Models/ResourceLinks.cs index bda1a6de1..a59673ec9 100644 --- a/test/OpenApiKiotaEndToEndTests/Headers/GeneratedCode/Models/ResourceLinks.cs +++ b/test/OpenApiKiotaEndToEndTests/Headers/GeneratedCode/Models/ResourceLinks.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,22 +17,14 @@ public partial class ResourceLinks : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The self property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Self { get { return BackingStore?.Get("self"); } set { BackingStore?.Set("self", value); } } -#nullable restore -#else - public string Self - { - get { return BackingStore?.Get("self"); } - set { BackingStore?.Set("self", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -38,6 +32,7 @@ public ResourceLinks() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -48,6 +43,7 @@ public ResourceLinks() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.Headers.GeneratedCode.Models.ResourceLinks(); } + /// /// The deserialization information for the current model /// @@ -59,6 +55,7 @@ public virtual IDictionary> GetFieldDeserializers() { "self", n => { Self = n.GetStringValue(); } }, }; } + /// /// Serializes information the current object /// @@ -71,3 +68,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/Headers/GeneratedCode/Models/ResourceTopLevelLinks.cs b/test/OpenApiKiotaEndToEndTests/Headers/GeneratedCode/Models/ResourceTopLevelLinks.cs index d9a3087aa..b6f2b03a1 100644 --- a/test/OpenApiKiotaEndToEndTests/Headers/GeneratedCode/Models/ResourceTopLevelLinks.cs +++ b/test/OpenApiKiotaEndToEndTests/Headers/GeneratedCode/Models/ResourceTopLevelLinks.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,38 +17,21 @@ public partial class ResourceTopLevelLinks : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The describedby property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Describedby { get { return BackingStore?.Get("describedby"); } set { BackingStore?.Set("describedby", value); } } -#nullable restore -#else - public string Describedby - { - get { return BackingStore?.Get("describedby"); } - set { BackingStore?.Set("describedby", value); } - } -#endif + /// The self property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Self { get { return BackingStore?.Get("self"); } set { BackingStore?.Set("self", value); } } -#nullable restore -#else - public string Self - { - get { return BackingStore?.Get("self"); } - set { BackingStore?.Set("self", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -54,6 +39,7 @@ public ResourceTopLevelLinks() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -64,6 +50,7 @@ public ResourceTopLevelLinks() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.Headers.GeneratedCode.Models.ResourceTopLevelLinks(); } + /// /// The deserialization information for the current model /// @@ -76,6 +63,7 @@ public virtual IDictionary> GetFieldDeserializers() { "self", n => { Self = n.GetStringValue(); } }, }; } + /// /// Serializes information the current object /// @@ -89,3 +77,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/Headers/GeneratedCode/Models/ResourceType.cs b/test/OpenApiKiotaEndToEndTests/Headers/GeneratedCode/Models/ResourceType.cs index e5e44511d..78da84e0d 100644 --- a/test/OpenApiKiotaEndToEndTests/Headers/GeneratedCode/Models/ResourceType.cs +++ b/test/OpenApiKiotaEndToEndTests/Headers/GeneratedCode/Models/ResourceType.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 using System.Runtime.Serialization; using System; namespace OpenApiKiotaEndToEndTests.Headers.GeneratedCode.Models @@ -18,3 +20,4 @@ public enum ResourceType #pragma warning restore CS1591 } } + diff --git a/test/OpenApiKiotaEndToEndTests/Headers/GeneratedCode/Models/ToManyLanguageInRequest.cs b/test/OpenApiKiotaEndToEndTests/Headers/GeneratedCode/Models/ToManyLanguageInRequest.cs index b082459ef..739238660 100644 --- a/test/OpenApiKiotaEndToEndTests/Headers/GeneratedCode/Models/ToManyLanguageInRequest.cs +++ b/test/OpenApiKiotaEndToEndTests/Headers/GeneratedCode/Models/ToManyLanguageInRequest.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,38 +17,21 @@ public partial class ToManyLanguageInRequest : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The data property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public List? Data { get { return BackingStore?.Get?>("data"); } set { BackingStore?.Set("data", value); } } -#nullable restore -#else - public List Data - { - get { return BackingStore?.Get>("data"); } - set { BackingStore?.Set("data", value); } - } -#endif + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.Headers.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.Headers.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -54,6 +39,7 @@ public ToManyLanguageInRequest() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -64,6 +50,7 @@ public ToManyLanguageInRequest() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.Headers.GeneratedCode.Models.ToManyLanguageInRequest(); } + /// /// The deserialization information for the current model /// @@ -76,6 +63,7 @@ public virtual IDictionary> GetFieldDeserializers() { "meta", n => { Meta = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.Headers.GeneratedCode.Models.Meta.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -89,3 +77,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/Headers/GeneratedCode/Models/ToManyLanguageInResponse.cs b/test/OpenApiKiotaEndToEndTests/Headers/GeneratedCode/Models/ToManyLanguageInResponse.cs index d65576dc3..fe5c9aef6 100644 --- a/test/OpenApiKiotaEndToEndTests/Headers/GeneratedCode/Models/ToManyLanguageInResponse.cs +++ b/test/OpenApiKiotaEndToEndTests/Headers/GeneratedCode/Models/ToManyLanguageInResponse.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,54 +17,28 @@ public partial class ToManyLanguageInResponse : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The data property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public List? Data { get { return BackingStore?.Get?>("data"); } set { BackingStore?.Set("data", value); } } -#nullable restore -#else - public List Data - { - get { return BackingStore?.Get>("data"); } - set { BackingStore?.Set("data", value); } - } -#endif + /// The links property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.Headers.GeneratedCode.Models.RelationshipLinks? Links { get { return BackingStore?.Get("links"); } set { BackingStore?.Set("links", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.Headers.GeneratedCode.Models.RelationshipLinks Links - { - get { return BackingStore?.Get("links"); } - set { BackingStore?.Set("links", value); } - } -#endif + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.Headers.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.Headers.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -70,6 +46,7 @@ public ToManyLanguageInResponse() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -80,6 +57,7 @@ public ToManyLanguageInResponse() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.Headers.GeneratedCode.Models.ToManyLanguageInResponse(); } + /// /// The deserialization information for the current model /// @@ -93,6 +71,7 @@ public virtual IDictionary> GetFieldDeserializers() { "meta", n => { Meta = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.Headers.GeneratedCode.Models.Meta.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -107,3 +86,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/Headers/GeneratedCode/Models/UpdateCountryRequestDocument.cs b/test/OpenApiKiotaEndToEndTests/Headers/GeneratedCode/Models/UpdateCountryRequestDocument.cs index f2409ce1e..5b4c49efe 100644 --- a/test/OpenApiKiotaEndToEndTests/Headers/GeneratedCode/Models/UpdateCountryRequestDocument.cs +++ b/test/OpenApiKiotaEndToEndTests/Headers/GeneratedCode/Models/UpdateCountryRequestDocument.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,38 +17,21 @@ public partial class UpdateCountryRequestDocument : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The data property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.Headers.GeneratedCode.Models.DataInUpdateCountryRequest? Data { get { return BackingStore?.Get("data"); } set { BackingStore?.Set("data", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.Headers.GeneratedCode.Models.DataInUpdateCountryRequest Data - { - get { return BackingStore?.Get("data"); } - set { BackingStore?.Set("data", value); } - } -#endif + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.Headers.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.Headers.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -54,6 +39,7 @@ public UpdateCountryRequestDocument() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -64,6 +50,7 @@ public UpdateCountryRequestDocument() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.Headers.GeneratedCode.Models.UpdateCountryRequestDocument(); } + /// /// The deserialization information for the current model /// @@ -76,6 +63,7 @@ public virtual IDictionary> GetFieldDeserializers() { "meta", n => { Meta = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.Headers.GeneratedCode.Models.Meta.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -89,3 +77,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/Links/AlternateOpenApiRouteTests.cs b/test/OpenApiKiotaEndToEndTests/Links/AlternateOpenApiRouteTests.cs index 52d39ee30..411471c68 100644 --- a/test/OpenApiKiotaEndToEndTests/Links/AlternateOpenApiRouteTests.cs +++ b/test/OpenApiKiotaEndToEndTests/Links/AlternateOpenApiRouteTests.cs @@ -45,7 +45,7 @@ await _testContext.RunOnDatabaseAsync(async dbContext => }); // Act - ExcursionPrimaryResponseDocument? response = await apiClient.Excursions[excursion.StringId].GetAsync(); + ExcursionPrimaryResponseDocument? response = await apiClient.Excursions[excursion.StringId!].GetAsync(); // Assert response.ShouldNotBeNull(); diff --git a/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Accommodations/AccommodationsRequestBuilder.cs b/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Accommodations/AccommodationsRequestBuilder.cs index 5314250e3..705670741 100644 --- a/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Accommodations/AccommodationsRequestBuilder.cs +++ b/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Accommodations/AccommodationsRequestBuilder.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -30,6 +32,7 @@ public partial class AccommodationsRequestBuilder : BaseRequestBuilder return new global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Accommodations.Item.AccommodationsItemRequestBuilder(urlTplParams, RequestAdapter); } } + /// /// Instantiates a new and sets the default values. /// @@ -38,6 +41,7 @@ public partial class AccommodationsRequestBuilder : BaseRequestBuilder public AccommodationsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/accommodations{?query*}", pathParameters) { } + /// /// Instantiates a new and sets the default values. /// @@ -46,6 +50,7 @@ public AccommodationsRequestBuilder(Dictionary pathParameters, I public AccommodationsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/accommodations{?query*}", rawUrl) { } + /// /// Retrieves a collection of accommodations. /// @@ -53,15 +58,8 @@ public AccommodationsRequestBuilder(string rawUrl, IRequestAdapter requestAdapte /// Cancellation token to use when cancelling requests /// Configuration for the request such as headers, query parameters, and middleware options. /// When receiving a 400 status code -#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> { @@ -69,23 +67,18 @@ public AccommodationsRequestBuilder(string rawUrl, IRequestAdapter requestAdapte }; return await RequestAdapter.SendAsync(requestInfo, global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.AccommodationCollectionResponseDocument.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// /// 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 HeadAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { -#nullable restore -#else - public async Task HeadAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) - { -#endif var requestInfo = ToHeadRequestInformation(requestConfiguration); await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); } + /// /// Creates a new accommodation. /// @@ -98,15 +91,8 @@ public async Task HeadAsync(ActionWhen receiving a 404 status code /// When receiving a 409 status code /// When receiving a 422 status code -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public async Task PostAsync(global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.CreateAccommodationRequestDocument body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { -#nullable restore -#else - public async Task PostAsync(global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.CreateAccommodationRequestDocument body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) - { -#endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> @@ -119,58 +105,40 @@ public async Task HeadAsync(Action(requestInfo, global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.AccommodationPrimaryResponseDocument.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } + /// /// Retrieves a collection of accommodations. /// /// A /// 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(Method.GET, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/vnd.api+json"); return requestInfo; } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// /// A /// 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 ToHeadRequestInformation(Action>? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToHeadRequestInformation(Action> requestConfiguration = default) - { -#endif var requestInfo = new RequestInformation(Method.HEAD, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); return requestInfo; } + /// /// Creates a new accommodation. /// /// A /// 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(global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.CreateAccommodationRequestDocument body, Action>? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToPostRequestInformation(global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.CreateAccommodationRequestDocument body, Action> requestConfiguration = default) - { -#endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); @@ -178,6 +146,7 @@ public RequestInformation ToPostRequestInformation(global::OpenApiKiotaEndToEndT requestInfo.SetContentFromParsable(RequestAdapter, "application/vnd.api+json", body); return requestInfo; } + /// /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. /// @@ -187,6 +156,7 @@ public RequestInformation ToPostRequestInformation(global::OpenApiKiotaEndToEndT { return new global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Accommodations.AccommodationsRequestBuilder(rawUrl, RequestAdapter); } + /// /// Retrieves a collection of accommodations. /// @@ -194,16 +164,10 @@ public RequestInformation ToPostRequestInformation(global::OpenApiKiotaEndToEndT public partial class AccommodationsRequestBuilderGetQueryParameters { /// For syntax, see the documentation for the [`include`](https://www.jsonapi.net/usage/reading/including-relationships.html)/[`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// @@ -211,16 +175,10 @@ public partial class AccommodationsRequestBuilderGetQueryParameters public partial class AccommodationsRequestBuilderHeadQueryParameters { /// For syntax, see the documentation for the [`include`](https://www.jsonapi.net/usage/reading/including-relationships.html)/[`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } + /// /// Creates a new accommodation. /// @@ -228,16 +186,10 @@ public partial class AccommodationsRequestBuilderHeadQueryParameters public partial class AccommodationsRequestBuilderPostQueryParameters { /// For syntax, see the documentation for the [`include`](https://www.jsonapi.net/usage/reading/including-relationships.html)/[`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Accommodations/Item/AccommodationsItemRequestBuilder.cs b/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Accommodations/Item/AccommodationsItemRequestBuilder.cs index becc527a6..0ed3b3b97 100644 --- a/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Accommodations/Item/AccommodationsItemRequestBuilder.cs +++ b/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Accommodations/Item/AccommodationsItemRequestBuilder.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -25,6 +27,7 @@ public partial class AccommodationsItemRequestBuilder : BaseRequestBuilder public AccommodationsItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/accommodations/{id}{?query*}", pathParameters) { } + /// /// Instantiates a new and sets the default values. /// @@ -33,21 +36,15 @@ public AccommodationsItemRequestBuilder(Dictionary pathParameter public AccommodationsItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/accommodations/{id}{?query*}", rawUrl) { } + /// /// Deletes an existing accommodation by its identifier. /// /// Cancellation token to use when cancelling requests /// Configuration for the request such as headers, query parameters, and middleware options. /// When receiving a 404 status code -#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> { @@ -55,6 +52,7 @@ public async Task DeleteAsync(Action /// Retrieves an individual accommodation by its identifier. /// @@ -63,15 +61,8 @@ public async Task DeleteAsync(ActionConfiguration for the request such as headers, query parameters, and middleware options. /// When receiving a 400 status code /// When receiving a 404 status code -#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> { @@ -80,23 +71,18 @@ public async Task DeleteAsync(Action(requestInfo, global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.AccommodationPrimaryResponseDocument.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// /// 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 HeadAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { -#nullable restore -#else - public async Task HeadAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) - { -#endif var requestInfo = ToHeadRequestInformation(requestConfiguration); await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); } + /// /// Updates an existing accommodation. /// @@ -108,15 +94,8 @@ public async Task HeadAsync(ActionWhen receiving a 404 status code /// When receiving a 409 status code /// When receiving a 422 status code -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public async Task PatchAsync(global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.UpdateAccommodationRequestDocument body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { -#nullable restore -#else - public async Task PatchAsync(global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.UpdateAccommodationRequestDocument body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) - { -#endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> @@ -128,77 +107,53 @@ public async Task HeadAsync(Action(requestInfo, global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.AccommodationPrimaryResponseDocument.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } + /// /// Deletes an existing accommodation by its identifier. /// /// A /// 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(Method.DELETE, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/vnd.api+json"); return requestInfo; } + /// /// Retrieves an individual accommodation by its identifier. /// /// A /// 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(Method.GET, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/vnd.api+json"); return requestInfo; } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// /// A /// 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 ToHeadRequestInformation(Action>? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToHeadRequestInformation(Action> requestConfiguration = default) - { -#endif var requestInfo = new RequestInformation(Method.HEAD, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); return requestInfo; } + /// /// Updates an existing accommodation. /// /// A /// 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(global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.UpdateAccommodationRequestDocument body, Action>? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToPatchRequestInformation(global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.UpdateAccommodationRequestDocument body, Action> requestConfiguration = default) - { -#endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); @@ -206,6 +161,7 @@ public RequestInformation ToPatchRequestInformation(global::OpenApiKiotaEndToEnd requestInfo.SetContentFromParsable(RequestAdapter, "application/vnd.api+json", body); return requestInfo; } + /// /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. /// @@ -215,6 +171,7 @@ public RequestInformation ToPatchRequestInformation(global::OpenApiKiotaEndToEnd { return new global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Accommodations.Item.AccommodationsItemRequestBuilder(rawUrl, RequestAdapter); } + /// /// Retrieves an individual accommodation by its identifier. /// @@ -222,16 +179,10 @@ public RequestInformation ToPatchRequestInformation(global::OpenApiKiotaEndToEnd public partial class AccommodationsItemRequestBuilderGetQueryParameters { /// For syntax, see the documentation for the [`include`](https://www.jsonapi.net/usage/reading/including-relationships.html)/[`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// @@ -239,16 +190,10 @@ public partial class AccommodationsItemRequestBuilderGetQueryParameters public partial class AccommodationsItemRequestBuilderHeadQueryParameters { /// For syntax, see the documentation for the [`include`](https://www.jsonapi.net/usage/reading/including-relationships.html)/[`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } + /// /// Updates an existing accommodation. /// @@ -256,16 +201,10 @@ public partial class AccommodationsItemRequestBuilderHeadQueryParameters public partial class AccommodationsItemRequestBuilderPatchQueryParameters { /// For syntax, see the documentation for the [`include`](https://www.jsonapi.net/usage/reading/including-relationships.html)/[`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Excursions/ExcursionsRequestBuilder.cs b/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Excursions/ExcursionsRequestBuilder.cs index d8b33060f..997ed7048 100644 --- a/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Excursions/ExcursionsRequestBuilder.cs +++ b/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Excursions/ExcursionsRequestBuilder.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -30,6 +32,7 @@ public partial class ExcursionsRequestBuilder : BaseRequestBuilder return new global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Excursions.Item.ExcursionsItemRequestBuilder(urlTplParams, RequestAdapter); } } + /// /// Instantiates a new and sets the default values. /// @@ -38,6 +41,7 @@ public partial class ExcursionsRequestBuilder : BaseRequestBuilder public ExcursionsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/excursions{?query*}", pathParameters) { } + /// /// Instantiates a new and sets the default values. /// @@ -46,6 +50,7 @@ public ExcursionsRequestBuilder(Dictionary pathParameters, IRequ public ExcursionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/excursions{?query*}", rawUrl) { } + /// /// Retrieves a collection of excursions. /// @@ -53,15 +58,8 @@ public ExcursionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : /// Cancellation token to use when cancelling requests /// Configuration for the request such as headers, query parameters, and middleware options. /// When receiving a 400 status code -#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> { @@ -69,23 +67,18 @@ public ExcursionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : }; return await RequestAdapter.SendAsync(requestInfo, global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.ExcursionCollectionResponseDocument.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// /// 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 HeadAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { -#nullable restore -#else - public async Task HeadAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) - { -#endif var requestInfo = ToHeadRequestInformation(requestConfiguration); await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); } + /// /// Creates a new excursion. /// @@ -98,15 +91,8 @@ public async Task HeadAsync(ActionWhen receiving a 404 status code /// When receiving a 409 status code /// When receiving a 422 status code -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public async Task PostAsync(global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.CreateExcursionRequestDocument body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { -#nullable restore -#else - public async Task PostAsync(global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.CreateExcursionRequestDocument body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) - { -#endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> @@ -119,58 +105,40 @@ public async Task HeadAsync(Action(requestInfo, global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.ExcursionPrimaryResponseDocument.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } + /// /// Retrieves a collection of excursions. /// /// A /// 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(Method.GET, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/vnd.api+json"); return requestInfo; } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// /// A /// 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 ToHeadRequestInformation(Action>? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToHeadRequestInformation(Action> requestConfiguration = default) - { -#endif var requestInfo = new RequestInformation(Method.HEAD, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); return requestInfo; } + /// /// Creates a new excursion. /// /// A /// 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(global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.CreateExcursionRequestDocument body, Action>? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToPostRequestInformation(global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.CreateExcursionRequestDocument body, Action> requestConfiguration = default) - { -#endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); @@ -178,6 +146,7 @@ public RequestInformation ToPostRequestInformation(global::OpenApiKiotaEndToEndT requestInfo.SetContentFromParsable(RequestAdapter, "application/vnd.api+json", body); return requestInfo; } + /// /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. /// @@ -187,6 +156,7 @@ public RequestInformation ToPostRequestInformation(global::OpenApiKiotaEndToEndT { return new global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Excursions.ExcursionsRequestBuilder(rawUrl, RequestAdapter); } + /// /// Retrieves a collection of excursions. /// @@ -194,16 +164,10 @@ public RequestInformation ToPostRequestInformation(global::OpenApiKiotaEndToEndT public partial class ExcursionsRequestBuilderGetQueryParameters { /// For syntax, see the documentation for the [`include`](https://www.jsonapi.net/usage/reading/including-relationships.html)/[`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// @@ -211,16 +175,10 @@ public partial class ExcursionsRequestBuilderGetQueryParameters public partial class ExcursionsRequestBuilderHeadQueryParameters { /// For syntax, see the documentation for the [`include`](https://www.jsonapi.net/usage/reading/including-relationships.html)/[`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } + /// /// Creates a new excursion. /// @@ -228,16 +186,10 @@ public partial class ExcursionsRequestBuilderHeadQueryParameters public partial class ExcursionsRequestBuilderPostQueryParameters { /// For syntax, see the documentation for the [`include`](https://www.jsonapi.net/usage/reading/including-relationships.html)/[`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Excursions/Item/ExcursionsItemRequestBuilder.cs b/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Excursions/Item/ExcursionsItemRequestBuilder.cs index 7df1c2499..44987232c 100644 --- a/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Excursions/Item/ExcursionsItemRequestBuilder.cs +++ b/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Excursions/Item/ExcursionsItemRequestBuilder.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -25,6 +27,7 @@ public partial class ExcursionsItemRequestBuilder : BaseRequestBuilder public ExcursionsItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/excursions/{id}{?query*}", pathParameters) { } + /// /// Instantiates a new and sets the default values. /// @@ -33,21 +36,15 @@ public ExcursionsItemRequestBuilder(Dictionary pathParameters, I public ExcursionsItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/excursions/{id}{?query*}", rawUrl) { } + /// /// Deletes an existing excursion by its identifier. /// /// Cancellation token to use when cancelling requests /// Configuration for the request such as headers, query parameters, and middleware options. /// When receiving a 404 status code -#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> { @@ -55,6 +52,7 @@ public async Task DeleteAsync(Action /// Retrieves an individual excursion by its identifier. /// @@ -63,15 +61,8 @@ public async Task DeleteAsync(ActionConfiguration for the request such as headers, query parameters, and middleware options. /// When receiving a 400 status code /// When receiving a 404 status code -#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> { @@ -80,23 +71,18 @@ public async Task DeleteAsync(Action(requestInfo, global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.ExcursionPrimaryResponseDocument.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// /// 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 HeadAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { -#nullable restore -#else - public async Task HeadAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) - { -#endif var requestInfo = ToHeadRequestInformation(requestConfiguration); await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); } + /// /// Updates an existing excursion. /// @@ -108,15 +94,8 @@ public async Task HeadAsync(ActionWhen receiving a 404 status code /// When receiving a 409 status code /// When receiving a 422 status code -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public async Task PatchAsync(global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.UpdateExcursionRequestDocument body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { -#nullable restore -#else - public async Task PatchAsync(global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.UpdateExcursionRequestDocument body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) - { -#endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> @@ -128,77 +107,53 @@ public async Task HeadAsync(Action(requestInfo, global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.ExcursionPrimaryResponseDocument.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } + /// /// Deletes an existing excursion by its identifier. /// /// A /// 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(Method.DELETE, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/vnd.api+json"); return requestInfo; } + /// /// Retrieves an individual excursion by its identifier. /// /// A /// 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(Method.GET, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/vnd.api+json"); return requestInfo; } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// /// A /// 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 ToHeadRequestInformation(Action>? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToHeadRequestInformation(Action> requestConfiguration = default) - { -#endif var requestInfo = new RequestInformation(Method.HEAD, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); return requestInfo; } + /// /// Updates an existing excursion. /// /// A /// 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(global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.UpdateExcursionRequestDocument body, Action>? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToPatchRequestInformation(global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.UpdateExcursionRequestDocument body, Action> requestConfiguration = default) - { -#endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); @@ -206,6 +161,7 @@ public RequestInformation ToPatchRequestInformation(global::OpenApiKiotaEndToEnd requestInfo.SetContentFromParsable(RequestAdapter, "application/vnd.api+json", body); return requestInfo; } + /// /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. /// @@ -215,6 +171,7 @@ public RequestInformation ToPatchRequestInformation(global::OpenApiKiotaEndToEnd { return new global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Excursions.Item.ExcursionsItemRequestBuilder(rawUrl, RequestAdapter); } + /// /// Retrieves an individual excursion by its identifier. /// @@ -222,16 +179,10 @@ public RequestInformation ToPatchRequestInformation(global::OpenApiKiotaEndToEnd public partial class ExcursionsItemRequestBuilderGetQueryParameters { /// For syntax, see the documentation for the [`include`](https://www.jsonapi.net/usage/reading/including-relationships.html)/[`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// @@ -239,16 +190,10 @@ public partial class ExcursionsItemRequestBuilderGetQueryParameters public partial class ExcursionsItemRequestBuilderHeadQueryParameters { /// For syntax, see the documentation for the [`include`](https://www.jsonapi.net/usage/reading/including-relationships.html)/[`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } + /// /// Updates an existing excursion. /// @@ -256,16 +201,10 @@ public partial class ExcursionsItemRequestBuilderHeadQueryParameters public partial class ExcursionsItemRequestBuilderPatchQueryParameters { /// For syntax, see the documentation for the [`include`](https://www.jsonapi.net/usage/reading/including-relationships.html)/[`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/LinksClient.cs b/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/LinksClient.cs index a4348f6ac..8e68379c1 100644 --- a/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/LinksClient.cs +++ b/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/LinksClient.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Store; @@ -28,21 +30,25 @@ public partial class LinksClient : BaseRequestBuilder { get => new global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Accommodations.AccommodationsRequestBuilder(PathParameters, RequestAdapter); } + /// The excursions property public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Excursions.ExcursionsRequestBuilder Excursions { get => new global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Excursions.ExcursionsRequestBuilder(PathParameters, RequestAdapter); } + /// The transports property public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Transports.TransportsRequestBuilder Transports { get => new global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Transports.TransportsRequestBuilder(PathParameters, RequestAdapter); } + /// The vacations property public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Vacations.VacationsRequestBuilder Vacations { get => new global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Vacations.VacationsRequestBuilder(PathParameters, RequestAdapter); } + /// /// Instantiates a new and sets the default values. /// @@ -67,3 +73,4 @@ public partial class LinksClient : BaseRequestBuilder } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/AccommodationAttributesInResponse.cs b/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/AccommodationAttributesInResponse.cs index 3cea96e01..a49a4b2cf 100644 --- a/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/AccommodationAttributesInResponse.cs +++ b/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/AccommodationAttributesInResponse.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -14,23 +16,15 @@ public partial class AccommodationAttributesInResponse : IBackedModel, IParsable #pragma warning restore CS1591 { /// The address property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Address { get { return BackingStore?.Get("address"); } set { BackingStore?.Set("address", value); } } -#nullable restore -#else - public string Address - { - get { return BackingStore?.Get("address"); } - set { BackingStore?.Set("address", value); } - } -#endif + /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// /// Instantiates a new and sets the default values. /// @@ -38,6 +32,7 @@ public AccommodationAttributesInResponse() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -48,6 +43,7 @@ public AccommodationAttributesInResponse() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.AccommodationAttributesInResponse(); } + /// /// The deserialization information for the current model /// @@ -59,6 +55,7 @@ public virtual IDictionary> GetFieldDeserializers() { "address", n => { Address = n.GetStringValue(); } }, }; } + /// /// Serializes information the current object /// @@ -71,3 +68,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/AccommodationCollectionResponseDocument.cs b/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/AccommodationCollectionResponseDocument.cs index 4a1960ea2..94ef84947 100644 --- a/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/AccommodationCollectionResponseDocument.cs +++ b/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/AccommodationCollectionResponseDocument.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,70 +17,35 @@ public partial class AccommodationCollectionResponseDocument : IBackedModel, IPa { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The data property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public List? Data { get { return BackingStore?.Get?>("data"); } set { BackingStore?.Set("data", value); } } -#nullable restore -#else - public List Data - { - get { return BackingStore?.Get>("data"); } - set { BackingStore?.Set("data", value); } - } -#endif + /// The included property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public List? Included { get { return BackingStore?.Get?>("included"); } set { BackingStore?.Set("included", value); } } -#nullable restore -#else - public List Included - { - get { return BackingStore?.Get>("included"); } - set { BackingStore?.Set("included", value); } - } -#endif + /// The links property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.ResourceCollectionTopLevelLinks? Links { get { return BackingStore?.Get("links"); } set { BackingStore?.Set("links", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.ResourceCollectionTopLevelLinks Links - { - get { return BackingStore?.Get("links"); } - set { BackingStore?.Set("links", value); } - } -#endif + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -86,6 +53,7 @@ public AccommodationCollectionResponseDocument() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -96,6 +64,7 @@ public AccommodationCollectionResponseDocument() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.AccommodationCollectionResponseDocument(); } + /// /// The deserialization information for the current model /// @@ -110,6 +79,7 @@ public virtual IDictionary> GetFieldDeserializers() { "meta", n => { Meta = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.Meta.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -125,3 +95,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/AccommodationDataInResponse.cs b/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/AccommodationDataInResponse.cs index e07db96af..dda9fd649 100644 --- a/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/AccommodationDataInResponse.cs +++ b/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/AccommodationDataInResponse.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -13,53 +15,26 @@ public partial class AccommodationDataInResponse : global::OpenApiKiotaEndToEndT #pragma warning restore CS1591 { /// The attributes property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.AccommodationAttributesInResponse? Attributes { get { return BackingStore?.Get("attributes"); } set { BackingStore?.Set("attributes", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.AccommodationAttributesInResponse Attributes - { - get { return BackingStore?.Get("attributes"); } - set { BackingStore?.Set("attributes", value); } - } -#endif + /// The id property -#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 links property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.ResourceLinks? Links { get { return BackingStore?.Get("links"); } set { BackingStore?.Set("links", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.ResourceLinks Links - { - get { return BackingStore?.Get("links"); } - set { BackingStore?.Set("links", value); } - } -#endif + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -70,6 +45,7 @@ public string Id _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.AccommodationDataInResponse(); } + /// /// The deserialization information for the current model /// @@ -83,6 +59,7 @@ public override IDictionary> GetFieldDeserializers() { "links", n => { Links = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.ResourceLinks.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -98,3 +75,4 @@ public override void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/AccommodationIdentifierInRequest.cs b/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/AccommodationIdentifierInRequest.cs index d080e9e62..33ad8b3df 100644 --- a/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/AccommodationIdentifierInRequest.cs +++ b/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/AccommodationIdentifierInRequest.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,44 +17,28 @@ public partial class AccommodationIdentifierInRequest : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The id property -#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 meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// The type property public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.AccommodationResourceType? Type { get { return BackingStore?.Get("type"); } set { BackingStore?.Set("type", value); } } + /// /// Instantiates a new and sets the default values. /// @@ -60,6 +46,7 @@ public AccommodationIdentifierInRequest() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -70,6 +57,7 @@ public AccommodationIdentifierInRequest() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.AccommodationIdentifierInRequest(); } + /// /// The deserialization information for the current model /// @@ -83,6 +71,7 @@ public virtual IDictionary> GetFieldDeserializers() { "type", n => { Type = n.GetEnumValue(); } }, }; } + /// /// Serializes information the current object /// @@ -97,3 +86,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/AccommodationIdentifierInResponse.cs b/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/AccommodationIdentifierInResponse.cs index 1b1df3c21..0abe295f7 100644 --- a/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/AccommodationIdentifierInResponse.cs +++ b/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/AccommodationIdentifierInResponse.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,44 +17,28 @@ public partial class AccommodationIdentifierInResponse : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The id property -#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 meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// The type property public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.AccommodationResourceType? Type { get { return BackingStore?.Get("type"); } set { BackingStore?.Set("type", value); } } + /// /// Instantiates a new and sets the default values. /// @@ -60,6 +46,7 @@ public AccommodationIdentifierInResponse() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -70,6 +57,7 @@ public AccommodationIdentifierInResponse() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.AccommodationIdentifierInResponse(); } + /// /// The deserialization information for the current model /// @@ -83,6 +71,7 @@ public virtual IDictionary> GetFieldDeserializers() { "type", n => { Type = n.GetEnumValue(); } }, }; } + /// /// Serializes information the current object /// @@ -97,3 +86,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/AccommodationIdentifierResponseDocument.cs b/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/AccommodationIdentifierResponseDocument.cs index e94205c0c..23ce06fee 100644 --- a/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/AccommodationIdentifierResponseDocument.cs +++ b/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/AccommodationIdentifierResponseDocument.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,54 +17,28 @@ public partial class AccommodationIdentifierResponseDocument : IBackedModel, IPa { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The data property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.AccommodationIdentifierInResponse? Data { get { return BackingStore?.Get("data"); } set { BackingStore?.Set("data", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.AccommodationIdentifierInResponse Data - { - get { return BackingStore?.Get("data"); } - set { BackingStore?.Set("data", value); } - } -#endif + /// The links property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.ResourceIdentifierTopLevelLinks? Links { get { return BackingStore?.Get("links"); } set { BackingStore?.Set("links", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.ResourceIdentifierTopLevelLinks Links - { - get { return BackingStore?.Get("links"); } - set { BackingStore?.Set("links", value); } - } -#endif + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -70,6 +46,7 @@ public AccommodationIdentifierResponseDocument() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -80,6 +57,7 @@ public AccommodationIdentifierResponseDocument() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.AccommodationIdentifierResponseDocument(); } + /// /// The deserialization information for the current model /// @@ -93,6 +71,7 @@ public virtual IDictionary> GetFieldDeserializers() { "meta", n => { Meta = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.Meta.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -107,3 +86,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/AccommodationPrimaryResponseDocument.cs b/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/AccommodationPrimaryResponseDocument.cs index d51eb1f50..6afc0d755 100644 --- a/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/AccommodationPrimaryResponseDocument.cs +++ b/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/AccommodationPrimaryResponseDocument.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,70 +17,35 @@ public partial class AccommodationPrimaryResponseDocument : IBackedModel, IParsa { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The data property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.AccommodationDataInResponse? Data { get { return BackingStore?.Get("data"); } set { BackingStore?.Set("data", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.AccommodationDataInResponse Data - { - get { return BackingStore?.Get("data"); } - set { BackingStore?.Set("data", value); } - } -#endif + /// The included property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public List? Included { get { return BackingStore?.Get?>("included"); } set { BackingStore?.Set("included", value); } } -#nullable restore -#else - public List Included - { - get { return BackingStore?.Get>("included"); } - set { BackingStore?.Set("included", value); } - } -#endif + /// The links property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.ResourceTopLevelLinks? Links { get { return BackingStore?.Get("links"); } set { BackingStore?.Set("links", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.ResourceTopLevelLinks Links - { - get { return BackingStore?.Get("links"); } - set { BackingStore?.Set("links", value); } - } -#endif + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -86,6 +53,7 @@ public AccommodationPrimaryResponseDocument() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -96,6 +64,7 @@ public AccommodationPrimaryResponseDocument() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.AccommodationPrimaryResponseDocument(); } + /// /// The deserialization information for the current model /// @@ -110,6 +79,7 @@ public virtual IDictionary> GetFieldDeserializers() { "meta", n => { Meta = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.Meta.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -125,3 +95,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/AccommodationResourceType.cs b/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/AccommodationResourceType.cs index a98ba077a..69865a52d 100644 --- a/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/AccommodationResourceType.cs +++ b/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/AccommodationResourceType.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 using System.Runtime.Serialization; using System; namespace OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models @@ -14,3 +16,4 @@ public enum AccommodationResourceType #pragma warning restore CS1591 } } + diff --git a/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/AccommodationSecondaryResponseDocument.cs b/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/AccommodationSecondaryResponseDocument.cs index c8fef5035..f5823ceb3 100644 --- a/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/AccommodationSecondaryResponseDocument.cs +++ b/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/AccommodationSecondaryResponseDocument.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,70 +17,35 @@ public partial class AccommodationSecondaryResponseDocument : IBackedModel, IPar { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The data property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.AccommodationDataInResponse? Data { get { return BackingStore?.Get("data"); } set { BackingStore?.Set("data", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.AccommodationDataInResponse Data - { - get { return BackingStore?.Get("data"); } - set { BackingStore?.Set("data", value); } - } -#endif + /// The included property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public List? Included { get { return BackingStore?.Get?>("included"); } set { BackingStore?.Set("included", value); } } -#nullable restore -#else - public List Included - { - get { return BackingStore?.Get>("included"); } - set { BackingStore?.Set("included", value); } - } -#endif + /// The links property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.ResourceTopLevelLinks? Links { get { return BackingStore?.Get("links"); } set { BackingStore?.Set("links", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.ResourceTopLevelLinks Links - { - get { return BackingStore?.Get("links"); } - set { BackingStore?.Set("links", value); } - } -#endif + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -86,6 +53,7 @@ public AccommodationSecondaryResponseDocument() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -96,6 +64,7 @@ public AccommodationSecondaryResponseDocument() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.AccommodationSecondaryResponseDocument(); } + /// /// The deserialization information for the current model /// @@ -110,6 +79,7 @@ public virtual IDictionary> GetFieldDeserializers() { "meta", n => { Meta = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.Meta.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -125,3 +95,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/AttributesInCreateAccommodationRequest.cs b/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/AttributesInCreateAccommodationRequest.cs index 2fb3152c0..f8f23ec3c 100644 --- a/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/AttributesInCreateAccommodationRequest.cs +++ b/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/AttributesInCreateAccommodationRequest.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -14,23 +16,15 @@ public partial class AttributesInCreateAccommodationRequest : IBackedModel, IPar #pragma warning restore CS1591 { /// The address property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Address { get { return BackingStore?.Get("address"); } set { BackingStore?.Set("address", value); } } -#nullable restore -#else - public string Address - { - get { return BackingStore?.Get("address"); } - set { BackingStore?.Set("address", value); } - } -#endif + /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// /// Instantiates a new and sets the default values. /// @@ -38,6 +32,7 @@ public AttributesInCreateAccommodationRequest() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -48,6 +43,7 @@ public AttributesInCreateAccommodationRequest() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.AttributesInCreateAccommodationRequest(); } + /// /// The deserialization information for the current model /// @@ -59,6 +55,7 @@ public virtual IDictionary> GetFieldDeserializers() { "address", n => { Address = n.GetStringValue(); } }, }; } + /// /// Serializes information the current object /// @@ -71,3 +68,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/AttributesInCreateExcursionRequest.cs b/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/AttributesInCreateExcursionRequest.cs index ffe0f5157..1121ff4e2 100644 --- a/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/AttributesInCreateExcursionRequest.cs +++ b/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/AttributesInCreateExcursionRequest.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,28 +17,21 @@ public partial class AttributesInCreateExcursionRequest : IBackedModel, IParsabl { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The description property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Description { get { return BackingStore?.Get("description"); } set { BackingStore?.Set("description", value); } } -#nullable restore -#else - public string Description - { - get { return BackingStore?.Get("description"); } - set { BackingStore?.Set("description", value); } - } -#endif + /// The occursAt property public DateTimeOffset? OccursAt { get { return BackingStore?.Get("occursAt"); } set { BackingStore?.Set("occursAt", value); } } + /// /// Instantiates a new and sets the default values. /// @@ -44,6 +39,7 @@ public AttributesInCreateExcursionRequest() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -54,6 +50,7 @@ public AttributesInCreateExcursionRequest() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.AttributesInCreateExcursionRequest(); } + /// /// The deserialization information for the current model /// @@ -66,6 +63,7 @@ public virtual IDictionary> GetFieldDeserializers() { "occursAt", n => { OccursAt = n.GetDateTimeOffsetValue(); } }, }; } + /// /// Serializes information the current object /// @@ -79,3 +77,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/AttributesInCreateTransportRequest.cs b/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/AttributesInCreateTransportRequest.cs index b97f28d99..e50a8732a 100644 --- a/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/AttributesInCreateTransportRequest.cs +++ b/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/AttributesInCreateTransportRequest.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,18 +17,21 @@ public partial class AttributesInCreateTransportRequest : IBackedModel, IParsabl { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The durationInMinutes property public int? DurationInMinutes { get { return BackingStore?.Get("durationInMinutes"); } set { BackingStore?.Set("durationInMinutes", value); } } + /// The type property public int? Type { get { return BackingStore?.Get("type"); } set { BackingStore?.Set("type", value); } } + /// /// Instantiates a new and sets the default values. /// @@ -34,6 +39,7 @@ public AttributesInCreateTransportRequest() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -44,6 +50,7 @@ public AttributesInCreateTransportRequest() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.AttributesInCreateTransportRequest(); } + /// /// The deserialization information for the current model /// @@ -56,6 +63,7 @@ public virtual IDictionary> GetFieldDeserializers() { "type", n => { Type = n.GetIntValue(); } }, }; } + /// /// Serializes information the current object /// @@ -69,3 +77,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/AttributesInCreateVacationRequest.cs b/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/AttributesInCreateVacationRequest.cs index 4a5073ae5..96a1c7f1b 100644 --- a/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/AttributesInCreateVacationRequest.cs +++ b/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/AttributesInCreateVacationRequest.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,18 +17,21 @@ public partial class AttributesInCreateVacationRequest : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The endsAt property public DateTimeOffset? EndsAt { get { return BackingStore?.Get("endsAt"); } set { BackingStore?.Set("endsAt", value); } } + /// The startsAt property public DateTimeOffset? StartsAt { get { return BackingStore?.Get("startsAt"); } set { BackingStore?.Set("startsAt", value); } } + /// /// Instantiates a new and sets the default values. /// @@ -34,6 +39,7 @@ public AttributesInCreateVacationRequest() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -44,6 +50,7 @@ public AttributesInCreateVacationRequest() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.AttributesInCreateVacationRequest(); } + /// /// The deserialization information for the current model /// @@ -56,6 +63,7 @@ public virtual IDictionary> GetFieldDeserializers() { "startsAt", n => { StartsAt = n.GetDateTimeOffsetValue(); } }, }; } + /// /// Serializes information the current object /// @@ -69,3 +77,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/AttributesInUpdateAccommodationRequest.cs b/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/AttributesInUpdateAccommodationRequest.cs index e36045ac1..2618524e3 100644 --- a/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/AttributesInUpdateAccommodationRequest.cs +++ b/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/AttributesInUpdateAccommodationRequest.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -14,23 +16,15 @@ public partial class AttributesInUpdateAccommodationRequest : IBackedModel, IPar #pragma warning restore CS1591 { /// The address property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Address { get { return BackingStore?.Get("address"); } set { BackingStore?.Set("address", value); } } -#nullable restore -#else - public string Address - { - get { return BackingStore?.Get("address"); } - set { BackingStore?.Set("address", value); } - } -#endif + /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// /// Instantiates a new and sets the default values. /// @@ -38,6 +32,7 @@ public AttributesInUpdateAccommodationRequest() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -48,6 +43,7 @@ public AttributesInUpdateAccommodationRequest() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.AttributesInUpdateAccommodationRequest(); } + /// /// The deserialization information for the current model /// @@ -59,6 +55,7 @@ public virtual IDictionary> GetFieldDeserializers() { "address", n => { Address = n.GetStringValue(); } }, }; } + /// /// Serializes information the current object /// @@ -71,3 +68,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/AttributesInUpdateExcursionRequest.cs b/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/AttributesInUpdateExcursionRequest.cs index 8bf808465..9187cd420 100644 --- a/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/AttributesInUpdateExcursionRequest.cs +++ b/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/AttributesInUpdateExcursionRequest.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,28 +17,21 @@ public partial class AttributesInUpdateExcursionRequest : IBackedModel, IParsabl { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The description property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Description { get { return BackingStore?.Get("description"); } set { BackingStore?.Set("description", value); } } -#nullable restore -#else - public string Description - { - get { return BackingStore?.Get("description"); } - set { BackingStore?.Set("description", value); } - } -#endif + /// The occursAt property public DateTimeOffset? OccursAt { get { return BackingStore?.Get("occursAt"); } set { BackingStore?.Set("occursAt", value); } } + /// /// Instantiates a new and sets the default values. /// @@ -44,6 +39,7 @@ public AttributesInUpdateExcursionRequest() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -54,6 +50,7 @@ public AttributesInUpdateExcursionRequest() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.AttributesInUpdateExcursionRequest(); } + /// /// The deserialization information for the current model /// @@ -66,6 +63,7 @@ public virtual IDictionary> GetFieldDeserializers() { "occursAt", n => { OccursAt = n.GetDateTimeOffsetValue(); } }, }; } + /// /// Serializes information the current object /// @@ -79,3 +77,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/AttributesInUpdateTransportRequest.cs b/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/AttributesInUpdateTransportRequest.cs index 36ef3be69..e938a757d 100644 --- a/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/AttributesInUpdateTransportRequest.cs +++ b/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/AttributesInUpdateTransportRequest.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,18 +17,21 @@ public partial class AttributesInUpdateTransportRequest : IBackedModel, IParsabl { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The durationInMinutes property public int? DurationInMinutes { get { return BackingStore?.Get("durationInMinutes"); } set { BackingStore?.Set("durationInMinutes", value); } } + /// The type property public int? Type { get { return BackingStore?.Get("type"); } set { BackingStore?.Set("type", value); } } + /// /// Instantiates a new and sets the default values. /// @@ -34,6 +39,7 @@ public AttributesInUpdateTransportRequest() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -44,6 +50,7 @@ public AttributesInUpdateTransportRequest() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.AttributesInUpdateTransportRequest(); } + /// /// The deserialization information for the current model /// @@ -56,6 +63,7 @@ public virtual IDictionary> GetFieldDeserializers() { "type", n => { Type = n.GetIntValue(); } }, }; } + /// /// Serializes information the current object /// @@ -69,3 +77,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/AttributesInUpdateVacationRequest.cs b/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/AttributesInUpdateVacationRequest.cs index 4f260be2e..4158f2a95 100644 --- a/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/AttributesInUpdateVacationRequest.cs +++ b/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/AttributesInUpdateVacationRequest.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,18 +17,21 @@ public partial class AttributesInUpdateVacationRequest : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The endsAt property public DateTimeOffset? EndsAt { get { return BackingStore?.Get("endsAt"); } set { BackingStore?.Set("endsAt", value); } } + /// The startsAt property public DateTimeOffset? StartsAt { get { return BackingStore?.Get("startsAt"); } set { BackingStore?.Set("startsAt", value); } } + /// /// Instantiates a new and sets the default values. /// @@ -34,6 +39,7 @@ public AttributesInUpdateVacationRequest() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -44,6 +50,7 @@ public AttributesInUpdateVacationRequest() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.AttributesInUpdateVacationRequest(); } + /// /// The deserialization information for the current model /// @@ -56,6 +63,7 @@ public virtual IDictionary> GetFieldDeserializers() { "startsAt", n => { StartsAt = n.GetDateTimeOffsetValue(); } }, }; } + /// /// Serializes information the current object /// @@ -69,3 +77,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/CreateAccommodationRequestDocument.cs b/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/CreateAccommodationRequestDocument.cs index 610251c1f..90c113c12 100644 --- a/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/CreateAccommodationRequestDocument.cs +++ b/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/CreateAccommodationRequestDocument.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,38 +17,21 @@ public partial class CreateAccommodationRequestDocument : IBackedModel, IParsabl { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The data property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.DataInCreateAccommodationRequest? Data { get { return BackingStore?.Get("data"); } set { BackingStore?.Set("data", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.DataInCreateAccommodationRequest Data - { - get { return BackingStore?.Get("data"); } - set { BackingStore?.Set("data", value); } - } -#endif + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -54,6 +39,7 @@ public CreateAccommodationRequestDocument() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -64,6 +50,7 @@ public CreateAccommodationRequestDocument() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.CreateAccommodationRequestDocument(); } + /// /// The deserialization information for the current model /// @@ -76,6 +63,7 @@ public virtual IDictionary> GetFieldDeserializers() { "meta", n => { Meta = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.Meta.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -89,3 +77,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/CreateExcursionRequestDocument.cs b/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/CreateExcursionRequestDocument.cs index 80901fcc3..a67caee98 100644 --- a/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/CreateExcursionRequestDocument.cs +++ b/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/CreateExcursionRequestDocument.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,38 +17,21 @@ public partial class CreateExcursionRequestDocument : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The data property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.DataInCreateExcursionRequest? Data { get { return BackingStore?.Get("data"); } set { BackingStore?.Set("data", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.DataInCreateExcursionRequest Data - { - get { return BackingStore?.Get("data"); } - set { BackingStore?.Set("data", value); } - } -#endif + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -54,6 +39,7 @@ public CreateExcursionRequestDocument() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -64,6 +50,7 @@ public CreateExcursionRequestDocument() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.CreateExcursionRequestDocument(); } + /// /// The deserialization information for the current model /// @@ -76,6 +63,7 @@ public virtual IDictionary> GetFieldDeserializers() { "meta", n => { Meta = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.Meta.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -89,3 +77,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/CreateTransportRequestDocument.cs b/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/CreateTransportRequestDocument.cs index 8c2ec168f..890731a44 100644 --- a/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/CreateTransportRequestDocument.cs +++ b/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/CreateTransportRequestDocument.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,38 +17,21 @@ public partial class CreateTransportRequestDocument : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The data property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.DataInCreateTransportRequest? Data { get { return BackingStore?.Get("data"); } set { BackingStore?.Set("data", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.DataInCreateTransportRequest Data - { - get { return BackingStore?.Get("data"); } - set { BackingStore?.Set("data", value); } - } -#endif + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -54,6 +39,7 @@ public CreateTransportRequestDocument() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -64,6 +50,7 @@ public CreateTransportRequestDocument() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.CreateTransportRequestDocument(); } + /// /// The deserialization information for the current model /// @@ -76,6 +63,7 @@ public virtual IDictionary> GetFieldDeserializers() { "meta", n => { Meta = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.Meta.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -89,3 +77,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/CreateVacationRequestDocument.cs b/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/CreateVacationRequestDocument.cs index d3a051f6e..ca5f3e590 100644 --- a/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/CreateVacationRequestDocument.cs +++ b/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/CreateVacationRequestDocument.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,38 +17,21 @@ public partial class CreateVacationRequestDocument : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The data property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.DataInCreateVacationRequest? Data { get { return BackingStore?.Get("data"); } set { BackingStore?.Set("data", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.DataInCreateVacationRequest Data - { - get { return BackingStore?.Get("data"); } - set { BackingStore?.Set("data", value); } - } -#endif + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -54,6 +39,7 @@ public CreateVacationRequestDocument() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -64,6 +50,7 @@ public CreateVacationRequestDocument() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.CreateVacationRequestDocument(); } + /// /// The deserialization information for the current model /// @@ -76,6 +63,7 @@ public virtual IDictionary> GetFieldDeserializers() { "meta", n => { Meta = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.Meta.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -89,3 +77,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/DataInCreateAccommodationRequest.cs b/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/DataInCreateAccommodationRequest.cs index b8588ab5c..db44512d3 100644 --- a/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/DataInCreateAccommodationRequest.cs +++ b/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/DataInCreateAccommodationRequest.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -14,45 +16,29 @@ public partial class DataInCreateAccommodationRequest : IBackedModel, IParsable #pragma warning restore CS1591 { /// The attributes property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.AttributesInCreateAccommodationRequest? Attributes { get { return BackingStore?.Get("attributes"); } set { BackingStore?.Set("attributes", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.AttributesInCreateAccommodationRequest Attributes - { - get { return BackingStore?.Get("attributes"); } - set { BackingStore?.Set("attributes", value); } - } -#endif + /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// The type property public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.AccommodationResourceType? Type { get { return BackingStore?.Get("type"); } set { BackingStore?.Set("type", value); } } + /// /// Instantiates a new and sets the default values. /// @@ -60,6 +46,7 @@ public DataInCreateAccommodationRequest() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -70,6 +57,7 @@ public DataInCreateAccommodationRequest() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.DataInCreateAccommodationRequest(); } + /// /// The deserialization information for the current model /// @@ -83,6 +71,7 @@ public virtual IDictionary> GetFieldDeserializers() { "type", n => { Type = n.GetEnumValue(); } }, }; } + /// /// Serializes information the current object /// @@ -97,3 +86,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/DataInCreateExcursionRequest.cs b/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/DataInCreateExcursionRequest.cs index 062b05a13..fe6656b85 100644 --- a/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/DataInCreateExcursionRequest.cs +++ b/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/DataInCreateExcursionRequest.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -14,45 +16,29 @@ public partial class DataInCreateExcursionRequest : IBackedModel, IParsable #pragma warning restore CS1591 { /// The attributes property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.AttributesInCreateExcursionRequest? Attributes { get { return BackingStore?.Get("attributes"); } set { BackingStore?.Set("attributes", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.AttributesInCreateExcursionRequest Attributes - { - get { return BackingStore?.Get("attributes"); } - set { BackingStore?.Set("attributes", value); } - } -#endif + /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// The type property public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.ExcursionResourceType? Type { get { return BackingStore?.Get("type"); } set { BackingStore?.Set("type", value); } } + /// /// Instantiates a new and sets the default values. /// @@ -60,6 +46,7 @@ public DataInCreateExcursionRequest() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -70,6 +57,7 @@ public DataInCreateExcursionRequest() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.DataInCreateExcursionRequest(); } + /// /// The deserialization information for the current model /// @@ -83,6 +71,7 @@ public virtual IDictionary> GetFieldDeserializers() { "type", n => { Type = n.GetEnumValue(); } }, }; } + /// /// Serializes information the current object /// @@ -97,3 +86,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/DataInCreateTransportRequest.cs b/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/DataInCreateTransportRequest.cs index 865feaa5e..93af4ac2f 100644 --- a/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/DataInCreateTransportRequest.cs +++ b/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/DataInCreateTransportRequest.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -14,45 +16,29 @@ public partial class DataInCreateTransportRequest : IBackedModel, IParsable #pragma warning restore CS1591 { /// The attributes property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.AttributesInCreateTransportRequest? Attributes { get { return BackingStore?.Get("attributes"); } set { BackingStore?.Set("attributes", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.AttributesInCreateTransportRequest Attributes - { - get { return BackingStore?.Get("attributes"); } - set { BackingStore?.Set("attributes", value); } - } -#endif + /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// The type property public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.TransportResourceType? Type { get { return BackingStore?.Get("type"); } set { BackingStore?.Set("type", value); } } + /// /// Instantiates a new and sets the default values. /// @@ -60,6 +46,7 @@ public DataInCreateTransportRequest() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -70,6 +57,7 @@ public DataInCreateTransportRequest() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.DataInCreateTransportRequest(); } + /// /// The deserialization information for the current model /// @@ -83,6 +71,7 @@ public virtual IDictionary> GetFieldDeserializers() { "type", n => { Type = n.GetEnumValue(); } }, }; } + /// /// Serializes information the current object /// @@ -97,3 +86,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/DataInCreateVacationRequest.cs b/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/DataInCreateVacationRequest.cs index b8cf5fb5b..92a3a1f2a 100644 --- a/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/DataInCreateVacationRequest.cs +++ b/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/DataInCreateVacationRequest.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -14,61 +16,36 @@ public partial class DataInCreateVacationRequest : IBackedModel, IParsable #pragma warning restore CS1591 { /// The attributes property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.AttributesInCreateVacationRequest? Attributes { get { return BackingStore?.Get("attributes"); } set { BackingStore?.Set("attributes", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.AttributesInCreateVacationRequest Attributes - { - get { return BackingStore?.Get("attributes"); } - set { BackingStore?.Set("attributes", value); } - } -#endif + /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// The relationships property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.RelationshipsInCreateVacationRequest? Relationships { get { return BackingStore?.Get("relationships"); } set { BackingStore?.Set("relationships", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.RelationshipsInCreateVacationRequest Relationships - { - get { return BackingStore?.Get("relationships"); } - set { BackingStore?.Set("relationships", value); } - } -#endif + /// The type property public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.VacationResourceType? Type { get { return BackingStore?.Get("type"); } set { BackingStore?.Set("type", value); } } + /// /// Instantiates a new and sets the default values. /// @@ -76,6 +53,7 @@ public DataInCreateVacationRequest() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -86,6 +64,7 @@ public DataInCreateVacationRequest() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.DataInCreateVacationRequest(); } + /// /// The deserialization information for the current model /// @@ -100,6 +79,7 @@ public virtual IDictionary> GetFieldDeserializers() { "type", n => { Type = n.GetEnumValue(); } }, }; } + /// /// Serializes information the current object /// @@ -115,3 +95,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/DataInResponse.cs b/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/DataInResponse.cs index 07ad81c11..7753d9c00 100644 --- a/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/DataInResponse.cs +++ b/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/DataInResponse.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,28 +17,21 @@ public partial class DataInResponse : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// The type property public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.ResourceType? Type { get { return BackingStore?.Get("type"); } set { BackingStore?.Set("type", value); } } + /// /// Instantiates a new and sets the default values. /// @@ -44,6 +39,7 @@ public DataInResponse() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -62,6 +58,7 @@ public DataInResponse() _ => new global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.DataInResponse(), }; } + /// /// The deserialization information for the current model /// @@ -74,6 +71,7 @@ public virtual IDictionary> GetFieldDeserializers() { "type", n => { Type = n.GetEnumValue(); } }, }; } + /// /// Serializes information the current object /// @@ -87,3 +85,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/DataInUpdateAccommodationRequest.cs b/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/DataInUpdateAccommodationRequest.cs index c09a67e87..8969d9312 100644 --- a/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/DataInUpdateAccommodationRequest.cs +++ b/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/DataInUpdateAccommodationRequest.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -14,61 +16,36 @@ public partial class DataInUpdateAccommodationRequest : IBackedModel, IParsable #pragma warning restore CS1591 { /// The attributes property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.AttributesInUpdateAccommodationRequest? Attributes { get { return BackingStore?.Get("attributes"); } set { BackingStore?.Set("attributes", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.AttributesInUpdateAccommodationRequest Attributes - { - get { return BackingStore?.Get("attributes"); } - set { BackingStore?.Set("attributes", value); } - } -#endif + /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The id property -#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 meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// The type property public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.AccommodationResourceType? Type { get { return BackingStore?.Get("type"); } set { BackingStore?.Set("type", value); } } + /// /// Instantiates a new and sets the default values. /// @@ -76,6 +53,7 @@ public DataInUpdateAccommodationRequest() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -86,6 +64,7 @@ public DataInUpdateAccommodationRequest() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.DataInUpdateAccommodationRequest(); } + /// /// The deserialization information for the current model /// @@ -100,6 +79,7 @@ public virtual IDictionary> GetFieldDeserializers() { "type", n => { Type = n.GetEnumValue(); } }, }; } + /// /// Serializes information the current object /// @@ -115,3 +95,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/DataInUpdateExcursionRequest.cs b/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/DataInUpdateExcursionRequest.cs index 012c59282..a79b880fb 100644 --- a/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/DataInUpdateExcursionRequest.cs +++ b/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/DataInUpdateExcursionRequest.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -14,61 +16,36 @@ public partial class DataInUpdateExcursionRequest : IBackedModel, IParsable #pragma warning restore CS1591 { /// The attributes property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.AttributesInUpdateExcursionRequest? Attributes { get { return BackingStore?.Get("attributes"); } set { BackingStore?.Set("attributes", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.AttributesInUpdateExcursionRequest Attributes - { - get { return BackingStore?.Get("attributes"); } - set { BackingStore?.Set("attributes", value); } - } -#endif + /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The id property -#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 meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// The type property public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.ExcursionResourceType? Type { get { return BackingStore?.Get("type"); } set { BackingStore?.Set("type", value); } } + /// /// Instantiates a new and sets the default values. /// @@ -76,6 +53,7 @@ public DataInUpdateExcursionRequest() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -86,6 +64,7 @@ public DataInUpdateExcursionRequest() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.DataInUpdateExcursionRequest(); } + /// /// The deserialization information for the current model /// @@ -100,6 +79,7 @@ public virtual IDictionary> GetFieldDeserializers() { "type", n => { Type = n.GetEnumValue(); } }, }; } + /// /// Serializes information the current object /// @@ -115,3 +95,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/DataInUpdateTransportRequest.cs b/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/DataInUpdateTransportRequest.cs index a3b3fa9ae..ce1c82175 100644 --- a/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/DataInUpdateTransportRequest.cs +++ b/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/DataInUpdateTransportRequest.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -14,61 +16,36 @@ public partial class DataInUpdateTransportRequest : IBackedModel, IParsable #pragma warning restore CS1591 { /// The attributes property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.AttributesInUpdateTransportRequest? Attributes { get { return BackingStore?.Get("attributes"); } set { BackingStore?.Set("attributes", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.AttributesInUpdateTransportRequest Attributes - { - get { return BackingStore?.Get("attributes"); } - set { BackingStore?.Set("attributes", value); } - } -#endif + /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The id property -#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 meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// The type property public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.TransportResourceType? Type { get { return BackingStore?.Get("type"); } set { BackingStore?.Set("type", value); } } + /// /// Instantiates a new and sets the default values. /// @@ -76,6 +53,7 @@ public DataInUpdateTransportRequest() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -86,6 +64,7 @@ public DataInUpdateTransportRequest() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.DataInUpdateTransportRequest(); } + /// /// The deserialization information for the current model /// @@ -100,6 +79,7 @@ public virtual IDictionary> GetFieldDeserializers() { "type", n => { Type = n.GetEnumValue(); } }, }; } + /// /// Serializes information the current object /// @@ -115,3 +95,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/DataInUpdateVacationRequest.cs b/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/DataInUpdateVacationRequest.cs index c42de5dee..8933d47b8 100644 --- a/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/DataInUpdateVacationRequest.cs +++ b/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/DataInUpdateVacationRequest.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -14,77 +16,43 @@ public partial class DataInUpdateVacationRequest : IBackedModel, IParsable #pragma warning restore CS1591 { /// The attributes property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.AttributesInUpdateVacationRequest? Attributes { get { return BackingStore?.Get("attributes"); } set { BackingStore?.Set("attributes", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.AttributesInUpdateVacationRequest Attributes - { - get { return BackingStore?.Get("attributes"); } - set { BackingStore?.Set("attributes", value); } - } -#endif + /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The id property -#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 meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// The relationships property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.RelationshipsInUpdateVacationRequest? Relationships { get { return BackingStore?.Get("relationships"); } set { BackingStore?.Set("relationships", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.RelationshipsInUpdateVacationRequest Relationships - { - get { return BackingStore?.Get("relationships"); } - set { BackingStore?.Set("relationships", value); } - } -#endif + /// The type property public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.VacationResourceType? Type { get { return BackingStore?.Get("type"); } set { BackingStore?.Set("type", value); } } + /// /// Instantiates a new and sets the default values. /// @@ -92,6 +60,7 @@ public DataInUpdateVacationRequest() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -102,6 +71,7 @@ public DataInUpdateVacationRequest() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.DataInUpdateVacationRequest(); } + /// /// The deserialization information for the current model /// @@ -117,6 +87,7 @@ public virtual IDictionary> GetFieldDeserializers() { "type", n => { Type = n.GetEnumValue(); } }, }; } + /// /// Serializes information the current object /// @@ -133,3 +104,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/ErrorLinks.cs b/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/ErrorLinks.cs index c4f8a8b38..983693f5e 100644 --- a/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/ErrorLinks.cs +++ b/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/ErrorLinks.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -14,39 +16,22 @@ public partial class ErrorLinks : IBackedModel, IParsable #pragma warning restore CS1591 { /// The about property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? About { get { return BackingStore?.Get("about"); } set { BackingStore?.Set("about", value); } } -#nullable restore -#else - public string About - { - get { return BackingStore?.Get("about"); } - set { BackingStore?.Set("about", value); } - } -#endif + /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// 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 and sets the default values. /// @@ -54,6 +39,7 @@ public ErrorLinks() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -64,6 +50,7 @@ public ErrorLinks() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.ErrorLinks(); } + /// /// The deserialization information for the current model /// @@ -76,6 +63,7 @@ public virtual IDictionary> GetFieldDeserializers() { "type", n => { Type = n.GetStringValue(); } }, }; } + /// /// Serializes information the current object /// @@ -89,3 +77,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/ErrorObject.cs b/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/ErrorObject.cs index 27ccf20a9..c0375e2f5 100644 --- a/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/ErrorObject.cs +++ b/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/ErrorObject.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,134 +17,63 @@ public partial class ErrorObject : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The code property -#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 detail property -#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 id property -#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 links property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.ErrorLinks? Links { get { return BackingStore?.Get("links"); } set { BackingStore?.Set("links", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.ErrorLinks Links - { - get { return BackingStore?.Get("links"); } - set { BackingStore?.Set("links", value); } - } -#endif + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// The source property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.ErrorSource? Source { get { return BackingStore?.Get("source"); } set { BackingStore?.Set("source", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.ErrorSource Source - { - get { return BackingStore?.Get("source"); } - set { BackingStore?.Set("source", value); } - } -#endif + /// The status property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Status { get { return BackingStore?.Get("status"); } set { BackingStore?.Set("status", value); } } -#nullable restore -#else - public string Status - { - get { return BackingStore?.Get("status"); } - set { BackingStore?.Set("status", value); } - } -#endif + /// The title property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Title { get { return BackingStore?.Get("title"); } set { BackingStore?.Set("title", value); } } -#nullable restore -#else - public string Title - { - get { return BackingStore?.Get("title"); } - set { BackingStore?.Set("title", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -150,6 +81,7 @@ public ErrorObject() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -160,6 +92,7 @@ public ErrorObject() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.ErrorObject(); } + /// /// The deserialization information for the current model /// @@ -178,6 +111,7 @@ public virtual IDictionary> GetFieldDeserializers() { "title", n => { Title = n.GetStringValue(); } }, }; } + /// /// Serializes information the current object /// @@ -197,3 +131,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/ErrorResponseDocument.cs b/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/ErrorResponseDocument.cs index cd69f3625..41fce115a 100644 --- a/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/ErrorResponseDocument.cs +++ b/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/ErrorResponseDocument.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -16,56 +18,31 @@ public partial class ErrorResponseDocument : ApiException, IBackedModel, IParsab { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The errors property -#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 + /// The links property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.ErrorTopLevelLinks? Links { get { return BackingStore?.Get("links"); } set { BackingStore?.Set("links", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.ErrorTopLevelLinks Links - { - get { return BackingStore?.Get("links"); } - set { BackingStore?.Set("links", value); } - } -#endif + /// The primary error message. public override string Message { get => base.Message; } + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -73,6 +50,7 @@ public ErrorResponseDocument() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -83,6 +61,7 @@ public ErrorResponseDocument() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.ErrorResponseDocument(); } + /// /// The deserialization information for the current model /// @@ -96,6 +75,7 @@ public virtual IDictionary> GetFieldDeserializers() { "meta", n => { Meta = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.Meta.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -110,3 +90,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/ErrorSource.cs b/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/ErrorSource.cs index 476a221e9..838270487 100644 --- a/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/ErrorSource.cs +++ b/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/ErrorSource.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,54 +17,28 @@ public partial class ErrorSource : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The header property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Header { get { return BackingStore?.Get("header"); } set { BackingStore?.Set("header", value); } } -#nullable restore -#else - public string Header - { - get { return BackingStore?.Get("header"); } - set { BackingStore?.Set("header", value); } - } -#endif + /// The parameter property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Parameter { get { return BackingStore?.Get("parameter"); } set { BackingStore?.Set("parameter", value); } } -#nullable restore -#else - public string Parameter - { - get { return BackingStore?.Get("parameter"); } - set { BackingStore?.Set("parameter", value); } - } -#endif + /// The pointer property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Pointer { get { return BackingStore?.Get("pointer"); } set { BackingStore?.Set("pointer", value); } } -#nullable restore -#else - public string Pointer - { - get { return BackingStore?.Get("pointer"); } - set { BackingStore?.Set("pointer", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -70,6 +46,7 @@ public ErrorSource() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -80,6 +57,7 @@ public ErrorSource() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.ErrorSource(); } + /// /// The deserialization information for the current model /// @@ -93,6 +71,7 @@ public virtual IDictionary> GetFieldDeserializers() { "pointer", n => { Pointer = n.GetStringValue(); } }, }; } + /// /// Serializes information the current object /// @@ -107,3 +86,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/ErrorTopLevelLinks.cs b/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/ErrorTopLevelLinks.cs index 40cd3d7e0..2d5818440 100644 --- a/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/ErrorTopLevelLinks.cs +++ b/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/ErrorTopLevelLinks.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,38 +17,21 @@ public partial class ErrorTopLevelLinks : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The describedby property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Describedby { get { return BackingStore?.Get("describedby"); } set { BackingStore?.Set("describedby", value); } } -#nullable restore -#else - public string Describedby - { - get { return BackingStore?.Get("describedby"); } - set { BackingStore?.Set("describedby", value); } - } -#endif + /// The self property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Self { get { return BackingStore?.Get("self"); } set { BackingStore?.Set("self", value); } } -#nullable restore -#else - public string Self - { - get { return BackingStore?.Get("self"); } - set { BackingStore?.Set("self", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -54,6 +39,7 @@ public ErrorTopLevelLinks() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -64,6 +50,7 @@ public ErrorTopLevelLinks() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.ErrorTopLevelLinks(); } + /// /// The deserialization information for the current model /// @@ -76,6 +63,7 @@ public virtual IDictionary> GetFieldDeserializers() { "self", n => { Self = n.GetStringValue(); } }, }; } + /// /// Serializes information the current object /// @@ -89,3 +77,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/ExcursionAttributesInResponse.cs b/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/ExcursionAttributesInResponse.cs index 04167ba1b..02273ffa2 100644 --- a/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/ExcursionAttributesInResponse.cs +++ b/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/ExcursionAttributesInResponse.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,28 +17,21 @@ public partial class ExcursionAttributesInResponse : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The description property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Description { get { return BackingStore?.Get("description"); } set { BackingStore?.Set("description", value); } } -#nullable restore -#else - public string Description - { - get { return BackingStore?.Get("description"); } - set { BackingStore?.Set("description", value); } - } -#endif + /// The occursAt property public DateTimeOffset? OccursAt { get { return BackingStore?.Get("occursAt"); } set { BackingStore?.Set("occursAt", value); } } + /// /// Instantiates a new and sets the default values. /// @@ -44,6 +39,7 @@ public ExcursionAttributesInResponse() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -54,6 +50,7 @@ public ExcursionAttributesInResponse() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.ExcursionAttributesInResponse(); } + /// /// The deserialization information for the current model /// @@ -66,6 +63,7 @@ public virtual IDictionary> GetFieldDeserializers() { "occursAt", n => { OccursAt = n.GetDateTimeOffsetValue(); } }, }; } + /// /// Serializes information the current object /// @@ -79,3 +77,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/ExcursionCollectionResponseDocument.cs b/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/ExcursionCollectionResponseDocument.cs index 8d57f34ee..58c917a00 100644 --- a/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/ExcursionCollectionResponseDocument.cs +++ b/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/ExcursionCollectionResponseDocument.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,70 +17,35 @@ public partial class ExcursionCollectionResponseDocument : IBackedModel, IParsab { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The data property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public List? Data { get { return BackingStore?.Get?>("data"); } set { BackingStore?.Set("data", value); } } -#nullable restore -#else - public List Data - { - get { return BackingStore?.Get>("data"); } - set { BackingStore?.Set("data", value); } - } -#endif + /// The included property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public List? Included { get { return BackingStore?.Get?>("included"); } set { BackingStore?.Set("included", value); } } -#nullable restore -#else - public List Included - { - get { return BackingStore?.Get>("included"); } - set { BackingStore?.Set("included", value); } - } -#endif + /// The links property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.ResourceCollectionTopLevelLinks? Links { get { return BackingStore?.Get("links"); } set { BackingStore?.Set("links", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.ResourceCollectionTopLevelLinks Links - { - get { return BackingStore?.Get("links"); } - set { BackingStore?.Set("links", value); } - } -#endif + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -86,6 +53,7 @@ public ExcursionCollectionResponseDocument() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -96,6 +64,7 @@ public ExcursionCollectionResponseDocument() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.ExcursionCollectionResponseDocument(); } + /// /// The deserialization information for the current model /// @@ -110,6 +79,7 @@ public virtual IDictionary> GetFieldDeserializers() { "meta", n => { Meta = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.Meta.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -125,3 +95,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/ExcursionDataInResponse.cs b/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/ExcursionDataInResponse.cs index 60260f19e..780d83a7e 100644 --- a/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/ExcursionDataInResponse.cs +++ b/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/ExcursionDataInResponse.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -13,53 +15,26 @@ public partial class ExcursionDataInResponse : global::OpenApiKiotaEndToEndTests #pragma warning restore CS1591 { /// The attributes property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.ExcursionAttributesInResponse? Attributes { get { return BackingStore?.Get("attributes"); } set { BackingStore?.Set("attributes", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.ExcursionAttributesInResponse Attributes - { - get { return BackingStore?.Get("attributes"); } - set { BackingStore?.Set("attributes", value); } - } -#endif + /// The id property -#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 links property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.ResourceLinks? Links { get { return BackingStore?.Get("links"); } set { BackingStore?.Set("links", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.ResourceLinks Links - { - get { return BackingStore?.Get("links"); } - set { BackingStore?.Set("links", value); } - } -#endif + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -70,6 +45,7 @@ public string Id _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.ExcursionDataInResponse(); } + /// /// The deserialization information for the current model /// @@ -83,6 +59,7 @@ public override IDictionary> GetFieldDeserializers() { "links", n => { Links = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.ResourceLinks.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -98,3 +75,4 @@ public override void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/ExcursionIdentifierCollectionResponseDocument.cs b/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/ExcursionIdentifierCollectionResponseDocument.cs index 35c242e0d..471ec1f87 100644 --- a/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/ExcursionIdentifierCollectionResponseDocument.cs +++ b/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/ExcursionIdentifierCollectionResponseDocument.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,54 +17,28 @@ public partial class ExcursionIdentifierCollectionResponseDocument : IBackedMode { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The data property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public List? Data { get { return BackingStore?.Get?>("data"); } set { BackingStore?.Set("data", value); } } -#nullable restore -#else - public List Data - { - get { return BackingStore?.Get>("data"); } - set { BackingStore?.Set("data", value); } - } -#endif + /// The links property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.ResourceIdentifierCollectionTopLevelLinks? Links { get { return BackingStore?.Get("links"); } set { BackingStore?.Set("links", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.ResourceIdentifierCollectionTopLevelLinks Links - { - get { return BackingStore?.Get("links"); } - set { BackingStore?.Set("links", value); } - } -#endif + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -70,6 +46,7 @@ public ExcursionIdentifierCollectionResponseDocument() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -80,6 +57,7 @@ public ExcursionIdentifierCollectionResponseDocument() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.ExcursionIdentifierCollectionResponseDocument(); } + /// /// The deserialization information for the current model /// @@ -93,6 +71,7 @@ public virtual IDictionary> GetFieldDeserializers() { "meta", n => { Meta = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.Meta.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -107,3 +86,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/ExcursionIdentifierInRequest.cs b/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/ExcursionIdentifierInRequest.cs index 9cf851caf..b97c70ac1 100644 --- a/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/ExcursionIdentifierInRequest.cs +++ b/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/ExcursionIdentifierInRequest.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,44 +17,28 @@ public partial class ExcursionIdentifierInRequest : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The id property -#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 meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// The type property public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.ExcursionResourceType? Type { get { return BackingStore?.Get("type"); } set { BackingStore?.Set("type", value); } } + /// /// Instantiates a new and sets the default values. /// @@ -60,6 +46,7 @@ public ExcursionIdentifierInRequest() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -70,6 +57,7 @@ public ExcursionIdentifierInRequest() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.ExcursionIdentifierInRequest(); } + /// /// The deserialization information for the current model /// @@ -83,6 +71,7 @@ public virtual IDictionary> GetFieldDeserializers() { "type", n => { Type = n.GetEnumValue(); } }, }; } + /// /// Serializes information the current object /// @@ -97,3 +86,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/ExcursionIdentifierInResponse.cs b/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/ExcursionIdentifierInResponse.cs index 490f6d817..74d676ea1 100644 --- a/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/ExcursionIdentifierInResponse.cs +++ b/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/ExcursionIdentifierInResponse.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,44 +17,28 @@ public partial class ExcursionIdentifierInResponse : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The id property -#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 meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// The type property public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.ExcursionResourceType? Type { get { return BackingStore?.Get("type"); } set { BackingStore?.Set("type", value); } } + /// /// Instantiates a new and sets the default values. /// @@ -60,6 +46,7 @@ public ExcursionIdentifierInResponse() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -70,6 +57,7 @@ public ExcursionIdentifierInResponse() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.ExcursionIdentifierInResponse(); } + /// /// The deserialization information for the current model /// @@ -83,6 +71,7 @@ public virtual IDictionary> GetFieldDeserializers() { "type", n => { Type = n.GetEnumValue(); } }, }; } + /// /// Serializes information the current object /// @@ -97,3 +86,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/ExcursionPrimaryResponseDocument.cs b/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/ExcursionPrimaryResponseDocument.cs index b38dfb114..a112e8139 100644 --- a/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/ExcursionPrimaryResponseDocument.cs +++ b/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/ExcursionPrimaryResponseDocument.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,70 +17,35 @@ public partial class ExcursionPrimaryResponseDocument : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The data property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.ExcursionDataInResponse? Data { get { return BackingStore?.Get("data"); } set { BackingStore?.Set("data", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.ExcursionDataInResponse Data - { - get { return BackingStore?.Get("data"); } - set { BackingStore?.Set("data", value); } - } -#endif + /// The included property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public List? Included { get { return BackingStore?.Get?>("included"); } set { BackingStore?.Set("included", value); } } -#nullable restore -#else - public List Included - { - get { return BackingStore?.Get>("included"); } - set { BackingStore?.Set("included", value); } - } -#endif + /// The links property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.ResourceTopLevelLinks? Links { get { return BackingStore?.Get("links"); } set { BackingStore?.Set("links", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.ResourceTopLevelLinks Links - { - get { return BackingStore?.Get("links"); } - set { BackingStore?.Set("links", value); } - } -#endif + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -86,6 +53,7 @@ public ExcursionPrimaryResponseDocument() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -96,6 +64,7 @@ public ExcursionPrimaryResponseDocument() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.ExcursionPrimaryResponseDocument(); } + /// /// The deserialization information for the current model /// @@ -110,6 +79,7 @@ public virtual IDictionary> GetFieldDeserializers() { "meta", n => { Meta = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.Meta.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -125,3 +95,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/ExcursionResourceType.cs b/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/ExcursionResourceType.cs index f7692c26e..36f8aa8c8 100644 --- a/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/ExcursionResourceType.cs +++ b/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/ExcursionResourceType.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 using System.Runtime.Serialization; using System; namespace OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models @@ -14,3 +16,4 @@ public enum ExcursionResourceType #pragma warning restore CS1591 } } + diff --git a/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/Meta.cs b/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/Meta.cs index adc1340a7..864716526 100644 --- a/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/Meta.cs +++ b/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/Meta.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -19,8 +21,10 @@ public IDictionary AdditionalData get { return BackingStore.Get>("AdditionalData") ?? new Dictionary(); } set { BackingStore.Set("AdditionalData", value); } } + /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// /// Instantiates a new and sets the default values. /// @@ -29,6 +33,7 @@ public Meta() BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); AdditionalData = new Dictionary(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -39,6 +44,7 @@ public Meta() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.Meta(); } + /// /// The deserialization information for the current model /// @@ -49,6 +55,7 @@ public virtual IDictionary> GetFieldDeserializers() { }; } + /// /// Serializes information the current object /// @@ -61,3 +68,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/NullableToOneTransportInRequest.cs b/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/NullableToOneTransportInRequest.cs index b5b15051d..211593db2 100644 --- a/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/NullableToOneTransportInRequest.cs +++ b/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/NullableToOneTransportInRequest.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,38 +17,21 @@ public partial class NullableToOneTransportInRequest : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The data property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.TransportIdentifierInRequest? Data { get { return BackingStore?.Get("data"); } set { BackingStore?.Set("data", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.TransportIdentifierInRequest Data - { - get { return BackingStore?.Get("data"); } - set { BackingStore?.Set("data", value); } - } -#endif + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -54,6 +39,7 @@ public NullableToOneTransportInRequest() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -64,6 +50,7 @@ public NullableToOneTransportInRequest() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.NullableToOneTransportInRequest(); } + /// /// The deserialization information for the current model /// @@ -76,6 +63,7 @@ public virtual IDictionary> GetFieldDeserializers() { "meta", n => { Meta = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.Meta.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -89,3 +77,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/NullableToOneTransportInResponse.cs b/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/NullableToOneTransportInResponse.cs index ae9c33234..685b41e16 100644 --- a/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/NullableToOneTransportInResponse.cs +++ b/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/NullableToOneTransportInResponse.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,54 +17,28 @@ public partial class NullableToOneTransportInResponse : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The data property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.TransportIdentifierInResponse? Data { get { return BackingStore?.Get("data"); } set { BackingStore?.Set("data", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.TransportIdentifierInResponse Data - { - get { return BackingStore?.Get("data"); } - set { BackingStore?.Set("data", value); } - } -#endif + /// The links property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.RelationshipLinks? Links { get { return BackingStore?.Get("links"); } set { BackingStore?.Set("links", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.RelationshipLinks Links - { - get { return BackingStore?.Get("links"); } - set { BackingStore?.Set("links", value); } - } -#endif + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -70,6 +46,7 @@ public NullableToOneTransportInResponse() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -80,6 +57,7 @@ public NullableToOneTransportInResponse() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.NullableToOneTransportInResponse(); } + /// /// The deserialization information for the current model /// @@ -93,6 +71,7 @@ public virtual IDictionary> GetFieldDeserializers() { "meta", n => { Meta = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.Meta.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -107,3 +86,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/NullableTransportIdentifierResponseDocument.cs b/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/NullableTransportIdentifierResponseDocument.cs index 31a1a1eaf..ac669d897 100644 --- a/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/NullableTransportIdentifierResponseDocument.cs +++ b/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/NullableTransportIdentifierResponseDocument.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,54 +17,28 @@ public partial class NullableTransportIdentifierResponseDocument : IBackedModel, { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The data property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.TransportIdentifierInResponse? Data { get { return BackingStore?.Get("data"); } set { BackingStore?.Set("data", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.TransportIdentifierInResponse Data - { - get { return BackingStore?.Get("data"); } - set { BackingStore?.Set("data", value); } - } -#endif + /// The links property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.ResourceIdentifierTopLevelLinks? Links { get { return BackingStore?.Get("links"); } set { BackingStore?.Set("links", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.ResourceIdentifierTopLevelLinks Links - { - get { return BackingStore?.Get("links"); } - set { BackingStore?.Set("links", value); } - } -#endif + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -70,6 +46,7 @@ public NullableTransportIdentifierResponseDocument() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -80,6 +57,7 @@ public NullableTransportIdentifierResponseDocument() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.NullableTransportIdentifierResponseDocument(); } + /// /// The deserialization information for the current model /// @@ -93,6 +71,7 @@ public virtual IDictionary> GetFieldDeserializers() { "meta", n => { Meta = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.Meta.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -107,3 +86,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/NullableTransportSecondaryResponseDocument.cs b/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/NullableTransportSecondaryResponseDocument.cs index 4e564a469..fd1b8348d 100644 --- a/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/NullableTransportSecondaryResponseDocument.cs +++ b/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/NullableTransportSecondaryResponseDocument.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,70 +17,35 @@ public partial class NullableTransportSecondaryResponseDocument : IBackedModel, { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The data property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.TransportDataInResponse? Data { get { return BackingStore?.Get("data"); } set { BackingStore?.Set("data", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.TransportDataInResponse Data - { - get { return BackingStore?.Get("data"); } - set { BackingStore?.Set("data", value); } - } -#endif + /// The included property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public List? Included { get { return BackingStore?.Get?>("included"); } set { BackingStore?.Set("included", value); } } -#nullable restore -#else - public List Included - { - get { return BackingStore?.Get>("included"); } - set { BackingStore?.Set("included", value); } - } -#endif + /// The links property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.ResourceTopLevelLinks? Links { get { return BackingStore?.Get("links"); } set { BackingStore?.Set("links", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.ResourceTopLevelLinks Links - { - get { return BackingStore?.Get("links"); } - set { BackingStore?.Set("links", value); } - } -#endif + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -86,6 +53,7 @@ public NullableTransportSecondaryResponseDocument() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -96,6 +64,7 @@ public NullableTransportSecondaryResponseDocument() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.NullableTransportSecondaryResponseDocument(); } + /// /// The deserialization information for the current model /// @@ -110,6 +79,7 @@ public virtual IDictionary> GetFieldDeserializers() { "meta", n => { Meta = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.Meta.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -125,3 +95,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/RelationshipLinks.cs b/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/RelationshipLinks.cs index c7392ca21..c75e1bdf1 100644 --- a/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/RelationshipLinks.cs +++ b/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/RelationshipLinks.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,38 +17,21 @@ public partial class RelationshipLinks : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The related property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Related { get { return BackingStore?.Get("related"); } set { BackingStore?.Set("related", value); } } -#nullable restore -#else - public string Related - { - get { return BackingStore?.Get("related"); } - set { BackingStore?.Set("related", value); } - } -#endif + /// The self property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Self { get { return BackingStore?.Get("self"); } set { BackingStore?.Set("self", value); } } -#nullable restore -#else - public string Self - { - get { return BackingStore?.Get("self"); } - set { BackingStore?.Set("self", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -54,6 +39,7 @@ public RelationshipLinks() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -64,6 +50,7 @@ public RelationshipLinks() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.RelationshipLinks(); } + /// /// The deserialization information for the current model /// @@ -76,6 +63,7 @@ public virtual IDictionary> GetFieldDeserializers() { "self", n => { Self = n.GetStringValue(); } }, }; } + /// /// Serializes information the current object /// @@ -89,3 +77,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/RelationshipsInCreateVacationRequest.cs b/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/RelationshipsInCreateVacationRequest.cs index da4c0bd5f..5019095b6 100644 --- a/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/RelationshipsInCreateVacationRequest.cs +++ b/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/RelationshipsInCreateVacationRequest.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -14,55 +16,29 @@ public partial class RelationshipsInCreateVacationRequest : IBackedModel, IParsa #pragma warning restore CS1591 { /// The accommodation property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.ToOneAccommodationInRequest? Accommodation { get { return BackingStore?.Get("accommodation"); } set { BackingStore?.Set("accommodation", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.ToOneAccommodationInRequest Accommodation - { - get { return BackingStore?.Get("accommodation"); } - set { BackingStore?.Set("accommodation", value); } - } -#endif + /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The excursions property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.ToManyExcursionInRequest? Excursions { get { return BackingStore?.Get("excursions"); } set { BackingStore?.Set("excursions", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.ToManyExcursionInRequest Excursions - { - get { return BackingStore?.Get("excursions"); } - set { BackingStore?.Set("excursions", value); } - } -#endif + /// The transport property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.NullableToOneTransportInRequest? Transport { get { return BackingStore?.Get("transport"); } set { BackingStore?.Set("transport", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.NullableToOneTransportInRequest Transport - { - get { return BackingStore?.Get("transport"); } - set { BackingStore?.Set("transport", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -70,6 +46,7 @@ public RelationshipsInCreateVacationRequest() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -80,6 +57,7 @@ public RelationshipsInCreateVacationRequest() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.RelationshipsInCreateVacationRequest(); } + /// /// The deserialization information for the current model /// @@ -93,6 +71,7 @@ public virtual IDictionary> GetFieldDeserializers() { "transport", n => { Transport = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.NullableToOneTransportInRequest.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -107,3 +86,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/RelationshipsInUpdateVacationRequest.cs b/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/RelationshipsInUpdateVacationRequest.cs index b62038781..cb7f32be2 100644 --- a/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/RelationshipsInUpdateVacationRequest.cs +++ b/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/RelationshipsInUpdateVacationRequest.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -14,55 +16,29 @@ public partial class RelationshipsInUpdateVacationRequest : IBackedModel, IParsa #pragma warning restore CS1591 { /// The accommodation property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.ToOneAccommodationInRequest? Accommodation { get { return BackingStore?.Get("accommodation"); } set { BackingStore?.Set("accommodation", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.ToOneAccommodationInRequest Accommodation - { - get { return BackingStore?.Get("accommodation"); } - set { BackingStore?.Set("accommodation", value); } - } -#endif + /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The excursions property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.ToManyExcursionInRequest? Excursions { get { return BackingStore?.Get("excursions"); } set { BackingStore?.Set("excursions", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.ToManyExcursionInRequest Excursions - { - get { return BackingStore?.Get("excursions"); } - set { BackingStore?.Set("excursions", value); } - } -#endif + /// The transport property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.NullableToOneTransportInRequest? Transport { get { return BackingStore?.Get("transport"); } set { BackingStore?.Set("transport", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.NullableToOneTransportInRequest Transport - { - get { return BackingStore?.Get("transport"); } - set { BackingStore?.Set("transport", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -70,6 +46,7 @@ public RelationshipsInUpdateVacationRequest() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -80,6 +57,7 @@ public RelationshipsInUpdateVacationRequest() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.RelationshipsInUpdateVacationRequest(); } + /// /// The deserialization information for the current model /// @@ -93,6 +71,7 @@ public virtual IDictionary> GetFieldDeserializers() { "transport", n => { Transport = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.NullableToOneTransportInRequest.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -107,3 +86,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/ResourceCollectionTopLevelLinks.cs b/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/ResourceCollectionTopLevelLinks.cs index 678085a61..c737b3af7 100644 --- a/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/ResourceCollectionTopLevelLinks.cs +++ b/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/ResourceCollectionTopLevelLinks.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,102 +17,49 @@ public partial class ResourceCollectionTopLevelLinks : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The describedby property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Describedby { get { return BackingStore?.Get("describedby"); } set { BackingStore?.Set("describedby", value); } } -#nullable restore -#else - public string Describedby - { - get { return BackingStore?.Get("describedby"); } - set { BackingStore?.Set("describedby", value); } - } -#endif + /// The first property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? First { get { return BackingStore?.Get("first"); } set { BackingStore?.Set("first", value); } } -#nullable restore -#else - public string First - { - get { return BackingStore?.Get("first"); } - set { BackingStore?.Set("first", value); } - } -#endif + /// The last property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Last { get { return BackingStore?.Get("last"); } set { BackingStore?.Set("last", value); } } -#nullable restore -#else - public string Last - { - get { return BackingStore?.Get("last"); } - set { BackingStore?.Set("last", value); } - } -#endif + /// The next property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Next { get { return BackingStore?.Get("next"); } set { BackingStore?.Set("next", value); } } -#nullable restore -#else - public string Next - { - get { return BackingStore?.Get("next"); } - set { BackingStore?.Set("next", value); } - } -#endif + /// The prev property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Prev { get { return BackingStore?.Get("prev"); } set { BackingStore?.Set("prev", value); } } -#nullable restore -#else - public string Prev - { - get { return BackingStore?.Get("prev"); } - set { BackingStore?.Set("prev", value); } - } -#endif + /// The self property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Self { get { return BackingStore?.Get("self"); } set { BackingStore?.Set("self", value); } } -#nullable restore -#else - public string Self - { - get { return BackingStore?.Get("self"); } - set { BackingStore?.Set("self", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -118,6 +67,7 @@ public ResourceCollectionTopLevelLinks() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -128,6 +78,7 @@ public ResourceCollectionTopLevelLinks() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.ResourceCollectionTopLevelLinks(); } + /// /// The deserialization information for the current model /// @@ -144,6 +95,7 @@ public virtual IDictionary> GetFieldDeserializers() { "self", n => { Self = n.GetStringValue(); } }, }; } + /// /// Serializes information the current object /// @@ -161,3 +113,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/ResourceIdentifierCollectionTopLevelLinks.cs b/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/ResourceIdentifierCollectionTopLevelLinks.cs index 39698f1ba..0291e61e4 100644 --- a/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/ResourceIdentifierCollectionTopLevelLinks.cs +++ b/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/ResourceIdentifierCollectionTopLevelLinks.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,118 +17,56 @@ public partial class ResourceIdentifierCollectionTopLevelLinks : IBackedModel, I { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The describedby property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Describedby { get { return BackingStore?.Get("describedby"); } set { BackingStore?.Set("describedby", value); } } -#nullable restore -#else - public string Describedby - { - get { return BackingStore?.Get("describedby"); } - set { BackingStore?.Set("describedby", value); } - } -#endif + /// The first property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? First { get { return BackingStore?.Get("first"); } set { BackingStore?.Set("first", value); } } -#nullable restore -#else - public string First - { - get { return BackingStore?.Get("first"); } - set { BackingStore?.Set("first", value); } - } -#endif + /// The last property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Last { get { return BackingStore?.Get("last"); } set { BackingStore?.Set("last", value); } } -#nullable restore -#else - public string Last - { - get { return BackingStore?.Get("last"); } - set { BackingStore?.Set("last", value); } - } -#endif + /// The next property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Next { get { return BackingStore?.Get("next"); } set { BackingStore?.Set("next", value); } } -#nullable restore -#else - public string Next - { - get { return BackingStore?.Get("next"); } - set { BackingStore?.Set("next", value); } - } -#endif + /// The prev property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Prev { get { return BackingStore?.Get("prev"); } set { BackingStore?.Set("prev", value); } } -#nullable restore -#else - public string Prev - { - get { return BackingStore?.Get("prev"); } - set { BackingStore?.Set("prev", value); } - } -#endif + /// The related property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Related { get { return BackingStore?.Get("related"); } set { BackingStore?.Set("related", value); } } -#nullable restore -#else - public string Related - { - get { return BackingStore?.Get("related"); } - set { BackingStore?.Set("related", value); } - } -#endif + /// The self property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Self { get { return BackingStore?.Get("self"); } set { BackingStore?.Set("self", value); } } -#nullable restore -#else - public string Self - { - get { return BackingStore?.Get("self"); } - set { BackingStore?.Set("self", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -134,6 +74,7 @@ public ResourceIdentifierCollectionTopLevelLinks() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -144,6 +85,7 @@ public ResourceIdentifierCollectionTopLevelLinks() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.ResourceIdentifierCollectionTopLevelLinks(); } + /// /// The deserialization information for the current model /// @@ -161,6 +103,7 @@ public virtual IDictionary> GetFieldDeserializers() { "self", n => { Self = n.GetStringValue(); } }, }; } + /// /// Serializes information the current object /// @@ -179,3 +122,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/ResourceIdentifierTopLevelLinks.cs b/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/ResourceIdentifierTopLevelLinks.cs index 738340088..0fc6e88d8 100644 --- a/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/ResourceIdentifierTopLevelLinks.cs +++ b/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/ResourceIdentifierTopLevelLinks.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,54 +17,28 @@ public partial class ResourceIdentifierTopLevelLinks : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The describedby property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Describedby { get { return BackingStore?.Get("describedby"); } set { BackingStore?.Set("describedby", value); } } -#nullable restore -#else - public string Describedby - { - get { return BackingStore?.Get("describedby"); } - set { BackingStore?.Set("describedby", value); } - } -#endif + /// The related property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Related { get { return BackingStore?.Get("related"); } set { BackingStore?.Set("related", value); } } -#nullable restore -#else - public string Related - { - get { return BackingStore?.Get("related"); } - set { BackingStore?.Set("related", value); } - } -#endif + /// The self property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Self { get { return BackingStore?.Get("self"); } set { BackingStore?.Set("self", value); } } -#nullable restore -#else - public string Self - { - get { return BackingStore?.Get("self"); } - set { BackingStore?.Set("self", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -70,6 +46,7 @@ public ResourceIdentifierTopLevelLinks() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -80,6 +57,7 @@ public ResourceIdentifierTopLevelLinks() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.ResourceIdentifierTopLevelLinks(); } + /// /// The deserialization information for the current model /// @@ -93,6 +71,7 @@ public virtual IDictionary> GetFieldDeserializers() { "self", n => { Self = n.GetStringValue(); } }, }; } + /// /// Serializes information the current object /// @@ -107,3 +86,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/ResourceLinks.cs b/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/ResourceLinks.cs index 97bb49d12..400db1a9f 100644 --- a/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/ResourceLinks.cs +++ b/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/ResourceLinks.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,22 +17,14 @@ public partial class ResourceLinks : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The self property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Self { get { return BackingStore?.Get("self"); } set { BackingStore?.Set("self", value); } } -#nullable restore -#else - public string Self - { - get { return BackingStore?.Get("self"); } - set { BackingStore?.Set("self", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -38,6 +32,7 @@ public ResourceLinks() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -48,6 +43,7 @@ public ResourceLinks() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.ResourceLinks(); } + /// /// The deserialization information for the current model /// @@ -59,6 +55,7 @@ public virtual IDictionary> GetFieldDeserializers() { "self", n => { Self = n.GetStringValue(); } }, }; } + /// /// Serializes information the current object /// @@ -71,3 +68,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/ResourceTopLevelLinks.cs b/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/ResourceTopLevelLinks.cs index 832bf9e38..ab9375d34 100644 --- a/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/ResourceTopLevelLinks.cs +++ b/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/ResourceTopLevelLinks.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,38 +17,21 @@ public partial class ResourceTopLevelLinks : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The describedby property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Describedby { get { return BackingStore?.Get("describedby"); } set { BackingStore?.Set("describedby", value); } } -#nullable restore -#else - public string Describedby - { - get { return BackingStore?.Get("describedby"); } - set { BackingStore?.Set("describedby", value); } - } -#endif + /// The self property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Self { get { return BackingStore?.Get("self"); } set { BackingStore?.Set("self", value); } } -#nullable restore -#else - public string Self - { - get { return BackingStore?.Get("self"); } - set { BackingStore?.Set("self", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -54,6 +39,7 @@ public ResourceTopLevelLinks() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -64,6 +50,7 @@ public ResourceTopLevelLinks() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.ResourceTopLevelLinks(); } + /// /// The deserialization information for the current model /// @@ -76,6 +63,7 @@ public virtual IDictionary> GetFieldDeserializers() { "self", n => { Self = n.GetStringValue(); } }, }; } + /// /// Serializes information the current object /// @@ -89,3 +77,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/ResourceType.cs b/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/ResourceType.cs index 3422d8708..944d6a762 100644 --- a/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/ResourceType.cs +++ b/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/ResourceType.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 using System.Runtime.Serialization; using System; namespace OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models @@ -26,3 +28,4 @@ public enum ResourceType #pragma warning restore CS1591 } } + diff --git a/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/ToManyExcursionInRequest.cs b/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/ToManyExcursionInRequest.cs index c56b7f512..e3793efdd 100644 --- a/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/ToManyExcursionInRequest.cs +++ b/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/ToManyExcursionInRequest.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,38 +17,21 @@ public partial class ToManyExcursionInRequest : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The data property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public List? Data { get { return BackingStore?.Get?>("data"); } set { BackingStore?.Set("data", value); } } -#nullable restore -#else - public List Data - { - get { return BackingStore?.Get>("data"); } - set { BackingStore?.Set("data", value); } - } -#endif + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -54,6 +39,7 @@ public ToManyExcursionInRequest() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -64,6 +50,7 @@ public ToManyExcursionInRequest() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.ToManyExcursionInRequest(); } + /// /// The deserialization information for the current model /// @@ -76,6 +63,7 @@ public virtual IDictionary> GetFieldDeserializers() { "meta", n => { Meta = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.Meta.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -89,3 +77,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/ToManyExcursionInResponse.cs b/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/ToManyExcursionInResponse.cs index b39a9614c..1e102d19f 100644 --- a/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/ToManyExcursionInResponse.cs +++ b/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/ToManyExcursionInResponse.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,54 +17,28 @@ public partial class ToManyExcursionInResponse : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The data property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public List? Data { get { return BackingStore?.Get?>("data"); } set { BackingStore?.Set("data", value); } } -#nullable restore -#else - public List Data - { - get { return BackingStore?.Get>("data"); } - set { BackingStore?.Set("data", value); } - } -#endif + /// The links property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.RelationshipLinks? Links { get { return BackingStore?.Get("links"); } set { BackingStore?.Set("links", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.RelationshipLinks Links - { - get { return BackingStore?.Get("links"); } - set { BackingStore?.Set("links", value); } - } -#endif + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -70,6 +46,7 @@ public ToManyExcursionInResponse() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -80,6 +57,7 @@ public ToManyExcursionInResponse() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.ToManyExcursionInResponse(); } + /// /// The deserialization information for the current model /// @@ -93,6 +71,7 @@ public virtual IDictionary> GetFieldDeserializers() { "meta", n => { Meta = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.Meta.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -107,3 +86,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/ToOneAccommodationInRequest.cs b/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/ToOneAccommodationInRequest.cs index e71f5b454..904b90c27 100644 --- a/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/ToOneAccommodationInRequest.cs +++ b/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/ToOneAccommodationInRequest.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,38 +17,21 @@ public partial class ToOneAccommodationInRequest : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The data property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.AccommodationIdentifierInRequest? Data { get { return BackingStore?.Get("data"); } set { BackingStore?.Set("data", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.AccommodationIdentifierInRequest Data - { - get { return BackingStore?.Get("data"); } - set { BackingStore?.Set("data", value); } - } -#endif + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -54,6 +39,7 @@ public ToOneAccommodationInRequest() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -64,6 +50,7 @@ public ToOneAccommodationInRequest() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.ToOneAccommodationInRequest(); } + /// /// The deserialization information for the current model /// @@ -76,6 +63,7 @@ public virtual IDictionary> GetFieldDeserializers() { "meta", n => { Meta = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.Meta.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -89,3 +77,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/ToOneAccommodationInResponse.cs b/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/ToOneAccommodationInResponse.cs index 53a4ed645..7c5414fa0 100644 --- a/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/ToOneAccommodationInResponse.cs +++ b/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/ToOneAccommodationInResponse.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,54 +17,28 @@ public partial class ToOneAccommodationInResponse : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The data property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.AccommodationIdentifierInResponse? Data { get { return BackingStore?.Get("data"); } set { BackingStore?.Set("data", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.AccommodationIdentifierInResponse Data - { - get { return BackingStore?.Get("data"); } - set { BackingStore?.Set("data", value); } - } -#endif + /// The links property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.RelationshipLinks? Links { get { return BackingStore?.Get("links"); } set { BackingStore?.Set("links", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.RelationshipLinks Links - { - get { return BackingStore?.Get("links"); } - set { BackingStore?.Set("links", value); } - } -#endif + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -70,6 +46,7 @@ public ToOneAccommodationInResponse() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -80,6 +57,7 @@ public ToOneAccommodationInResponse() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.ToOneAccommodationInResponse(); } + /// /// The deserialization information for the current model /// @@ -93,6 +71,7 @@ public virtual IDictionary> GetFieldDeserializers() { "meta", n => { Meta = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.Meta.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -107,3 +86,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/TransportAttributesInResponse.cs b/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/TransportAttributesInResponse.cs index 2331240b2..7bbbc28e3 100644 --- a/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/TransportAttributesInResponse.cs +++ b/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/TransportAttributesInResponse.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,18 +17,21 @@ public partial class TransportAttributesInResponse : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The durationInMinutes property public int? DurationInMinutes { get { return BackingStore?.Get("durationInMinutes"); } set { BackingStore?.Set("durationInMinutes", value); } } + /// The type property public int? Type { get { return BackingStore?.Get("type"); } set { BackingStore?.Set("type", value); } } + /// /// Instantiates a new and sets the default values. /// @@ -34,6 +39,7 @@ public TransportAttributesInResponse() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -44,6 +50,7 @@ public TransportAttributesInResponse() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.TransportAttributesInResponse(); } + /// /// The deserialization information for the current model /// @@ -56,6 +63,7 @@ public virtual IDictionary> GetFieldDeserializers() { "type", n => { Type = n.GetIntValue(); } }, }; } + /// /// Serializes information the current object /// @@ -69,3 +77,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/TransportCollectionResponseDocument.cs b/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/TransportCollectionResponseDocument.cs index 551f8ddfc..4f62e92f5 100644 --- a/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/TransportCollectionResponseDocument.cs +++ b/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/TransportCollectionResponseDocument.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,70 +17,35 @@ public partial class TransportCollectionResponseDocument : IBackedModel, IParsab { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The data property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public List? Data { get { return BackingStore?.Get?>("data"); } set { BackingStore?.Set("data", value); } } -#nullable restore -#else - public List Data - { - get { return BackingStore?.Get>("data"); } - set { BackingStore?.Set("data", value); } - } -#endif + /// The included property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public List? Included { get { return BackingStore?.Get?>("included"); } set { BackingStore?.Set("included", value); } } -#nullable restore -#else - public List Included - { - get { return BackingStore?.Get>("included"); } - set { BackingStore?.Set("included", value); } - } -#endif + /// The links property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.ResourceCollectionTopLevelLinks? Links { get { return BackingStore?.Get("links"); } set { BackingStore?.Set("links", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.ResourceCollectionTopLevelLinks Links - { - get { return BackingStore?.Get("links"); } - set { BackingStore?.Set("links", value); } - } -#endif + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -86,6 +53,7 @@ public TransportCollectionResponseDocument() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -96,6 +64,7 @@ public TransportCollectionResponseDocument() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.TransportCollectionResponseDocument(); } + /// /// The deserialization information for the current model /// @@ -110,6 +79,7 @@ public virtual IDictionary> GetFieldDeserializers() { "meta", n => { Meta = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.Meta.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -125,3 +95,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/TransportDataInResponse.cs b/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/TransportDataInResponse.cs index 74319c7f6..3e930e4b6 100644 --- a/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/TransportDataInResponse.cs +++ b/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/TransportDataInResponse.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -13,53 +15,26 @@ public partial class TransportDataInResponse : global::OpenApiKiotaEndToEndTests #pragma warning restore CS1591 { /// The attributes property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.TransportAttributesInResponse? Attributes { get { return BackingStore?.Get("attributes"); } set { BackingStore?.Set("attributes", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.TransportAttributesInResponse Attributes - { - get { return BackingStore?.Get("attributes"); } - set { BackingStore?.Set("attributes", value); } - } -#endif + /// The id property -#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 links property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.ResourceLinks? Links { get { return BackingStore?.Get("links"); } set { BackingStore?.Set("links", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.ResourceLinks Links - { - get { return BackingStore?.Get("links"); } - set { BackingStore?.Set("links", value); } - } -#endif + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -70,6 +45,7 @@ public string Id _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.TransportDataInResponse(); } + /// /// The deserialization information for the current model /// @@ -83,6 +59,7 @@ public override IDictionary> GetFieldDeserializers() { "links", n => { Links = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.ResourceLinks.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -98,3 +75,4 @@ public override void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/TransportIdentifierInRequest.cs b/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/TransportIdentifierInRequest.cs index 405ec4ab6..a2f6f5abf 100644 --- a/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/TransportIdentifierInRequest.cs +++ b/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/TransportIdentifierInRequest.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,44 +17,28 @@ public partial class TransportIdentifierInRequest : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The id property -#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 meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// The type property public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.TransportResourceType? Type { get { return BackingStore?.Get("type"); } set { BackingStore?.Set("type", value); } } + /// /// Instantiates a new and sets the default values. /// @@ -60,6 +46,7 @@ public TransportIdentifierInRequest() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -70,6 +57,7 @@ public TransportIdentifierInRequest() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.TransportIdentifierInRequest(); } + /// /// The deserialization information for the current model /// @@ -83,6 +71,7 @@ public virtual IDictionary> GetFieldDeserializers() { "type", n => { Type = n.GetEnumValue(); } }, }; } + /// /// Serializes information the current object /// @@ -97,3 +86,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/TransportIdentifierInResponse.cs b/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/TransportIdentifierInResponse.cs index 2b52c04b4..8c62de5f1 100644 --- a/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/TransportIdentifierInResponse.cs +++ b/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/TransportIdentifierInResponse.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,44 +17,28 @@ public partial class TransportIdentifierInResponse : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The id property -#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 meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// The type property public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.TransportResourceType? Type { get { return BackingStore?.Get("type"); } set { BackingStore?.Set("type", value); } } + /// /// Instantiates a new and sets the default values. /// @@ -60,6 +46,7 @@ public TransportIdentifierInResponse() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -70,6 +57,7 @@ public TransportIdentifierInResponse() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.TransportIdentifierInResponse(); } + /// /// The deserialization information for the current model /// @@ -83,6 +71,7 @@ public virtual IDictionary> GetFieldDeserializers() { "type", n => { Type = n.GetEnumValue(); } }, }; } + /// /// Serializes information the current object /// @@ -97,3 +86,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/TransportPrimaryResponseDocument.cs b/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/TransportPrimaryResponseDocument.cs index cafb52531..4aa9199a1 100644 --- a/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/TransportPrimaryResponseDocument.cs +++ b/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/TransportPrimaryResponseDocument.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,70 +17,35 @@ public partial class TransportPrimaryResponseDocument : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The data property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.TransportDataInResponse? Data { get { return BackingStore?.Get("data"); } set { BackingStore?.Set("data", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.TransportDataInResponse Data - { - get { return BackingStore?.Get("data"); } - set { BackingStore?.Set("data", value); } - } -#endif + /// The included property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public List? Included { get { return BackingStore?.Get?>("included"); } set { BackingStore?.Set("included", value); } } -#nullable restore -#else - public List Included - { - get { return BackingStore?.Get>("included"); } - set { BackingStore?.Set("included", value); } - } -#endif + /// The links property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.ResourceTopLevelLinks? Links { get { return BackingStore?.Get("links"); } set { BackingStore?.Set("links", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.ResourceTopLevelLinks Links - { - get { return BackingStore?.Get("links"); } - set { BackingStore?.Set("links", value); } - } -#endif + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -86,6 +53,7 @@ public TransportPrimaryResponseDocument() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -96,6 +64,7 @@ public TransportPrimaryResponseDocument() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.TransportPrimaryResponseDocument(); } + /// /// The deserialization information for the current model /// @@ -110,6 +79,7 @@ public virtual IDictionary> GetFieldDeserializers() { "meta", n => { Meta = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.Meta.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -125,3 +95,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/TransportResourceType.cs b/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/TransportResourceType.cs index 63f4c4524..d1f421207 100644 --- a/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/TransportResourceType.cs +++ b/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/TransportResourceType.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 using System.Runtime.Serialization; using System; namespace OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models @@ -14,3 +16,4 @@ public enum TransportResourceType #pragma warning restore CS1591 } } + diff --git a/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/UpdateAccommodationRequestDocument.cs b/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/UpdateAccommodationRequestDocument.cs index 7e0be1709..ef1ebaa60 100644 --- a/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/UpdateAccommodationRequestDocument.cs +++ b/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/UpdateAccommodationRequestDocument.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,38 +17,21 @@ public partial class UpdateAccommodationRequestDocument : IBackedModel, IParsabl { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The data property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.DataInUpdateAccommodationRequest? Data { get { return BackingStore?.Get("data"); } set { BackingStore?.Set("data", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.DataInUpdateAccommodationRequest Data - { - get { return BackingStore?.Get("data"); } - set { BackingStore?.Set("data", value); } - } -#endif + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -54,6 +39,7 @@ public UpdateAccommodationRequestDocument() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -64,6 +50,7 @@ public UpdateAccommodationRequestDocument() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.UpdateAccommodationRequestDocument(); } + /// /// The deserialization information for the current model /// @@ -76,6 +63,7 @@ public virtual IDictionary> GetFieldDeserializers() { "meta", n => { Meta = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.Meta.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -89,3 +77,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/UpdateExcursionRequestDocument.cs b/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/UpdateExcursionRequestDocument.cs index 4d453fe8c..f223a6d2b 100644 --- a/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/UpdateExcursionRequestDocument.cs +++ b/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/UpdateExcursionRequestDocument.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,38 +17,21 @@ public partial class UpdateExcursionRequestDocument : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The data property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.DataInUpdateExcursionRequest? Data { get { return BackingStore?.Get("data"); } set { BackingStore?.Set("data", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.DataInUpdateExcursionRequest Data - { - get { return BackingStore?.Get("data"); } - set { BackingStore?.Set("data", value); } - } -#endif + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -54,6 +39,7 @@ public UpdateExcursionRequestDocument() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -64,6 +50,7 @@ public UpdateExcursionRequestDocument() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.UpdateExcursionRequestDocument(); } + /// /// The deserialization information for the current model /// @@ -76,6 +63,7 @@ public virtual IDictionary> GetFieldDeserializers() { "meta", n => { Meta = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.Meta.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -89,3 +77,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/UpdateTransportRequestDocument.cs b/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/UpdateTransportRequestDocument.cs index f9f151248..4ee9923d2 100644 --- a/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/UpdateTransportRequestDocument.cs +++ b/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/UpdateTransportRequestDocument.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,38 +17,21 @@ public partial class UpdateTransportRequestDocument : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The data property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.DataInUpdateTransportRequest? Data { get { return BackingStore?.Get("data"); } set { BackingStore?.Set("data", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.DataInUpdateTransportRequest Data - { - get { return BackingStore?.Get("data"); } - set { BackingStore?.Set("data", value); } - } -#endif + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -54,6 +39,7 @@ public UpdateTransportRequestDocument() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -64,6 +50,7 @@ public UpdateTransportRequestDocument() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.UpdateTransportRequestDocument(); } + /// /// The deserialization information for the current model /// @@ -76,6 +63,7 @@ public virtual IDictionary> GetFieldDeserializers() { "meta", n => { Meta = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.Meta.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -89,3 +77,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/UpdateVacationRequestDocument.cs b/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/UpdateVacationRequestDocument.cs index 93519c7a7..bdd61c984 100644 --- a/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/UpdateVacationRequestDocument.cs +++ b/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/UpdateVacationRequestDocument.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,38 +17,21 @@ public partial class UpdateVacationRequestDocument : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The data property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.DataInUpdateVacationRequest? Data { get { return BackingStore?.Get("data"); } set { BackingStore?.Set("data", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.DataInUpdateVacationRequest Data - { - get { return BackingStore?.Get("data"); } - set { BackingStore?.Set("data", value); } - } -#endif + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -54,6 +39,7 @@ public UpdateVacationRequestDocument() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -64,6 +50,7 @@ public UpdateVacationRequestDocument() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.UpdateVacationRequestDocument(); } + /// /// The deserialization information for the current model /// @@ -76,6 +63,7 @@ public virtual IDictionary> GetFieldDeserializers() { "meta", n => { Meta = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.Meta.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -89,3 +77,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/VacationAttributesInResponse.cs b/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/VacationAttributesInResponse.cs index f5cb832ff..45f583a7e 100644 --- a/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/VacationAttributesInResponse.cs +++ b/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/VacationAttributesInResponse.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,18 +17,21 @@ public partial class VacationAttributesInResponse : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The endsAt property public DateTimeOffset? EndsAt { get { return BackingStore?.Get("endsAt"); } set { BackingStore?.Set("endsAt", value); } } + /// The startsAt property public DateTimeOffset? StartsAt { get { return BackingStore?.Get("startsAt"); } set { BackingStore?.Set("startsAt", value); } } + /// /// Instantiates a new and sets the default values. /// @@ -34,6 +39,7 @@ public VacationAttributesInResponse() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -44,6 +50,7 @@ public VacationAttributesInResponse() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.VacationAttributesInResponse(); } + /// /// The deserialization information for the current model /// @@ -56,6 +63,7 @@ public virtual IDictionary> GetFieldDeserializers() { "startsAt", n => { StartsAt = n.GetDateTimeOffsetValue(); } }, }; } + /// /// Serializes information the current object /// @@ -69,3 +77,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/VacationCollectionResponseDocument.cs b/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/VacationCollectionResponseDocument.cs index 820b23abc..896e0cb4c 100644 --- a/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/VacationCollectionResponseDocument.cs +++ b/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/VacationCollectionResponseDocument.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,70 +17,35 @@ public partial class VacationCollectionResponseDocument : IBackedModel, IParsabl { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The data property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public List? Data { get { return BackingStore?.Get?>("data"); } set { BackingStore?.Set("data", value); } } -#nullable restore -#else - public List Data - { - get { return BackingStore?.Get>("data"); } - set { BackingStore?.Set("data", value); } - } -#endif + /// The included property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public List? Included { get { return BackingStore?.Get?>("included"); } set { BackingStore?.Set("included", value); } } -#nullable restore -#else - public List Included - { - get { return BackingStore?.Get>("included"); } - set { BackingStore?.Set("included", value); } - } -#endif + /// The links property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.ResourceCollectionTopLevelLinks? Links { get { return BackingStore?.Get("links"); } set { BackingStore?.Set("links", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.ResourceCollectionTopLevelLinks Links - { - get { return BackingStore?.Get("links"); } - set { BackingStore?.Set("links", value); } - } -#endif + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -86,6 +53,7 @@ public VacationCollectionResponseDocument() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -96,6 +64,7 @@ public VacationCollectionResponseDocument() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.VacationCollectionResponseDocument(); } + /// /// The deserialization information for the current model /// @@ -110,6 +79,7 @@ public virtual IDictionary> GetFieldDeserializers() { "meta", n => { Meta = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.Meta.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -125,3 +95,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/VacationDataInResponse.cs b/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/VacationDataInResponse.cs index e4d3d0496..63eb2d7c8 100644 --- a/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/VacationDataInResponse.cs +++ b/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/VacationDataInResponse.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -13,69 +15,33 @@ public partial class VacationDataInResponse : global::OpenApiKiotaEndToEndTests. #pragma warning restore CS1591 { /// The attributes property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.VacationAttributesInResponse? Attributes { get { return BackingStore?.Get("attributes"); } set { BackingStore?.Set("attributes", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.VacationAttributesInResponse Attributes - { - get { return BackingStore?.Get("attributes"); } - set { BackingStore?.Set("attributes", value); } - } -#endif + /// The id property -#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 links property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.ResourceLinks? Links { get { return BackingStore?.Get("links"); } set { BackingStore?.Set("links", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.ResourceLinks Links - { - get { return BackingStore?.Get("links"); } - set { BackingStore?.Set("links", value); } - } -#endif + /// The relationships property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.VacationRelationshipsInResponse? Relationships { get { return BackingStore?.Get("relationships"); } set { BackingStore?.Set("relationships", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.VacationRelationshipsInResponse Relationships - { - get { return BackingStore?.Get("relationships"); } - set { BackingStore?.Set("relationships", value); } - } -#endif + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -86,6 +52,7 @@ public string Id _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.VacationDataInResponse(); } + /// /// The deserialization information for the current model /// @@ -100,6 +67,7 @@ public override IDictionary> GetFieldDeserializers() { "relationships", n => { Relationships = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.VacationRelationshipsInResponse.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -116,3 +84,4 @@ public override void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/VacationPrimaryResponseDocument.cs b/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/VacationPrimaryResponseDocument.cs index e0d073f17..23f087720 100644 --- a/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/VacationPrimaryResponseDocument.cs +++ b/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/VacationPrimaryResponseDocument.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,70 +17,35 @@ public partial class VacationPrimaryResponseDocument : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The data property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.VacationDataInResponse? Data { get { return BackingStore?.Get("data"); } set { BackingStore?.Set("data", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.VacationDataInResponse Data - { - get { return BackingStore?.Get("data"); } - set { BackingStore?.Set("data", value); } - } -#endif + /// The included property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public List? Included { get { return BackingStore?.Get?>("included"); } set { BackingStore?.Set("included", value); } } -#nullable restore -#else - public List Included - { - get { return BackingStore?.Get>("included"); } - set { BackingStore?.Set("included", value); } - } -#endif + /// The links property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.ResourceTopLevelLinks? Links { get { return BackingStore?.Get("links"); } set { BackingStore?.Set("links", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.ResourceTopLevelLinks Links - { - get { return BackingStore?.Get("links"); } - set { BackingStore?.Set("links", value); } - } -#endif + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -86,6 +53,7 @@ public VacationPrimaryResponseDocument() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -96,6 +64,7 @@ public VacationPrimaryResponseDocument() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.VacationPrimaryResponseDocument(); } + /// /// The deserialization information for the current model /// @@ -110,6 +79,7 @@ public virtual IDictionary> GetFieldDeserializers() { "meta", n => { Meta = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.Meta.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -125,3 +95,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/VacationRelationshipsInResponse.cs b/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/VacationRelationshipsInResponse.cs index daa56811b..58cedc8a1 100644 --- a/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/VacationRelationshipsInResponse.cs +++ b/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/VacationRelationshipsInResponse.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -14,55 +16,29 @@ public partial class VacationRelationshipsInResponse : IBackedModel, IParsable #pragma warning restore CS1591 { /// The accommodation property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.ToOneAccommodationInResponse? Accommodation { get { return BackingStore?.Get("accommodation"); } set { BackingStore?.Set("accommodation", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.ToOneAccommodationInResponse Accommodation - { - get { return BackingStore?.Get("accommodation"); } - set { BackingStore?.Set("accommodation", value); } - } -#endif + /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The excursions property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.ToManyExcursionInResponse? Excursions { get { return BackingStore?.Get("excursions"); } set { BackingStore?.Set("excursions", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.ToManyExcursionInResponse Excursions - { - get { return BackingStore?.Get("excursions"); } - set { BackingStore?.Set("excursions", value); } - } -#endif + /// The transport property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.NullableToOneTransportInResponse? Transport { get { return BackingStore?.Get("transport"); } set { BackingStore?.Set("transport", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.NullableToOneTransportInResponse Transport - { - get { return BackingStore?.Get("transport"); } - set { BackingStore?.Set("transport", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -70,6 +46,7 @@ public VacationRelationshipsInResponse() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -80,6 +57,7 @@ public VacationRelationshipsInResponse() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.VacationRelationshipsInResponse(); } + /// /// The deserialization information for the current model /// @@ -93,6 +71,7 @@ public virtual IDictionary> GetFieldDeserializers() { "transport", n => { Transport = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.NullableToOneTransportInResponse.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -107,3 +86,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/VacationResourceType.cs b/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/VacationResourceType.cs index f7b0424f7..6bdf8037b 100644 --- a/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/VacationResourceType.cs +++ b/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Models/VacationResourceType.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 using System.Runtime.Serialization; using System; namespace OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models @@ -14,3 +16,4 @@ public enum VacationResourceType #pragma warning restore CS1591 } } + diff --git a/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Transports/Item/TransportsItemRequestBuilder.cs b/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Transports/Item/TransportsItemRequestBuilder.cs index 9a9974919..d2242fb05 100644 --- a/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Transports/Item/TransportsItemRequestBuilder.cs +++ b/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Transports/Item/TransportsItemRequestBuilder.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -25,6 +27,7 @@ public partial class TransportsItemRequestBuilder : BaseRequestBuilder public TransportsItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/transports/{id}{?query*}", pathParameters) { } + /// /// Instantiates a new and sets the default values. /// @@ -33,21 +36,15 @@ public TransportsItemRequestBuilder(Dictionary pathParameters, I public TransportsItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/transports/{id}{?query*}", rawUrl) { } + /// /// Deletes an existing transport by its identifier. /// /// Cancellation token to use when cancelling requests /// Configuration for the request such as headers, query parameters, and middleware options. /// When receiving a 404 status code -#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> { @@ -55,6 +52,7 @@ public async Task DeleteAsync(Action /// Retrieves an individual transport by its identifier. /// @@ -63,15 +61,8 @@ public async Task DeleteAsync(ActionConfiguration for the request such as headers, query parameters, and middleware options. /// When receiving a 400 status code /// When receiving a 404 status code -#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> { @@ -80,23 +71,18 @@ public async Task DeleteAsync(Action(requestInfo, global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.TransportPrimaryResponseDocument.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// /// 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 HeadAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { -#nullable restore -#else - public async Task HeadAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) - { -#endif var requestInfo = ToHeadRequestInformation(requestConfiguration); await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); } + /// /// Updates an existing transport. /// @@ -108,15 +94,8 @@ public async Task HeadAsync(ActionWhen receiving a 404 status code /// When receiving a 409 status code /// When receiving a 422 status code -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public async Task PatchAsync(global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.UpdateTransportRequestDocument body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { -#nullable restore -#else - public async Task PatchAsync(global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.UpdateTransportRequestDocument body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) - { -#endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> @@ -128,77 +107,53 @@ public async Task HeadAsync(Action(requestInfo, global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.TransportPrimaryResponseDocument.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } + /// /// Deletes an existing transport by its identifier. /// /// A /// 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(Method.DELETE, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/vnd.api+json"); return requestInfo; } + /// /// Retrieves an individual transport by its identifier. /// /// A /// 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(Method.GET, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/vnd.api+json"); return requestInfo; } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// /// A /// 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 ToHeadRequestInformation(Action>? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToHeadRequestInformation(Action> requestConfiguration = default) - { -#endif var requestInfo = new RequestInformation(Method.HEAD, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); return requestInfo; } + /// /// Updates an existing transport. /// /// A /// 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(global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.UpdateTransportRequestDocument body, Action>? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToPatchRequestInformation(global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.UpdateTransportRequestDocument body, Action> requestConfiguration = default) - { -#endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); @@ -206,6 +161,7 @@ public RequestInformation ToPatchRequestInformation(global::OpenApiKiotaEndToEnd requestInfo.SetContentFromParsable(RequestAdapter, "application/vnd.api+json", body); return requestInfo; } + /// /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. /// @@ -215,6 +171,7 @@ public RequestInformation ToPatchRequestInformation(global::OpenApiKiotaEndToEnd { return new global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Transports.Item.TransportsItemRequestBuilder(rawUrl, RequestAdapter); } + /// /// Retrieves an individual transport by its identifier. /// @@ -222,16 +179,10 @@ public RequestInformation ToPatchRequestInformation(global::OpenApiKiotaEndToEnd public partial class TransportsItemRequestBuilderGetQueryParameters { /// For syntax, see the documentation for the [`include`](https://www.jsonapi.net/usage/reading/including-relationships.html)/[`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// @@ -239,16 +190,10 @@ public partial class TransportsItemRequestBuilderGetQueryParameters public partial class TransportsItemRequestBuilderHeadQueryParameters { /// For syntax, see the documentation for the [`include`](https://www.jsonapi.net/usage/reading/including-relationships.html)/[`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } + /// /// Updates an existing transport. /// @@ -256,16 +201,10 @@ public partial class TransportsItemRequestBuilderHeadQueryParameters public partial class TransportsItemRequestBuilderPatchQueryParameters { /// For syntax, see the documentation for the [`include`](https://www.jsonapi.net/usage/reading/including-relationships.html)/[`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Transports/TransportsRequestBuilder.cs b/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Transports/TransportsRequestBuilder.cs index 8788b163a..83d6944d9 100644 --- a/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Transports/TransportsRequestBuilder.cs +++ b/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Transports/TransportsRequestBuilder.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -30,6 +32,7 @@ public partial class TransportsRequestBuilder : BaseRequestBuilder return new global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Transports.Item.TransportsItemRequestBuilder(urlTplParams, RequestAdapter); } } + /// /// Instantiates a new and sets the default values. /// @@ -38,6 +41,7 @@ public partial class TransportsRequestBuilder : BaseRequestBuilder public TransportsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/transports{?query*}", pathParameters) { } + /// /// Instantiates a new and sets the default values. /// @@ -46,6 +50,7 @@ public TransportsRequestBuilder(Dictionary pathParameters, IRequ public TransportsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/transports{?query*}", rawUrl) { } + /// /// Retrieves a collection of transports. /// @@ -53,15 +58,8 @@ public TransportsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : /// Cancellation token to use when cancelling requests /// Configuration for the request such as headers, query parameters, and middleware options. /// When receiving a 400 status code -#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> { @@ -69,23 +67,18 @@ public TransportsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : }; return await RequestAdapter.SendAsync(requestInfo, global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.TransportCollectionResponseDocument.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// /// 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 HeadAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { -#nullable restore -#else - public async Task HeadAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) - { -#endif var requestInfo = ToHeadRequestInformation(requestConfiguration); await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); } + /// /// Creates a new transport. /// @@ -98,15 +91,8 @@ public async Task HeadAsync(ActionWhen receiving a 404 status code /// When receiving a 409 status code /// When receiving a 422 status code -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public async Task PostAsync(global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.CreateTransportRequestDocument body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { -#nullable restore -#else - public async Task PostAsync(global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.CreateTransportRequestDocument body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) - { -#endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> @@ -119,58 +105,40 @@ public async Task HeadAsync(Action(requestInfo, global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.TransportPrimaryResponseDocument.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } + /// /// Retrieves a collection of transports. /// /// A /// 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(Method.GET, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/vnd.api+json"); return requestInfo; } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// /// A /// 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 ToHeadRequestInformation(Action>? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToHeadRequestInformation(Action> requestConfiguration = default) - { -#endif var requestInfo = new RequestInformation(Method.HEAD, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); return requestInfo; } + /// /// Creates a new transport. /// /// A /// 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(global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.CreateTransportRequestDocument body, Action>? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToPostRequestInformation(global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.CreateTransportRequestDocument body, Action> requestConfiguration = default) - { -#endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); @@ -178,6 +146,7 @@ public RequestInformation ToPostRequestInformation(global::OpenApiKiotaEndToEndT requestInfo.SetContentFromParsable(RequestAdapter, "application/vnd.api+json", body); return requestInfo; } + /// /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. /// @@ -187,6 +156,7 @@ public RequestInformation ToPostRequestInformation(global::OpenApiKiotaEndToEndT { return new global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Transports.TransportsRequestBuilder(rawUrl, RequestAdapter); } + /// /// Retrieves a collection of transports. /// @@ -194,16 +164,10 @@ public RequestInformation ToPostRequestInformation(global::OpenApiKiotaEndToEndT public partial class TransportsRequestBuilderGetQueryParameters { /// For syntax, see the documentation for the [`include`](https://www.jsonapi.net/usage/reading/including-relationships.html)/[`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// @@ -211,16 +175,10 @@ public partial class TransportsRequestBuilderGetQueryParameters public partial class TransportsRequestBuilderHeadQueryParameters { /// For syntax, see the documentation for the [`include`](https://www.jsonapi.net/usage/reading/including-relationships.html)/[`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } + /// /// Creates a new transport. /// @@ -228,16 +186,10 @@ public partial class TransportsRequestBuilderHeadQueryParameters public partial class TransportsRequestBuilderPostQueryParameters { /// For syntax, see the documentation for the [`include`](https://www.jsonapi.net/usage/reading/including-relationships.html)/[`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Vacations/Item/Accommodation/AccommodationRequestBuilder.cs b/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Vacations/Item/Accommodation/AccommodationRequestBuilder.cs index 2e4e7af63..946aaff68 100644 --- a/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Vacations/Item/Accommodation/AccommodationRequestBuilder.cs +++ b/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Vacations/Item/Accommodation/AccommodationRequestBuilder.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -25,6 +27,7 @@ public partial class AccommodationRequestBuilder : BaseRequestBuilder public AccommodationRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/vacations/{id}/accommodation{?query*}", pathParameters) { } + /// /// Instantiates a new and sets the default values. /// @@ -33,6 +36,7 @@ public AccommodationRequestBuilder(Dictionary pathParameters, IR public AccommodationRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/vacations/{id}/accommodation{?query*}", rawUrl) { } + /// /// Retrieves the related accommodation of an individual vacation's accommodation relationship. /// @@ -41,15 +45,8 @@ public AccommodationRequestBuilder(string rawUrl, IRequestAdapter requestAdapter /// Configuration for the request such as headers, query parameters, and middleware options. /// When receiving a 400 status code /// When receiving a 404 status code -#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> { @@ -58,60 +55,43 @@ public AccommodationRequestBuilder(string rawUrl, IRequestAdapter requestAdapter }; return await RequestAdapter.SendAsync(requestInfo, global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.AccommodationSecondaryResponseDocument.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// /// 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 HeadAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { -#nullable restore -#else - public async Task HeadAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) - { -#endif var requestInfo = ToHeadRequestInformation(requestConfiguration); await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); } + /// /// Retrieves the related accommodation of an individual vacation's accommodation relationship. /// /// A /// 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(Method.GET, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/vnd.api+json"); return requestInfo; } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// /// A /// 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 ToHeadRequestInformation(Action>? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToHeadRequestInformation(Action> requestConfiguration = default) - { -#endif var requestInfo = new RequestInformation(Method.HEAD, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); return requestInfo; } + /// /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. /// @@ -121,6 +101,7 @@ public RequestInformation ToHeadRequestInformation(Action /// Retrieves the related accommodation of an individual vacation's accommodation relationship. /// @@ -128,16 +109,10 @@ public RequestInformation ToHeadRequestInformation(ActionFor syntax, see the documentation for the [`include`](https://www.jsonapi.net/usage/reading/including-relationships.html)/[`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// @@ -145,16 +120,10 @@ public partial class AccommodationRequestBuilderGetQueryParameters public partial class AccommodationRequestBuilderHeadQueryParameters { /// For syntax, see the documentation for the [`include`](https://www.jsonapi.net/usage/reading/including-relationships.html)/[`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Vacations/Item/Excursions/ExcursionsRequestBuilder.cs b/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Vacations/Item/Excursions/ExcursionsRequestBuilder.cs index 3b8e5aad8..8f7aa19c6 100644 --- a/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Vacations/Item/Excursions/ExcursionsRequestBuilder.cs +++ b/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Vacations/Item/Excursions/ExcursionsRequestBuilder.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -25,6 +27,7 @@ public partial class ExcursionsRequestBuilder : BaseRequestBuilder public ExcursionsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/vacations/{id}/excursions{?query*}", pathParameters) { } + /// /// Instantiates a new and sets the default values. /// @@ -33,6 +36,7 @@ public ExcursionsRequestBuilder(Dictionary pathParameters, IRequ public ExcursionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/vacations/{id}/excursions{?query*}", rawUrl) { } + /// /// Retrieves the related excursions of an individual vacation's excursions relationship. /// @@ -41,15 +45,8 @@ public ExcursionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : /// Configuration for the request such as headers, query parameters, and middleware options. /// When receiving a 400 status code /// When receiving a 404 status code -#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> { @@ -58,60 +55,43 @@ public ExcursionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : }; return await RequestAdapter.SendAsync(requestInfo, global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.ExcursionCollectionResponseDocument.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// /// 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 HeadAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { -#nullable restore -#else - public async Task HeadAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) - { -#endif var requestInfo = ToHeadRequestInformation(requestConfiguration); await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); } + /// /// Retrieves the related excursions of an individual vacation's excursions relationship. /// /// A /// 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(Method.GET, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/vnd.api+json"); return requestInfo; } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// /// A /// 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 ToHeadRequestInformation(Action>? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToHeadRequestInformation(Action> requestConfiguration = default) - { -#endif var requestInfo = new RequestInformation(Method.HEAD, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); return requestInfo; } + /// /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. /// @@ -121,6 +101,7 @@ public RequestInformation ToHeadRequestInformation(Action /// Retrieves the related excursions of an individual vacation's excursions relationship. /// @@ -128,16 +109,10 @@ public RequestInformation ToHeadRequestInformation(ActionFor syntax, see the documentation for the [`include`](https://www.jsonapi.net/usage/reading/including-relationships.html)/[`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// @@ -145,16 +120,10 @@ public partial class ExcursionsRequestBuilderGetQueryParameters public partial class ExcursionsRequestBuilderHeadQueryParameters { /// For syntax, see the documentation for the [`include`](https://www.jsonapi.net/usage/reading/including-relationships.html)/[`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Vacations/Item/Relationships/Accommodation/AccommodationRequestBuilder.cs b/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Vacations/Item/Relationships/Accommodation/AccommodationRequestBuilder.cs index 1bbcf2a31..23b796015 100644 --- a/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Vacations/Item/Relationships/Accommodation/AccommodationRequestBuilder.cs +++ b/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Vacations/Item/Relationships/Accommodation/AccommodationRequestBuilder.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -25,6 +27,7 @@ public partial class AccommodationRequestBuilder : BaseRequestBuilder public AccommodationRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/vacations/{id}/relationships/accommodation{?query*}", pathParameters) { } + /// /// Instantiates a new and sets the default values. /// @@ -33,6 +36,7 @@ public AccommodationRequestBuilder(Dictionary pathParameters, IR public AccommodationRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/vacations/{id}/relationships/accommodation{?query*}", rawUrl) { } + /// /// Retrieves the related accommodation identity of an individual vacation's accommodation relationship. /// @@ -41,15 +45,8 @@ public AccommodationRequestBuilder(string rawUrl, IRequestAdapter requestAdapter /// Configuration for the request such as headers, query parameters, and middleware options. /// When receiving a 400 status code /// When receiving a 404 status code -#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> { @@ -58,23 +55,18 @@ public AccommodationRequestBuilder(string rawUrl, IRequestAdapter requestAdapter }; return await RequestAdapter.SendAsync(requestInfo, global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.AccommodationIdentifierResponseDocument.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// /// 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 HeadAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { -#nullable restore -#else - public async Task HeadAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) - { -#endif var requestInfo = ToHeadRequestInformation(requestConfiguration); await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); } + /// /// Assigns an existing accommodation to the accommodation relationship of an individual vacation. /// @@ -84,15 +76,8 @@ public async Task HeadAsync(ActionWhen receiving a 400 status code /// When receiving a 404 status code /// When receiving a 409 status code -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public async Task PatchAsync(global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.ToOneAccommodationInRequest body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { -#nullable restore -#else - public async Task PatchAsync(global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.ToOneAccommodationInRequest body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) - { -#endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> @@ -103,58 +88,40 @@ public async Task PatchAsync(global::OpenApiKiotaEndToEndTests.Links.GeneratedCo }; await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); } + /// /// Retrieves the related accommodation identity of an individual vacation's accommodation relationship. /// /// A /// 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(Method.GET, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/vnd.api+json"); return requestInfo; } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// /// A /// 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 ToHeadRequestInformation(Action>? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToHeadRequestInformation(Action> requestConfiguration = default) - { -#endif var requestInfo = new RequestInformation(Method.HEAD, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); return requestInfo; } + /// /// Assigns an existing accommodation to the accommodation relationship of an individual vacation. /// /// A /// 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(global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.ToOneAccommodationInRequest body, Action>? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToPatchRequestInformation(global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.ToOneAccommodationInRequest body, Action> requestConfiguration = default) - { -#endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); @@ -162,6 +129,7 @@ public RequestInformation ToPatchRequestInformation(global::OpenApiKiotaEndToEnd requestInfo.SetContentFromParsable(RequestAdapter, "application/vnd.api+json", body); return requestInfo; } + /// /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. /// @@ -171,6 +139,7 @@ public RequestInformation ToPatchRequestInformation(global::OpenApiKiotaEndToEnd { return new global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Vacations.Item.Relationships.Accommodation.AccommodationRequestBuilder(rawUrl, RequestAdapter); } + /// /// Retrieves the related accommodation identity of an individual vacation's accommodation relationship. /// @@ -178,16 +147,10 @@ public RequestInformation ToPatchRequestInformation(global::OpenApiKiotaEndToEnd public partial class AccommodationRequestBuilderGetQueryParameters { /// For syntax, see the documentation for the [`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// @@ -195,16 +158,10 @@ public partial class AccommodationRequestBuilderGetQueryParameters public partial class AccommodationRequestBuilderHeadQueryParameters { /// For syntax, see the documentation for the [`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Vacations/Item/Relationships/Excursions/ExcursionsRequestBuilder.cs b/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Vacations/Item/Relationships/Excursions/ExcursionsRequestBuilder.cs index da057138e..02df9707b 100644 --- a/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Vacations/Item/Relationships/Excursions/ExcursionsRequestBuilder.cs +++ b/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Vacations/Item/Relationships/Excursions/ExcursionsRequestBuilder.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -25,6 +27,7 @@ public partial class ExcursionsRequestBuilder : BaseRequestBuilder public ExcursionsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/vacations/{id}/relationships/excursions{?query*}", pathParameters) { } + /// /// Instantiates a new and sets the default values. /// @@ -33,6 +36,7 @@ public ExcursionsRequestBuilder(Dictionary pathParameters, IRequ public ExcursionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/vacations/{id}/relationships/excursions{?query*}", rawUrl) { } + /// /// Removes existing excursions from the excursions relationship of an individual vacation. /// @@ -42,15 +46,8 @@ public ExcursionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : /// When receiving a 400 status code /// When receiving a 404 status code /// When receiving a 409 status code -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public async Task DeleteAsync(global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.ToManyExcursionInRequest body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { -#nullable restore -#else - public async Task DeleteAsync(global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.ToManyExcursionInRequest body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) - { -#endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = ToDeleteRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> @@ -61,6 +58,7 @@ public async Task DeleteAsync(global::OpenApiKiotaEndToEndTests.Links.GeneratedC }; await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); } + /// /// Retrieves the related excursion identities of an individual vacation's excursions relationship. /// @@ -69,15 +67,8 @@ public async Task DeleteAsync(global::OpenApiKiotaEndToEndTests.Links.GeneratedC /// Configuration for the request such as headers, query parameters, and middleware options. /// When receiving a 400 status code /// When receiving a 404 status code -#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> { @@ -86,23 +77,18 @@ public async Task DeleteAsync(global::OpenApiKiotaEndToEndTests.Links.GeneratedC }; return await RequestAdapter.SendAsync(requestInfo, global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.ExcursionIdentifierCollectionResponseDocument.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// /// 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 HeadAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { -#nullable restore -#else - public async Task HeadAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) - { -#endif var requestInfo = ToHeadRequestInformation(requestConfiguration); await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); } + /// /// Assigns existing excursions to the excursions relationship of an individual vacation. /// @@ -112,15 +98,8 @@ public async Task HeadAsync(ActionWhen receiving a 400 status code /// When receiving a 404 status code /// When receiving a 409 status code -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public async Task PatchAsync(global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.ToManyExcursionInRequest body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { -#nullable restore -#else - public async Task PatchAsync(global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.ToManyExcursionInRequest body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) - { -#endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> @@ -131,6 +110,7 @@ public async Task PatchAsync(global::OpenApiKiotaEndToEndTests.Links.GeneratedCo }; await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); } + /// /// Adds existing excursions to the excursions relationship of an individual vacation. /// @@ -140,15 +120,8 @@ public async Task PatchAsync(global::OpenApiKiotaEndToEndTests.Links.GeneratedCo /// When receiving a 400 status code /// When receiving a 404 status code /// When receiving a 409 status code -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public async Task PostAsync(global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.ToManyExcursionInRequest body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { -#nullable restore -#else - public async Task PostAsync(global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.ToManyExcursionInRequest body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) - { -#endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> @@ -159,21 +132,15 @@ public async Task PostAsync(global::OpenApiKiotaEndToEndTests.Links.GeneratedCod }; await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); } + /// /// Removes existing excursions from the excursions relationship of an individual vacation. /// /// A /// 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 ToDeleteRequestInformation(global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.ToManyExcursionInRequest body, Action>? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToDeleteRequestInformation(global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.ToManyExcursionInRequest body, Action> requestConfiguration = default) - { -#endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); @@ -181,58 +148,40 @@ public RequestInformation ToDeleteRequestInformation(global::OpenApiKiotaEndToEn requestInfo.SetContentFromParsable(RequestAdapter, "application/vnd.api+json", body); return requestInfo; } + /// /// Retrieves the related excursion identities of an individual vacation's excursions relationship. /// /// A /// 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(Method.GET, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/vnd.api+json"); return requestInfo; } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// /// A /// 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 ToHeadRequestInformation(Action>? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToHeadRequestInformation(Action> requestConfiguration = default) - { -#endif var requestInfo = new RequestInformation(Method.HEAD, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); return requestInfo; } + /// /// Assigns existing excursions to the excursions relationship of an individual vacation. /// /// A /// 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(global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.ToManyExcursionInRequest body, Action>? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToPatchRequestInformation(global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.ToManyExcursionInRequest body, Action> requestConfiguration = default) - { -#endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); @@ -240,21 +189,15 @@ public RequestInformation ToPatchRequestInformation(global::OpenApiKiotaEndToEnd requestInfo.SetContentFromParsable(RequestAdapter, "application/vnd.api+json", body); return requestInfo; } + /// /// Adds existing excursions to the excursions relationship of an individual vacation. /// /// A /// 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(global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.ToManyExcursionInRequest body, Action>? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToPostRequestInformation(global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.ToManyExcursionInRequest body, Action> requestConfiguration = default) - { -#endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); @@ -262,6 +205,7 @@ public RequestInformation ToPostRequestInformation(global::OpenApiKiotaEndToEndT requestInfo.SetContentFromParsable(RequestAdapter, "application/vnd.api+json", body); return requestInfo; } + /// /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. /// @@ -271,6 +215,7 @@ public RequestInformation ToPostRequestInformation(global::OpenApiKiotaEndToEndT { return new global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Vacations.Item.Relationships.Excursions.ExcursionsRequestBuilder(rawUrl, RequestAdapter); } + /// /// Retrieves the related excursion identities of an individual vacation's excursions relationship. /// @@ -278,16 +223,10 @@ public RequestInformation ToPostRequestInformation(global::OpenApiKiotaEndToEndT public partial class ExcursionsRequestBuilderGetQueryParameters { /// For syntax, see the documentation for the [`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// @@ -295,16 +234,10 @@ public partial class ExcursionsRequestBuilderGetQueryParameters public partial class ExcursionsRequestBuilderHeadQueryParameters { /// For syntax, see the documentation for the [`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Vacations/Item/Relationships/RelationshipsRequestBuilder.cs b/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Vacations/Item/Relationships/RelationshipsRequestBuilder.cs index 8e3be5ffe..bf3a3380f 100644 --- a/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Vacations/Item/Relationships/RelationshipsRequestBuilder.cs +++ b/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Vacations/Item/Relationships/RelationshipsRequestBuilder.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions; @@ -22,16 +24,19 @@ public partial class RelationshipsRequestBuilder : BaseRequestBuilder { get => new global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Vacations.Item.Relationships.Accommodation.AccommodationRequestBuilder(PathParameters, RequestAdapter); } + /// The excursions property public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Vacations.Item.Relationships.Excursions.ExcursionsRequestBuilder Excursions { get => new global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Vacations.Item.Relationships.Excursions.ExcursionsRequestBuilder(PathParameters, RequestAdapter); } + /// The transport property public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Vacations.Item.Relationships.Transport.TransportRequestBuilder Transport { get => new global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Vacations.Item.Relationships.Transport.TransportRequestBuilder(PathParameters, RequestAdapter); } + /// /// Instantiates a new and sets the default values. /// @@ -40,6 +45,7 @@ public partial class RelationshipsRequestBuilder : BaseRequestBuilder public RelationshipsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/vacations/{id}/relationships", pathParameters) { } + /// /// Instantiates a new and sets the default values. /// @@ -51,3 +57,4 @@ public RelationshipsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Vacations/Item/Relationships/Transport/TransportRequestBuilder.cs b/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Vacations/Item/Relationships/Transport/TransportRequestBuilder.cs index cc096ee5a..57f42c3c8 100644 --- a/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Vacations/Item/Relationships/Transport/TransportRequestBuilder.cs +++ b/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Vacations/Item/Relationships/Transport/TransportRequestBuilder.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -25,6 +27,7 @@ public partial class TransportRequestBuilder : BaseRequestBuilder public TransportRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/vacations/{id}/relationships/transport{?query*}", pathParameters) { } + /// /// Instantiates a new and sets the default values. /// @@ -33,6 +36,7 @@ public TransportRequestBuilder(Dictionary pathParameters, IReque public TransportRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/vacations/{id}/relationships/transport{?query*}", rawUrl) { } + /// /// Retrieves the related transport identity of an individual vacation's transport relationship. /// @@ -41,15 +45,8 @@ public TransportRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : /// Configuration for the request such as headers, query parameters, and middleware options. /// When receiving a 400 status code /// When receiving a 404 status code -#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> { @@ -58,23 +55,18 @@ public TransportRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : }; return await RequestAdapter.SendAsync(requestInfo, global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.NullableTransportIdentifierResponseDocument.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// /// 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 HeadAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { -#nullable restore -#else - public async Task HeadAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) - { -#endif var requestInfo = ToHeadRequestInformation(requestConfiguration); await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); } + /// /// Clears or assigns an existing transport to the transport relationship of an individual vacation. /// @@ -84,15 +76,8 @@ public async Task HeadAsync(ActionWhen receiving a 400 status code /// When receiving a 404 status code /// When receiving a 409 status code -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public async Task PatchAsync(global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.NullableToOneTransportInRequest body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { -#nullable restore -#else - public async Task PatchAsync(global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.NullableToOneTransportInRequest body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) - { -#endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> @@ -103,58 +88,40 @@ public async Task PatchAsync(global::OpenApiKiotaEndToEndTests.Links.GeneratedCo }; await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); } + /// /// Retrieves the related transport identity of an individual vacation's transport relationship. /// /// A /// 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(Method.GET, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/vnd.api+json"); return requestInfo; } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// /// A /// 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 ToHeadRequestInformation(Action>? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToHeadRequestInformation(Action> requestConfiguration = default) - { -#endif var requestInfo = new RequestInformation(Method.HEAD, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); return requestInfo; } + /// /// Clears or assigns an existing transport to the transport relationship of an individual vacation. /// /// A /// 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(global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.NullableToOneTransportInRequest body, Action>? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToPatchRequestInformation(global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.NullableToOneTransportInRequest body, Action> requestConfiguration = default) - { -#endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); @@ -162,6 +129,7 @@ public RequestInformation ToPatchRequestInformation(global::OpenApiKiotaEndToEnd requestInfo.SetContentFromParsable(RequestAdapter, "application/vnd.api+json", body); return requestInfo; } + /// /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. /// @@ -171,6 +139,7 @@ public RequestInformation ToPatchRequestInformation(global::OpenApiKiotaEndToEnd { return new global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Vacations.Item.Relationships.Transport.TransportRequestBuilder(rawUrl, RequestAdapter); } + /// /// Retrieves the related transport identity of an individual vacation's transport relationship. /// @@ -178,16 +147,10 @@ public RequestInformation ToPatchRequestInformation(global::OpenApiKiotaEndToEnd public partial class TransportRequestBuilderGetQueryParameters { /// For syntax, see the documentation for the [`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// @@ -195,16 +158,10 @@ public partial class TransportRequestBuilderGetQueryParameters public partial class TransportRequestBuilderHeadQueryParameters { /// For syntax, see the documentation for the [`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Vacations/Item/Transport/TransportRequestBuilder.cs b/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Vacations/Item/Transport/TransportRequestBuilder.cs index 3a2bd0432..0e3b7427c 100644 --- a/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Vacations/Item/Transport/TransportRequestBuilder.cs +++ b/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Vacations/Item/Transport/TransportRequestBuilder.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -25,6 +27,7 @@ public partial class TransportRequestBuilder : BaseRequestBuilder public TransportRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/vacations/{id}/transport{?query*}", pathParameters) { } + /// /// Instantiates a new and sets the default values. /// @@ -33,6 +36,7 @@ public TransportRequestBuilder(Dictionary pathParameters, IReque public TransportRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/vacations/{id}/transport{?query*}", rawUrl) { } + /// /// Retrieves the related transport of an individual vacation's transport relationship. /// @@ -41,15 +45,8 @@ public TransportRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : /// Configuration for the request such as headers, query parameters, and middleware options. /// When receiving a 400 status code /// When receiving a 404 status code -#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> { @@ -58,60 +55,43 @@ public TransportRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : }; return await RequestAdapter.SendAsync(requestInfo, global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.NullableTransportSecondaryResponseDocument.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// /// 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 HeadAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { -#nullable restore -#else - public async Task HeadAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) - { -#endif var requestInfo = ToHeadRequestInformation(requestConfiguration); await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); } + /// /// Retrieves the related transport of an individual vacation's transport relationship. /// /// A /// 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(Method.GET, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/vnd.api+json"); return requestInfo; } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// /// A /// 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 ToHeadRequestInformation(Action>? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToHeadRequestInformation(Action> requestConfiguration = default) - { -#endif var requestInfo = new RequestInformation(Method.HEAD, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); return requestInfo; } + /// /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. /// @@ -121,6 +101,7 @@ public RequestInformation ToHeadRequestInformation(Action /// Retrieves the related transport of an individual vacation's transport relationship. /// @@ -128,16 +109,10 @@ public RequestInformation ToHeadRequestInformation(ActionFor syntax, see the documentation for the [`include`](https://www.jsonapi.net/usage/reading/including-relationships.html)/[`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// @@ -145,16 +120,10 @@ public partial class TransportRequestBuilderGetQueryParameters public partial class TransportRequestBuilderHeadQueryParameters { /// For syntax, see the documentation for the [`include`](https://www.jsonapi.net/usage/reading/including-relationships.html)/[`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Vacations/Item/VacationsItemRequestBuilder.cs b/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Vacations/Item/VacationsItemRequestBuilder.cs index ebaf12a19..3ceaa4c47 100644 --- a/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Vacations/Item/VacationsItemRequestBuilder.cs +++ b/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Vacations/Item/VacationsItemRequestBuilder.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -26,21 +28,25 @@ public partial class VacationsItemRequestBuilder : BaseRequestBuilder { get => new global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Vacations.Item.Accommodation.AccommodationRequestBuilder(PathParameters, RequestAdapter); } + /// The excursions property public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Vacations.Item.Excursions.ExcursionsRequestBuilder Excursions { get => new global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Vacations.Item.Excursions.ExcursionsRequestBuilder(PathParameters, RequestAdapter); } + /// The relationships property public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Vacations.Item.Relationships.RelationshipsRequestBuilder Relationships { get => new global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Vacations.Item.Relationships.RelationshipsRequestBuilder(PathParameters, RequestAdapter); } + /// The transport property public global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Vacations.Item.Transport.TransportRequestBuilder Transport { get => new global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Vacations.Item.Transport.TransportRequestBuilder(PathParameters, RequestAdapter); } + /// /// Instantiates a new and sets the default values. /// @@ -49,6 +55,7 @@ public partial class VacationsItemRequestBuilder : BaseRequestBuilder public VacationsItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/vacations/{id}{?query*}", pathParameters) { } + /// /// Instantiates a new and sets the default values. /// @@ -57,21 +64,15 @@ public VacationsItemRequestBuilder(Dictionary pathParameters, IR public VacationsItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/vacations/{id}{?query*}", rawUrl) { } + /// /// Deletes an existing vacation by its identifier. /// /// Cancellation token to use when cancelling requests /// Configuration for the request such as headers, query parameters, and middleware options. /// When receiving a 404 status code -#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> { @@ -79,6 +80,7 @@ public async Task DeleteAsync(Action /// Retrieves an individual vacation by its identifier. /// @@ -87,15 +89,8 @@ public async Task DeleteAsync(ActionConfiguration for the request such as headers, query parameters, and middleware options. /// When receiving a 400 status code /// When receiving a 404 status code -#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> { @@ -104,23 +99,18 @@ public async Task DeleteAsync(Action(requestInfo, global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.VacationPrimaryResponseDocument.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// /// 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 HeadAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { -#nullable restore -#else - public async Task HeadAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) - { -#endif var requestInfo = ToHeadRequestInformation(requestConfiguration); await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); } + /// /// Updates an existing vacation. /// @@ -132,15 +122,8 @@ public async Task HeadAsync(ActionWhen receiving a 404 status code /// When receiving a 409 status code /// When receiving a 422 status code -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public async Task PatchAsync(global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.UpdateVacationRequestDocument body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { -#nullable restore -#else - public async Task PatchAsync(global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.UpdateVacationRequestDocument body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) - { -#endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> @@ -152,77 +135,53 @@ public async Task HeadAsync(Action(requestInfo, global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.VacationPrimaryResponseDocument.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } + /// /// Deletes an existing vacation by its identifier. /// /// A /// 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(Method.DELETE, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/vnd.api+json"); return requestInfo; } + /// /// Retrieves an individual vacation by its identifier. /// /// A /// 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(Method.GET, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/vnd.api+json"); return requestInfo; } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// /// A /// 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 ToHeadRequestInformation(Action>? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToHeadRequestInformation(Action> requestConfiguration = default) - { -#endif var requestInfo = new RequestInformation(Method.HEAD, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); return requestInfo; } + /// /// Updates an existing vacation. /// /// A /// 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(global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.UpdateVacationRequestDocument body, Action>? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToPatchRequestInformation(global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.UpdateVacationRequestDocument body, Action> requestConfiguration = default) - { -#endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); @@ -230,6 +189,7 @@ public RequestInformation ToPatchRequestInformation(global::OpenApiKiotaEndToEnd requestInfo.SetContentFromParsable(RequestAdapter, "application/vnd.api+json", body); return requestInfo; } + /// /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. /// @@ -239,6 +199,7 @@ public RequestInformation ToPatchRequestInformation(global::OpenApiKiotaEndToEnd { return new global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Vacations.Item.VacationsItemRequestBuilder(rawUrl, RequestAdapter); } + /// /// Retrieves an individual vacation by its identifier. /// @@ -246,16 +207,10 @@ public RequestInformation ToPatchRequestInformation(global::OpenApiKiotaEndToEnd public partial class VacationsItemRequestBuilderGetQueryParameters { /// For syntax, see the documentation for the [`include`](https://www.jsonapi.net/usage/reading/including-relationships.html)/[`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// @@ -263,16 +218,10 @@ public partial class VacationsItemRequestBuilderGetQueryParameters public partial class VacationsItemRequestBuilderHeadQueryParameters { /// For syntax, see the documentation for the [`include`](https://www.jsonapi.net/usage/reading/including-relationships.html)/[`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } + /// /// Updates an existing vacation. /// @@ -280,16 +229,10 @@ public partial class VacationsItemRequestBuilderHeadQueryParameters public partial class VacationsItemRequestBuilderPatchQueryParameters { /// For syntax, see the documentation for the [`include`](https://www.jsonapi.net/usage/reading/including-relationships.html)/[`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Vacations/VacationsRequestBuilder.cs b/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Vacations/VacationsRequestBuilder.cs index 9c1b2f235..67a85976c 100644 --- a/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Vacations/VacationsRequestBuilder.cs +++ b/test/OpenApiKiotaEndToEndTests/Links/GeneratedCode/Vacations/VacationsRequestBuilder.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -30,6 +32,7 @@ public partial class VacationsRequestBuilder : BaseRequestBuilder return new global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Vacations.Item.VacationsItemRequestBuilder(urlTplParams, RequestAdapter); } } + /// /// Instantiates a new and sets the default values. /// @@ -38,6 +41,7 @@ public partial class VacationsRequestBuilder : BaseRequestBuilder public VacationsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/vacations{?query*}", pathParameters) { } + /// /// Instantiates a new and sets the default values. /// @@ -46,6 +50,7 @@ public VacationsRequestBuilder(Dictionary pathParameters, IReque public VacationsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/vacations{?query*}", rawUrl) { } + /// /// Retrieves a collection of vacations. /// @@ -53,15 +58,8 @@ public VacationsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : /// Cancellation token to use when cancelling requests /// Configuration for the request such as headers, query parameters, and middleware options. /// When receiving a 400 status code -#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> { @@ -69,23 +67,18 @@ public VacationsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : }; return await RequestAdapter.SendAsync(requestInfo, global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.VacationCollectionResponseDocument.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// /// 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 HeadAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { -#nullable restore -#else - public async Task HeadAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) - { -#endif var requestInfo = ToHeadRequestInformation(requestConfiguration); await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); } + /// /// Creates a new vacation. /// @@ -98,15 +91,8 @@ public async Task HeadAsync(ActionWhen receiving a 404 status code /// When receiving a 409 status code /// When receiving a 422 status code -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public async Task PostAsync(global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.CreateVacationRequestDocument body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { -#nullable restore -#else - public async Task PostAsync(global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.CreateVacationRequestDocument body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) - { -#endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> @@ -119,58 +105,40 @@ public async Task HeadAsync(Action(requestInfo, global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.VacationPrimaryResponseDocument.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } + /// /// Retrieves a collection of vacations. /// /// A /// 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(Method.GET, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/vnd.api+json"); return requestInfo; } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// /// A /// 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 ToHeadRequestInformation(Action>? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToHeadRequestInformation(Action> requestConfiguration = default) - { -#endif var requestInfo = new RequestInformation(Method.HEAD, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); return requestInfo; } + /// /// Creates a new vacation. /// /// A /// 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(global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.CreateVacationRequestDocument body, Action>? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToPostRequestInformation(global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Models.CreateVacationRequestDocument body, Action> requestConfiguration = default) - { -#endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); @@ -178,6 +146,7 @@ public RequestInformation ToPostRequestInformation(global::OpenApiKiotaEndToEndT requestInfo.SetContentFromParsable(RequestAdapter, "application/vnd.api+json", body); return requestInfo; } + /// /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. /// @@ -187,6 +156,7 @@ public RequestInformation ToPostRequestInformation(global::OpenApiKiotaEndToEndT { return new global::OpenApiKiotaEndToEndTests.Links.GeneratedCode.Vacations.VacationsRequestBuilder(rawUrl, RequestAdapter); } + /// /// Retrieves a collection of vacations. /// @@ -194,16 +164,10 @@ public RequestInformation ToPostRequestInformation(global::OpenApiKiotaEndToEndT public partial class VacationsRequestBuilderGetQueryParameters { /// For syntax, see the documentation for the [`include`](https://www.jsonapi.net/usage/reading/including-relationships.html)/[`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// @@ -211,16 +175,10 @@ public partial class VacationsRequestBuilderGetQueryParameters public partial class VacationsRequestBuilderHeadQueryParameters { /// For syntax, see the documentation for the [`include`](https://www.jsonapi.net/usage/reading/including-relationships.html)/[`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } + /// /// Creates a new vacation. /// @@ -228,16 +186,10 @@ public partial class VacationsRequestBuilderHeadQueryParameters public partial class VacationsRequestBuilderPostQueryParameters { /// For syntax, see the documentation for the [`include`](https://www.jsonapi.net/usage/reading/including-relationships.html)/[`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/ModelStateValidation/GeneratedCode/ModelStateValidationClient.cs b/test/OpenApiKiotaEndToEndTests/ModelStateValidation/GeneratedCode/ModelStateValidationClient.cs index ae5f0729d..7a4db8f18 100644 --- a/test/OpenApiKiotaEndToEndTests/ModelStateValidation/GeneratedCode/ModelStateValidationClient.cs +++ b/test/OpenApiKiotaEndToEndTests/ModelStateValidation/GeneratedCode/ModelStateValidationClient.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Store; @@ -25,6 +27,7 @@ public partial class ModelStateValidationClient : BaseRequestBuilder { get => new global::OpenApiKiotaEndToEndTests.ModelStateValidation.GeneratedCode.SocialMediaAccounts.SocialMediaAccountsRequestBuilder(PathParameters, RequestAdapter); } + /// /// Instantiates a new and sets the default values. /// @@ -49,3 +52,4 @@ public partial class ModelStateValidationClient : BaseRequestBuilder } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/ModelStateValidation/GeneratedCode/Models/AttributesInCreateSocialMediaAccountRequest.cs b/test/OpenApiKiotaEndToEndTests/ModelStateValidation/GeneratedCode/Models/AttributesInCreateSocialMediaAccountRequest.cs index e54e75841..560fa9ee3 100644 --- a/test/OpenApiKiotaEndToEndTests/ModelStateValidation/GeneratedCode/Models/AttributesInCreateSocialMediaAccountRequest.cs +++ b/test/OpenApiKiotaEndToEndTests/ModelStateValidation/GeneratedCode/Models/AttributesInCreateSocialMediaAccountRequest.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -20,240 +22,129 @@ public double? Age get { return BackingStore?.Get("age"); } set { BackingStore?.Set("age", value); } } + /// The alternativeId property public Guid? AlternativeId { get { return BackingStore?.Get("alternativeId"); } set { BackingStore?.Set("alternativeId", value); } } + /// The backgroundPicture property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? BackgroundPicture { get { return BackingStore?.Get("backgroundPicture"); } set { BackingStore?.Set("backgroundPicture", value); } } -#nullable restore -#else - public string BackgroundPicture - { - get { return BackingStore?.Get("backgroundPicture"); } - set { BackingStore?.Set("backgroundPicture", value); } - } -#endif + /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The countryCode property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? CountryCode { get { return BackingStore?.Get("countryCode"); } set { BackingStore?.Set("countryCode", value); } } -#nullable restore -#else - public string CountryCode - { - get { return BackingStore?.Get("countryCode"); } - set { BackingStore?.Set("countryCode", value); } - } -#endif + /// The creditCard property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? CreditCard { get { return BackingStore?.Get("creditCard"); } set { BackingStore?.Set("creditCard", value); } } -#nullable restore -#else - public string CreditCard - { - get { return BackingStore?.Get("creditCard"); } - set { BackingStore?.Set("creditCard", value); } - } -#endif + /// The email property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Email { get { return BackingStore?.Get("email"); } set { BackingStore?.Set("email", value); } } -#nullable restore -#else - public string Email - { - get { return BackingStore?.Get("email"); } - set { BackingStore?.Set("email", value); } - } -#endif + /// The firstName property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? FirstName { get { return BackingStore?.Get("firstName"); } set { BackingStore?.Set("firstName", value); } } -#nullable restore -#else - public string FirstName - { - get { return BackingStore?.Get("firstName"); } - set { BackingStore?.Set("firstName", value); } - } -#endif + /// The lastName property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? LastName { get { return BackingStore?.Get("lastName"); } set { BackingStore?.Set("lastName", value); } } -#nullable restore -#else - public string LastName - { - get { return BackingStore?.Get("lastName"); } - set { BackingStore?.Set("lastName", value); } - } -#endif + /// The nextRevalidation property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? NextRevalidation { get { return BackingStore?.Get("nextRevalidation"); } set { BackingStore?.Set("nextRevalidation", value); } } -#nullable restore -#else - public string NextRevalidation - { - get { return BackingStore?.Get("nextRevalidation"); } - set { BackingStore?.Set("nextRevalidation", value); } - } -#endif + /// The password property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Password { get { return BackingStore?.Get("password"); } set { BackingStore?.Set("password", value); } } -#nullable restore -#else - public string Password - { - get { return BackingStore?.Get("password"); } - set { BackingStore?.Set("password", value); } - } -#endif + /// The phone property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Phone { get { return BackingStore?.Get("phone"); } set { BackingStore?.Set("phone", value); } } -#nullable restore -#else - public string Phone - { - get { return BackingStore?.Get("phone"); } - set { BackingStore?.Set("phone", value); } - } -#endif + /// The planet property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Planet { get { return BackingStore?.Get("planet"); } set { BackingStore?.Set("planet", value); } } -#nullable restore -#else - public string Planet - { - get { return BackingStore?.Get("planet"); } - set { BackingStore?.Set("planet", value); } - } -#endif + /// The profilePicture property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? ProfilePicture { get { return BackingStore?.Get("profilePicture"); } set { BackingStore?.Set("profilePicture", value); } } -#nullable restore -#else - public string ProfilePicture - { - get { return BackingStore?.Get("profilePicture"); } - set { BackingStore?.Set("profilePicture", value); } - } -#endif + /// The tags property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public List? Tags { get { return BackingStore?.Get?>("tags"); } set { BackingStore?.Set("tags", value); } } -#nullable restore -#else - public List Tags - { - get { return BackingStore?.Get>("tags"); } - set { BackingStore?.Set("tags", value); } - } -#endif + /// The userName property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? UserName { get { return BackingStore?.Get("userName"); } set { BackingStore?.Set("userName", value); } } -#nullable restore -#else - public string UserName - { - get { return BackingStore?.Get("userName"); } - set { BackingStore?.Set("userName", value); } - } -#endif + /// The validatedAt property public DateTimeOffset? ValidatedAt { get { return BackingStore?.Get("validatedAt"); } set { BackingStore?.Set("validatedAt", value); } } + /// The validatedAtDate property public Date? ValidatedAtDate { get { return BackingStore?.Get("validatedAtDate"); } set { BackingStore?.Set("validatedAtDate", value); } } + /// The validatedAtTime property public Time? ValidatedAtTime { get { return BackingStore?.Get("validatedAtTime"); } set { BackingStore?.Set("validatedAtTime", value); } } + /// /// Instantiates a new and sets the default values. /// @@ -261,6 +152,7 @@ public AttributesInCreateSocialMediaAccountRequest() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -271,6 +163,7 @@ public AttributesInCreateSocialMediaAccountRequest() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.ModelStateValidation.GeneratedCode.Models.AttributesInCreateSocialMediaAccountRequest(); } + /// /// The deserialization information for the current model /// @@ -299,6 +192,7 @@ public virtual IDictionary> GetFieldDeserializers() { "validatedAtTime", n => { ValidatedAtTime = n.GetTimeValue(); } }, }; } + /// /// Serializes information the current object /// @@ -328,3 +222,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/ModelStateValidation/GeneratedCode/Models/AttributesInUpdateSocialMediaAccountRequest.cs b/test/OpenApiKiotaEndToEndTests/ModelStateValidation/GeneratedCode/Models/AttributesInUpdateSocialMediaAccountRequest.cs index 4318a92c9..b511d634c 100644 --- a/test/OpenApiKiotaEndToEndTests/ModelStateValidation/GeneratedCode/Models/AttributesInUpdateSocialMediaAccountRequest.cs +++ b/test/OpenApiKiotaEndToEndTests/ModelStateValidation/GeneratedCode/Models/AttributesInUpdateSocialMediaAccountRequest.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -20,240 +22,129 @@ public double? Age get { return BackingStore?.Get("age"); } set { BackingStore?.Set("age", value); } } + /// The alternativeId property public Guid? AlternativeId { get { return BackingStore?.Get("alternativeId"); } set { BackingStore?.Set("alternativeId", value); } } + /// The backgroundPicture property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? BackgroundPicture { get { return BackingStore?.Get("backgroundPicture"); } set { BackingStore?.Set("backgroundPicture", value); } } -#nullable restore -#else - public string BackgroundPicture - { - get { return BackingStore?.Get("backgroundPicture"); } - set { BackingStore?.Set("backgroundPicture", value); } - } -#endif + /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The countryCode property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? CountryCode { get { return BackingStore?.Get("countryCode"); } set { BackingStore?.Set("countryCode", value); } } -#nullable restore -#else - public string CountryCode - { - get { return BackingStore?.Get("countryCode"); } - set { BackingStore?.Set("countryCode", value); } - } -#endif + /// The creditCard property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? CreditCard { get { return BackingStore?.Get("creditCard"); } set { BackingStore?.Set("creditCard", value); } } -#nullable restore -#else - public string CreditCard - { - get { return BackingStore?.Get("creditCard"); } - set { BackingStore?.Set("creditCard", value); } - } -#endif + /// The email property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Email { get { return BackingStore?.Get("email"); } set { BackingStore?.Set("email", value); } } -#nullable restore -#else - public string Email - { - get { return BackingStore?.Get("email"); } - set { BackingStore?.Set("email", value); } - } -#endif + /// The firstName property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? FirstName { get { return BackingStore?.Get("firstName"); } set { BackingStore?.Set("firstName", value); } } -#nullable restore -#else - public string FirstName - { - get { return BackingStore?.Get("firstName"); } - set { BackingStore?.Set("firstName", value); } - } -#endif + /// The lastName property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? LastName { get { return BackingStore?.Get("lastName"); } set { BackingStore?.Set("lastName", value); } } -#nullable restore -#else - public string LastName - { - get { return BackingStore?.Get("lastName"); } - set { BackingStore?.Set("lastName", value); } - } -#endif + /// The nextRevalidation property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? NextRevalidation { get { return BackingStore?.Get("nextRevalidation"); } set { BackingStore?.Set("nextRevalidation", value); } } -#nullable restore -#else - public string NextRevalidation - { - get { return BackingStore?.Get("nextRevalidation"); } - set { BackingStore?.Set("nextRevalidation", value); } - } -#endif + /// The password property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Password { get { return BackingStore?.Get("password"); } set { BackingStore?.Set("password", value); } } -#nullable restore -#else - public string Password - { - get { return BackingStore?.Get("password"); } - set { BackingStore?.Set("password", value); } - } -#endif + /// The phone property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Phone { get { return BackingStore?.Get("phone"); } set { BackingStore?.Set("phone", value); } } -#nullable restore -#else - public string Phone - { - get { return BackingStore?.Get("phone"); } - set { BackingStore?.Set("phone", value); } - } -#endif + /// The planet property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Planet { get { return BackingStore?.Get("planet"); } set { BackingStore?.Set("planet", value); } } -#nullable restore -#else - public string Planet - { - get { return BackingStore?.Get("planet"); } - set { BackingStore?.Set("planet", value); } - } -#endif + /// The profilePicture property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? ProfilePicture { get { return BackingStore?.Get("profilePicture"); } set { BackingStore?.Set("profilePicture", value); } } -#nullable restore -#else - public string ProfilePicture - { - get { return BackingStore?.Get("profilePicture"); } - set { BackingStore?.Set("profilePicture", value); } - } -#endif + /// The tags property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public List? Tags { get { return BackingStore?.Get?>("tags"); } set { BackingStore?.Set("tags", value); } } -#nullable restore -#else - public List Tags - { - get { return BackingStore?.Get>("tags"); } - set { BackingStore?.Set("tags", value); } - } -#endif + /// The userName property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? UserName { get { return BackingStore?.Get("userName"); } set { BackingStore?.Set("userName", value); } } -#nullable restore -#else - public string UserName - { - get { return BackingStore?.Get("userName"); } - set { BackingStore?.Set("userName", value); } - } -#endif + /// The validatedAt property public DateTimeOffset? ValidatedAt { get { return BackingStore?.Get("validatedAt"); } set { BackingStore?.Set("validatedAt", value); } } + /// The validatedAtDate property public Date? ValidatedAtDate { get { return BackingStore?.Get("validatedAtDate"); } set { BackingStore?.Set("validatedAtDate", value); } } + /// The validatedAtTime property public Time? ValidatedAtTime { get { return BackingStore?.Get("validatedAtTime"); } set { BackingStore?.Set("validatedAtTime", value); } } + /// /// Instantiates a new and sets the default values. /// @@ -261,6 +152,7 @@ public AttributesInUpdateSocialMediaAccountRequest() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -271,6 +163,7 @@ public AttributesInUpdateSocialMediaAccountRequest() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.ModelStateValidation.GeneratedCode.Models.AttributesInUpdateSocialMediaAccountRequest(); } + /// /// The deserialization information for the current model /// @@ -299,6 +192,7 @@ public virtual IDictionary> GetFieldDeserializers() { "validatedAtTime", n => { ValidatedAtTime = n.GetTimeValue(); } }, }; } + /// /// Serializes information the current object /// @@ -328,3 +222,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/ModelStateValidation/GeneratedCode/Models/CreateSocialMediaAccountRequestDocument.cs b/test/OpenApiKiotaEndToEndTests/ModelStateValidation/GeneratedCode/Models/CreateSocialMediaAccountRequestDocument.cs index 3fa88972f..1de232294 100644 --- a/test/OpenApiKiotaEndToEndTests/ModelStateValidation/GeneratedCode/Models/CreateSocialMediaAccountRequestDocument.cs +++ b/test/OpenApiKiotaEndToEndTests/ModelStateValidation/GeneratedCode/Models/CreateSocialMediaAccountRequestDocument.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,38 +17,21 @@ public partial class CreateSocialMediaAccountRequestDocument : IBackedModel, IPa { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The data property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.ModelStateValidation.GeneratedCode.Models.DataInCreateSocialMediaAccountRequest? Data { get { return BackingStore?.Get("data"); } set { BackingStore?.Set("data", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.ModelStateValidation.GeneratedCode.Models.DataInCreateSocialMediaAccountRequest Data - { - get { return BackingStore?.Get("data"); } - set { BackingStore?.Set("data", value); } - } -#endif + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.ModelStateValidation.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.ModelStateValidation.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -54,6 +39,7 @@ public CreateSocialMediaAccountRequestDocument() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -64,6 +50,7 @@ public CreateSocialMediaAccountRequestDocument() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.ModelStateValidation.GeneratedCode.Models.CreateSocialMediaAccountRequestDocument(); } + /// /// The deserialization information for the current model /// @@ -76,6 +63,7 @@ public virtual IDictionary> GetFieldDeserializers() { "meta", n => { Meta = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.ModelStateValidation.GeneratedCode.Models.Meta.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -89,3 +77,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/ModelStateValidation/GeneratedCode/Models/DataInCreateSocialMediaAccountRequest.cs b/test/OpenApiKiotaEndToEndTests/ModelStateValidation/GeneratedCode/Models/DataInCreateSocialMediaAccountRequest.cs index c80591626..294941d8c 100644 --- a/test/OpenApiKiotaEndToEndTests/ModelStateValidation/GeneratedCode/Models/DataInCreateSocialMediaAccountRequest.cs +++ b/test/OpenApiKiotaEndToEndTests/ModelStateValidation/GeneratedCode/Models/DataInCreateSocialMediaAccountRequest.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -14,45 +16,29 @@ public partial class DataInCreateSocialMediaAccountRequest : IBackedModel, IPars #pragma warning restore CS1591 { /// The attributes property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.ModelStateValidation.GeneratedCode.Models.AttributesInCreateSocialMediaAccountRequest? Attributes { get { return BackingStore?.Get("attributes"); } set { BackingStore?.Set("attributes", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.ModelStateValidation.GeneratedCode.Models.AttributesInCreateSocialMediaAccountRequest Attributes - { - get { return BackingStore?.Get("attributes"); } - set { BackingStore?.Set("attributes", value); } - } -#endif + /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.ModelStateValidation.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.ModelStateValidation.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// The type property public global::OpenApiKiotaEndToEndTests.ModelStateValidation.GeneratedCode.Models.SocialMediaAccountResourceType? Type { get { return BackingStore?.Get("type"); } set { BackingStore?.Set("type", value); } } + /// /// Instantiates a new and sets the default values. /// @@ -60,6 +46,7 @@ public DataInCreateSocialMediaAccountRequest() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -70,6 +57,7 @@ public DataInCreateSocialMediaAccountRequest() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.ModelStateValidation.GeneratedCode.Models.DataInCreateSocialMediaAccountRequest(); } + /// /// The deserialization information for the current model /// @@ -83,6 +71,7 @@ public virtual IDictionary> GetFieldDeserializers() { "type", n => { Type = n.GetEnumValue(); } }, }; } + /// /// Serializes information the current object /// @@ -97,3 +86,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/ModelStateValidation/GeneratedCode/Models/DataInResponse.cs b/test/OpenApiKiotaEndToEndTests/ModelStateValidation/GeneratedCode/Models/DataInResponse.cs index b678137ce..e21050a82 100644 --- a/test/OpenApiKiotaEndToEndTests/ModelStateValidation/GeneratedCode/Models/DataInResponse.cs +++ b/test/OpenApiKiotaEndToEndTests/ModelStateValidation/GeneratedCode/Models/DataInResponse.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,28 +17,21 @@ public partial class DataInResponse : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.ModelStateValidation.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.ModelStateValidation.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// The type property public global::OpenApiKiotaEndToEndTests.ModelStateValidation.GeneratedCode.Models.ResourceType? Type { get { return BackingStore?.Get("type"); } set { BackingStore?.Set("type", value); } } + /// /// Instantiates a new and sets the default values. /// @@ -44,6 +39,7 @@ public DataInResponse() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -59,6 +55,7 @@ public DataInResponse() _ => new global::OpenApiKiotaEndToEndTests.ModelStateValidation.GeneratedCode.Models.DataInResponse(), }; } + /// /// The deserialization information for the current model /// @@ -71,6 +68,7 @@ public virtual IDictionary> GetFieldDeserializers() { "type", n => { Type = n.GetEnumValue(); } }, }; } + /// /// Serializes information the current object /// @@ -84,3 +82,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/ModelStateValidation/GeneratedCode/Models/DataInUpdateSocialMediaAccountRequest.cs b/test/OpenApiKiotaEndToEndTests/ModelStateValidation/GeneratedCode/Models/DataInUpdateSocialMediaAccountRequest.cs index 3aeb12805..d995d20ad 100644 --- a/test/OpenApiKiotaEndToEndTests/ModelStateValidation/GeneratedCode/Models/DataInUpdateSocialMediaAccountRequest.cs +++ b/test/OpenApiKiotaEndToEndTests/ModelStateValidation/GeneratedCode/Models/DataInUpdateSocialMediaAccountRequest.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -14,51 +16,36 @@ public partial class DataInUpdateSocialMediaAccountRequest : IBackedModel, IPars #pragma warning restore CS1591 { /// The attributes property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.ModelStateValidation.GeneratedCode.Models.AttributesInUpdateSocialMediaAccountRequest? Attributes { get { return BackingStore?.Get("attributes"); } set { BackingStore?.Set("attributes", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.ModelStateValidation.GeneratedCode.Models.AttributesInUpdateSocialMediaAccountRequest Attributes - { - get { return BackingStore?.Get("attributes"); } - set { BackingStore?.Set("attributes", value); } - } -#endif + /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The id property public Guid? Id { get { return BackingStore?.Get("id"); } set { BackingStore?.Set("id", value); } } + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.ModelStateValidation.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.ModelStateValidation.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// The type property public global::OpenApiKiotaEndToEndTests.ModelStateValidation.GeneratedCode.Models.SocialMediaAccountResourceType? Type { get { return BackingStore?.Get("type"); } set { BackingStore?.Set("type", value); } } + /// /// Instantiates a new and sets the default values. /// @@ -66,6 +53,7 @@ public DataInUpdateSocialMediaAccountRequest() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -76,6 +64,7 @@ public DataInUpdateSocialMediaAccountRequest() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.ModelStateValidation.GeneratedCode.Models.DataInUpdateSocialMediaAccountRequest(); } + /// /// The deserialization information for the current model /// @@ -90,6 +79,7 @@ public virtual IDictionary> GetFieldDeserializers() { "type", n => { Type = n.GetEnumValue(); } }, }; } + /// /// Serializes information the current object /// @@ -105,3 +95,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/ModelStateValidation/GeneratedCode/Models/ErrorLinks.cs b/test/OpenApiKiotaEndToEndTests/ModelStateValidation/GeneratedCode/Models/ErrorLinks.cs index 2cbc9e51b..01d7175cc 100644 --- a/test/OpenApiKiotaEndToEndTests/ModelStateValidation/GeneratedCode/Models/ErrorLinks.cs +++ b/test/OpenApiKiotaEndToEndTests/ModelStateValidation/GeneratedCode/Models/ErrorLinks.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -14,39 +16,22 @@ public partial class ErrorLinks : IBackedModel, IParsable #pragma warning restore CS1591 { /// The about property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? About { get { return BackingStore?.Get("about"); } set { BackingStore?.Set("about", value); } } -#nullable restore -#else - public string About - { - get { return BackingStore?.Get("about"); } - set { BackingStore?.Set("about", value); } - } -#endif + /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// 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 and sets the default values. /// @@ -54,6 +39,7 @@ public ErrorLinks() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -64,6 +50,7 @@ public ErrorLinks() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.ModelStateValidation.GeneratedCode.Models.ErrorLinks(); } + /// /// The deserialization information for the current model /// @@ -76,6 +63,7 @@ public virtual IDictionary> GetFieldDeserializers() { "type", n => { Type = n.GetStringValue(); } }, }; } + /// /// Serializes information the current object /// @@ -89,3 +77,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/ModelStateValidation/GeneratedCode/Models/ErrorObject.cs b/test/OpenApiKiotaEndToEndTests/ModelStateValidation/GeneratedCode/Models/ErrorObject.cs index cfde3b87a..db0e8a908 100644 --- a/test/OpenApiKiotaEndToEndTests/ModelStateValidation/GeneratedCode/Models/ErrorObject.cs +++ b/test/OpenApiKiotaEndToEndTests/ModelStateValidation/GeneratedCode/Models/ErrorObject.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,134 +17,63 @@ public partial class ErrorObject : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The code property -#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 detail property -#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 id property -#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 links property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.ModelStateValidation.GeneratedCode.Models.ErrorLinks? Links { get { return BackingStore?.Get("links"); } set { BackingStore?.Set("links", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.ModelStateValidation.GeneratedCode.Models.ErrorLinks Links - { - get { return BackingStore?.Get("links"); } - set { BackingStore?.Set("links", value); } - } -#endif + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.ModelStateValidation.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.ModelStateValidation.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// The source property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.ModelStateValidation.GeneratedCode.Models.ErrorSource? Source { get { return BackingStore?.Get("source"); } set { BackingStore?.Set("source", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.ModelStateValidation.GeneratedCode.Models.ErrorSource Source - { - get { return BackingStore?.Get("source"); } - set { BackingStore?.Set("source", value); } - } -#endif + /// The status property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Status { get { return BackingStore?.Get("status"); } set { BackingStore?.Set("status", value); } } -#nullable restore -#else - public string Status - { - get { return BackingStore?.Get("status"); } - set { BackingStore?.Set("status", value); } - } -#endif + /// The title property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Title { get { return BackingStore?.Get("title"); } set { BackingStore?.Set("title", value); } } -#nullable restore -#else - public string Title - { - get { return BackingStore?.Get("title"); } - set { BackingStore?.Set("title", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -150,6 +81,7 @@ public ErrorObject() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -160,6 +92,7 @@ public ErrorObject() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.ModelStateValidation.GeneratedCode.Models.ErrorObject(); } + /// /// The deserialization information for the current model /// @@ -178,6 +111,7 @@ public virtual IDictionary> GetFieldDeserializers() { "title", n => { Title = n.GetStringValue(); } }, }; } + /// /// Serializes information the current object /// @@ -197,3 +131,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/ModelStateValidation/GeneratedCode/Models/ErrorResponseDocument.cs b/test/OpenApiKiotaEndToEndTests/ModelStateValidation/GeneratedCode/Models/ErrorResponseDocument.cs index 0c2ed1bb5..167cd2c62 100644 --- a/test/OpenApiKiotaEndToEndTests/ModelStateValidation/GeneratedCode/Models/ErrorResponseDocument.cs +++ b/test/OpenApiKiotaEndToEndTests/ModelStateValidation/GeneratedCode/Models/ErrorResponseDocument.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -16,56 +18,31 @@ public partial class ErrorResponseDocument : ApiException, IBackedModel, IParsab { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The errors property -#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 + /// The links property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.ModelStateValidation.GeneratedCode.Models.ErrorTopLevelLinks? Links { get { return BackingStore?.Get("links"); } set { BackingStore?.Set("links", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.ModelStateValidation.GeneratedCode.Models.ErrorTopLevelLinks Links - { - get { return BackingStore?.Get("links"); } - set { BackingStore?.Set("links", value); } - } -#endif + /// The primary error message. public override string Message { get => base.Message; } + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.ModelStateValidation.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.ModelStateValidation.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -73,6 +50,7 @@ public ErrorResponseDocument() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -83,6 +61,7 @@ public ErrorResponseDocument() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.ModelStateValidation.GeneratedCode.Models.ErrorResponseDocument(); } + /// /// The deserialization information for the current model /// @@ -96,6 +75,7 @@ public virtual IDictionary> GetFieldDeserializers() { "meta", n => { Meta = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.ModelStateValidation.GeneratedCode.Models.Meta.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -110,3 +90,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/ModelStateValidation/GeneratedCode/Models/ErrorSource.cs b/test/OpenApiKiotaEndToEndTests/ModelStateValidation/GeneratedCode/Models/ErrorSource.cs index 4109e8fb6..c55b3707f 100644 --- a/test/OpenApiKiotaEndToEndTests/ModelStateValidation/GeneratedCode/Models/ErrorSource.cs +++ b/test/OpenApiKiotaEndToEndTests/ModelStateValidation/GeneratedCode/Models/ErrorSource.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,54 +17,28 @@ public partial class ErrorSource : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The header property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Header { get { return BackingStore?.Get("header"); } set { BackingStore?.Set("header", value); } } -#nullable restore -#else - public string Header - { - get { return BackingStore?.Get("header"); } - set { BackingStore?.Set("header", value); } - } -#endif + /// The parameter property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Parameter { get { return BackingStore?.Get("parameter"); } set { BackingStore?.Set("parameter", value); } } -#nullable restore -#else - public string Parameter - { - get { return BackingStore?.Get("parameter"); } - set { BackingStore?.Set("parameter", value); } - } -#endif + /// The pointer property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Pointer { get { return BackingStore?.Get("pointer"); } set { BackingStore?.Set("pointer", value); } } -#nullable restore -#else - public string Pointer - { - get { return BackingStore?.Get("pointer"); } - set { BackingStore?.Set("pointer", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -70,6 +46,7 @@ public ErrorSource() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -80,6 +57,7 @@ public ErrorSource() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.ModelStateValidation.GeneratedCode.Models.ErrorSource(); } + /// /// The deserialization information for the current model /// @@ -93,6 +71,7 @@ public virtual IDictionary> GetFieldDeserializers() { "pointer", n => { Pointer = n.GetStringValue(); } }, }; } + /// /// Serializes information the current object /// @@ -107,3 +86,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/ModelStateValidation/GeneratedCode/Models/ErrorTopLevelLinks.cs b/test/OpenApiKiotaEndToEndTests/ModelStateValidation/GeneratedCode/Models/ErrorTopLevelLinks.cs index 5e5b9c4b0..02967d75b 100644 --- a/test/OpenApiKiotaEndToEndTests/ModelStateValidation/GeneratedCode/Models/ErrorTopLevelLinks.cs +++ b/test/OpenApiKiotaEndToEndTests/ModelStateValidation/GeneratedCode/Models/ErrorTopLevelLinks.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,38 +17,21 @@ public partial class ErrorTopLevelLinks : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The describedby property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Describedby { get { return BackingStore?.Get("describedby"); } set { BackingStore?.Set("describedby", value); } } -#nullable restore -#else - public string Describedby - { - get { return BackingStore?.Get("describedby"); } - set { BackingStore?.Set("describedby", value); } - } -#endif + /// The self property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Self { get { return BackingStore?.Get("self"); } set { BackingStore?.Set("self", value); } } -#nullable restore -#else - public string Self - { - get { return BackingStore?.Get("self"); } - set { BackingStore?.Set("self", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -54,6 +39,7 @@ public ErrorTopLevelLinks() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -64,6 +50,7 @@ public ErrorTopLevelLinks() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.ModelStateValidation.GeneratedCode.Models.ErrorTopLevelLinks(); } + /// /// The deserialization information for the current model /// @@ -76,6 +63,7 @@ public virtual IDictionary> GetFieldDeserializers() { "self", n => { Self = n.GetStringValue(); } }, }; } + /// /// Serializes information the current object /// @@ -89,3 +77,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/ModelStateValidation/GeneratedCode/Models/Meta.cs b/test/OpenApiKiotaEndToEndTests/ModelStateValidation/GeneratedCode/Models/Meta.cs index 85ed43653..bfba2ca6b 100644 --- a/test/OpenApiKiotaEndToEndTests/ModelStateValidation/GeneratedCode/Models/Meta.cs +++ b/test/OpenApiKiotaEndToEndTests/ModelStateValidation/GeneratedCode/Models/Meta.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -19,8 +21,10 @@ public IDictionary AdditionalData get { return BackingStore.Get>("AdditionalData") ?? new Dictionary(); } set { BackingStore.Set("AdditionalData", value); } } + /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// /// Instantiates a new and sets the default values. /// @@ -29,6 +33,7 @@ public Meta() BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); AdditionalData = new Dictionary(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -39,6 +44,7 @@ public Meta() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.ModelStateValidation.GeneratedCode.Models.Meta(); } + /// /// The deserialization information for the current model /// @@ -49,6 +55,7 @@ public virtual IDictionary> GetFieldDeserializers() { }; } + /// /// Serializes information the current object /// @@ -61,3 +68,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/ModelStateValidation/GeneratedCode/Models/ResourceLinks.cs b/test/OpenApiKiotaEndToEndTests/ModelStateValidation/GeneratedCode/Models/ResourceLinks.cs index 0b94f2161..3e716f909 100644 --- a/test/OpenApiKiotaEndToEndTests/ModelStateValidation/GeneratedCode/Models/ResourceLinks.cs +++ b/test/OpenApiKiotaEndToEndTests/ModelStateValidation/GeneratedCode/Models/ResourceLinks.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,22 +17,14 @@ public partial class ResourceLinks : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The self property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Self { get { return BackingStore?.Get("self"); } set { BackingStore?.Set("self", value); } } -#nullable restore -#else - public string Self - { - get { return BackingStore?.Get("self"); } - set { BackingStore?.Set("self", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -38,6 +32,7 @@ public ResourceLinks() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -48,6 +43,7 @@ public ResourceLinks() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.ModelStateValidation.GeneratedCode.Models.ResourceLinks(); } + /// /// The deserialization information for the current model /// @@ -59,6 +55,7 @@ public virtual IDictionary> GetFieldDeserializers() { "self", n => { Self = n.GetStringValue(); } }, }; } + /// /// Serializes information the current object /// @@ -71,3 +68,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/ModelStateValidation/GeneratedCode/Models/ResourceTopLevelLinks.cs b/test/OpenApiKiotaEndToEndTests/ModelStateValidation/GeneratedCode/Models/ResourceTopLevelLinks.cs index c9101da55..61bdc1808 100644 --- a/test/OpenApiKiotaEndToEndTests/ModelStateValidation/GeneratedCode/Models/ResourceTopLevelLinks.cs +++ b/test/OpenApiKiotaEndToEndTests/ModelStateValidation/GeneratedCode/Models/ResourceTopLevelLinks.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,38 +17,21 @@ public partial class ResourceTopLevelLinks : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The describedby property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Describedby { get { return BackingStore?.Get("describedby"); } set { BackingStore?.Set("describedby", value); } } -#nullable restore -#else - public string Describedby - { - get { return BackingStore?.Get("describedby"); } - set { BackingStore?.Set("describedby", value); } - } -#endif + /// The self property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Self { get { return BackingStore?.Get("self"); } set { BackingStore?.Set("self", value); } } -#nullable restore -#else - public string Self - { - get { return BackingStore?.Get("self"); } - set { BackingStore?.Set("self", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -54,6 +39,7 @@ public ResourceTopLevelLinks() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -64,6 +50,7 @@ public ResourceTopLevelLinks() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.ModelStateValidation.GeneratedCode.Models.ResourceTopLevelLinks(); } + /// /// The deserialization information for the current model /// @@ -76,6 +63,7 @@ public virtual IDictionary> GetFieldDeserializers() { "self", n => { Self = n.GetStringValue(); } }, }; } + /// /// Serializes information the current object /// @@ -89,3 +77,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/ModelStateValidation/GeneratedCode/Models/ResourceType.cs b/test/OpenApiKiotaEndToEndTests/ModelStateValidation/GeneratedCode/Models/ResourceType.cs index a0b6ee972..ef992a196 100644 --- a/test/OpenApiKiotaEndToEndTests/ModelStateValidation/GeneratedCode/Models/ResourceType.cs +++ b/test/OpenApiKiotaEndToEndTests/ModelStateValidation/GeneratedCode/Models/ResourceType.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 using System.Runtime.Serialization; using System; namespace OpenApiKiotaEndToEndTests.ModelStateValidation.GeneratedCode.Models @@ -14,3 +16,4 @@ public enum ResourceType #pragma warning restore CS1591 } } + diff --git a/test/OpenApiKiotaEndToEndTests/ModelStateValidation/GeneratedCode/Models/SocialMediaAccountAttributesInResponse.cs b/test/OpenApiKiotaEndToEndTests/ModelStateValidation/GeneratedCode/Models/SocialMediaAccountAttributesInResponse.cs index 141f3c53b..5e4b85346 100644 --- a/test/OpenApiKiotaEndToEndTests/ModelStateValidation/GeneratedCode/Models/SocialMediaAccountAttributesInResponse.cs +++ b/test/OpenApiKiotaEndToEndTests/ModelStateValidation/GeneratedCode/Models/SocialMediaAccountAttributesInResponse.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -20,240 +22,129 @@ public double? Age get { return BackingStore?.Get("age"); } set { BackingStore?.Set("age", value); } } + /// The alternativeId property public Guid? AlternativeId { get { return BackingStore?.Get("alternativeId"); } set { BackingStore?.Set("alternativeId", value); } } + /// The backgroundPicture property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? BackgroundPicture { get { return BackingStore?.Get("backgroundPicture"); } set { BackingStore?.Set("backgroundPicture", value); } } -#nullable restore -#else - public string BackgroundPicture - { - get { return BackingStore?.Get("backgroundPicture"); } - set { BackingStore?.Set("backgroundPicture", value); } - } -#endif + /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The countryCode property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? CountryCode { get { return BackingStore?.Get("countryCode"); } set { BackingStore?.Set("countryCode", value); } } -#nullable restore -#else - public string CountryCode - { - get { return BackingStore?.Get("countryCode"); } - set { BackingStore?.Set("countryCode", value); } - } -#endif + /// The creditCard property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? CreditCard { get { return BackingStore?.Get("creditCard"); } set { BackingStore?.Set("creditCard", value); } } -#nullable restore -#else - public string CreditCard - { - get { return BackingStore?.Get("creditCard"); } - set { BackingStore?.Set("creditCard", value); } - } -#endif + /// The email property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Email { get { return BackingStore?.Get("email"); } set { BackingStore?.Set("email", value); } } -#nullable restore -#else - public string Email - { - get { return BackingStore?.Get("email"); } - set { BackingStore?.Set("email", value); } - } -#endif + /// The firstName property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? FirstName { get { return BackingStore?.Get("firstName"); } set { BackingStore?.Set("firstName", value); } } -#nullable restore -#else - public string FirstName - { - get { return BackingStore?.Get("firstName"); } - set { BackingStore?.Set("firstName", value); } - } -#endif + /// The lastName property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? LastName { get { return BackingStore?.Get("lastName"); } set { BackingStore?.Set("lastName", value); } } -#nullable restore -#else - public string LastName - { - get { return BackingStore?.Get("lastName"); } - set { BackingStore?.Set("lastName", value); } - } -#endif + /// The nextRevalidation property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? NextRevalidation { get { return BackingStore?.Get("nextRevalidation"); } set { BackingStore?.Set("nextRevalidation", value); } } -#nullable restore -#else - public string NextRevalidation - { - get { return BackingStore?.Get("nextRevalidation"); } - set { BackingStore?.Set("nextRevalidation", value); } - } -#endif + /// The password property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Password { get { return BackingStore?.Get("password"); } set { BackingStore?.Set("password", value); } } -#nullable restore -#else - public string Password - { - get { return BackingStore?.Get("password"); } - set { BackingStore?.Set("password", value); } - } -#endif + /// The phone property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Phone { get { return BackingStore?.Get("phone"); } set { BackingStore?.Set("phone", value); } } -#nullable restore -#else - public string Phone - { - get { return BackingStore?.Get("phone"); } - set { BackingStore?.Set("phone", value); } - } -#endif + /// The planet property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Planet { get { return BackingStore?.Get("planet"); } set { BackingStore?.Set("planet", value); } } -#nullable restore -#else - public string Planet - { - get { return BackingStore?.Get("planet"); } - set { BackingStore?.Set("planet", value); } - } -#endif + /// The profilePicture property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? ProfilePicture { get { return BackingStore?.Get("profilePicture"); } set { BackingStore?.Set("profilePicture", value); } } -#nullable restore -#else - public string ProfilePicture - { - get { return BackingStore?.Get("profilePicture"); } - set { BackingStore?.Set("profilePicture", value); } - } -#endif + /// The tags property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public List? Tags { get { return BackingStore?.Get?>("tags"); } set { BackingStore?.Set("tags", value); } } -#nullable restore -#else - public List Tags - { - get { return BackingStore?.Get>("tags"); } - set { BackingStore?.Set("tags", value); } - } -#endif + /// The userName property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? UserName { get { return BackingStore?.Get("userName"); } set { BackingStore?.Set("userName", value); } } -#nullable restore -#else - public string UserName - { - get { return BackingStore?.Get("userName"); } - set { BackingStore?.Set("userName", value); } - } -#endif + /// The validatedAt property public DateTimeOffset? ValidatedAt { get { return BackingStore?.Get("validatedAt"); } set { BackingStore?.Set("validatedAt", value); } } + /// The validatedAtDate property public Date? ValidatedAtDate { get { return BackingStore?.Get("validatedAtDate"); } set { BackingStore?.Set("validatedAtDate", value); } } + /// The validatedAtTime property public Time? ValidatedAtTime { get { return BackingStore?.Get("validatedAtTime"); } set { BackingStore?.Set("validatedAtTime", value); } } + /// /// Instantiates a new and sets the default values. /// @@ -261,6 +152,7 @@ public SocialMediaAccountAttributesInResponse() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -271,6 +163,7 @@ public SocialMediaAccountAttributesInResponse() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.ModelStateValidation.GeneratedCode.Models.SocialMediaAccountAttributesInResponse(); } + /// /// The deserialization information for the current model /// @@ -299,6 +192,7 @@ public virtual IDictionary> GetFieldDeserializers() { "validatedAtTime", n => { ValidatedAtTime = n.GetTimeValue(); } }, }; } + /// /// Serializes information the current object /// @@ -328,3 +222,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/ModelStateValidation/GeneratedCode/Models/SocialMediaAccountDataInResponse.cs b/test/OpenApiKiotaEndToEndTests/ModelStateValidation/GeneratedCode/Models/SocialMediaAccountDataInResponse.cs index 013ed6923..eaf0cbf0c 100644 --- a/test/OpenApiKiotaEndToEndTests/ModelStateValidation/GeneratedCode/Models/SocialMediaAccountDataInResponse.cs +++ b/test/OpenApiKiotaEndToEndTests/ModelStateValidation/GeneratedCode/Models/SocialMediaAccountDataInResponse.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -13,43 +15,26 @@ public partial class SocialMediaAccountDataInResponse : global::OpenApiKiotaEndT #pragma warning restore CS1591 { /// The attributes property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.ModelStateValidation.GeneratedCode.Models.SocialMediaAccountAttributesInResponse? Attributes { get { return BackingStore?.Get("attributes"); } set { BackingStore?.Set("attributes", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.ModelStateValidation.GeneratedCode.Models.SocialMediaAccountAttributesInResponse Attributes - { - get { return BackingStore?.Get("attributes"); } - set { BackingStore?.Set("attributes", value); } - } -#endif + /// The id property public Guid? Id { get { return BackingStore?.Get("id"); } set { BackingStore?.Set("id", value); } } + /// The links property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.ModelStateValidation.GeneratedCode.Models.ResourceLinks? Links { get { return BackingStore?.Get("links"); } set { BackingStore?.Set("links", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.ModelStateValidation.GeneratedCode.Models.ResourceLinks Links - { - get { return BackingStore?.Get("links"); } - set { BackingStore?.Set("links", value); } - } -#endif + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -60,6 +45,7 @@ public Guid? Id _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.ModelStateValidation.GeneratedCode.Models.SocialMediaAccountDataInResponse(); } + /// /// The deserialization information for the current model /// @@ -73,6 +59,7 @@ public override IDictionary> GetFieldDeserializers() { "links", n => { Links = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.ModelStateValidation.GeneratedCode.Models.ResourceLinks.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -88,3 +75,4 @@ public override void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/ModelStateValidation/GeneratedCode/Models/SocialMediaAccountPrimaryResponseDocument.cs b/test/OpenApiKiotaEndToEndTests/ModelStateValidation/GeneratedCode/Models/SocialMediaAccountPrimaryResponseDocument.cs index ee7a52c35..0b5a76b8c 100644 --- a/test/OpenApiKiotaEndToEndTests/ModelStateValidation/GeneratedCode/Models/SocialMediaAccountPrimaryResponseDocument.cs +++ b/test/OpenApiKiotaEndToEndTests/ModelStateValidation/GeneratedCode/Models/SocialMediaAccountPrimaryResponseDocument.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,70 +17,35 @@ public partial class SocialMediaAccountPrimaryResponseDocument : IBackedModel, I { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The data property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.ModelStateValidation.GeneratedCode.Models.SocialMediaAccountDataInResponse? Data { get { return BackingStore?.Get("data"); } set { BackingStore?.Set("data", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.ModelStateValidation.GeneratedCode.Models.SocialMediaAccountDataInResponse Data - { - get { return BackingStore?.Get("data"); } - set { BackingStore?.Set("data", value); } - } -#endif + /// The included property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public List? Included { get { return BackingStore?.Get?>("included"); } set { BackingStore?.Set("included", value); } } -#nullable restore -#else - public List Included - { - get { return BackingStore?.Get>("included"); } - set { BackingStore?.Set("included", value); } - } -#endif + /// The links property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.ModelStateValidation.GeneratedCode.Models.ResourceTopLevelLinks? Links { get { return BackingStore?.Get("links"); } set { BackingStore?.Set("links", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.ModelStateValidation.GeneratedCode.Models.ResourceTopLevelLinks Links - { - get { return BackingStore?.Get("links"); } - set { BackingStore?.Set("links", value); } - } -#endif + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.ModelStateValidation.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.ModelStateValidation.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -86,6 +53,7 @@ public SocialMediaAccountPrimaryResponseDocument() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -96,6 +64,7 @@ public SocialMediaAccountPrimaryResponseDocument() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.ModelStateValidation.GeneratedCode.Models.SocialMediaAccountPrimaryResponseDocument(); } + /// /// The deserialization information for the current model /// @@ -110,6 +79,7 @@ public virtual IDictionary> GetFieldDeserializers() { "meta", n => { Meta = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.ModelStateValidation.GeneratedCode.Models.Meta.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -125,3 +95,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/ModelStateValidation/GeneratedCode/Models/SocialMediaAccountResourceType.cs b/test/OpenApiKiotaEndToEndTests/ModelStateValidation/GeneratedCode/Models/SocialMediaAccountResourceType.cs index 4e1aa30c7..3e24102db 100644 --- a/test/OpenApiKiotaEndToEndTests/ModelStateValidation/GeneratedCode/Models/SocialMediaAccountResourceType.cs +++ b/test/OpenApiKiotaEndToEndTests/ModelStateValidation/GeneratedCode/Models/SocialMediaAccountResourceType.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 using System.Runtime.Serialization; using System; namespace OpenApiKiotaEndToEndTests.ModelStateValidation.GeneratedCode.Models @@ -14,3 +16,4 @@ public enum SocialMediaAccountResourceType #pragma warning restore CS1591 } } + diff --git a/test/OpenApiKiotaEndToEndTests/ModelStateValidation/GeneratedCode/Models/UpdateSocialMediaAccountRequestDocument.cs b/test/OpenApiKiotaEndToEndTests/ModelStateValidation/GeneratedCode/Models/UpdateSocialMediaAccountRequestDocument.cs index e0263ba34..eb136a378 100644 --- a/test/OpenApiKiotaEndToEndTests/ModelStateValidation/GeneratedCode/Models/UpdateSocialMediaAccountRequestDocument.cs +++ b/test/OpenApiKiotaEndToEndTests/ModelStateValidation/GeneratedCode/Models/UpdateSocialMediaAccountRequestDocument.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,38 +17,21 @@ public partial class UpdateSocialMediaAccountRequestDocument : IBackedModel, IPa { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The data property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.ModelStateValidation.GeneratedCode.Models.DataInUpdateSocialMediaAccountRequest? Data { get { return BackingStore?.Get("data"); } set { BackingStore?.Set("data", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.ModelStateValidation.GeneratedCode.Models.DataInUpdateSocialMediaAccountRequest Data - { - get { return BackingStore?.Get("data"); } - set { BackingStore?.Set("data", value); } - } -#endif + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.ModelStateValidation.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.ModelStateValidation.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -54,6 +39,7 @@ public UpdateSocialMediaAccountRequestDocument() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -64,6 +50,7 @@ public UpdateSocialMediaAccountRequestDocument() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.ModelStateValidation.GeneratedCode.Models.UpdateSocialMediaAccountRequestDocument(); } + /// /// The deserialization information for the current model /// @@ -76,6 +63,7 @@ public virtual IDictionary> GetFieldDeserializers() { "meta", n => { Meta = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.ModelStateValidation.GeneratedCode.Models.Meta.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -89,3 +77,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/ModelStateValidation/GeneratedCode/SocialMediaAccounts/Item/SocialMediaAccountsItemRequestBuilder.cs b/test/OpenApiKiotaEndToEndTests/ModelStateValidation/GeneratedCode/SocialMediaAccounts/Item/SocialMediaAccountsItemRequestBuilder.cs index 2cf0f638f..c205366c7 100644 --- a/test/OpenApiKiotaEndToEndTests/ModelStateValidation/GeneratedCode/SocialMediaAccounts/Item/SocialMediaAccountsItemRequestBuilder.cs +++ b/test/OpenApiKiotaEndToEndTests/ModelStateValidation/GeneratedCode/SocialMediaAccounts/Item/SocialMediaAccountsItemRequestBuilder.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -25,6 +27,7 @@ public partial class SocialMediaAccountsItemRequestBuilder : BaseRequestBuilder public SocialMediaAccountsItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/socialMediaAccounts/{id}{?query*}", pathParameters) { } + /// /// Instantiates a new and sets the default values. /// @@ -33,6 +36,7 @@ public SocialMediaAccountsItemRequestBuilder(Dictionary pathPara public SocialMediaAccountsItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/socialMediaAccounts/{id}{?query*}", rawUrl) { } + /// /// Updates an existing socialMediaAccount. /// @@ -44,15 +48,8 @@ public SocialMediaAccountsItemRequestBuilder(string rawUrl, IRequestAdapter requ /// When receiving a 404 status code /// When receiving a 409 status code /// When receiving a 422 status code -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public async Task PatchAsync(global::OpenApiKiotaEndToEndTests.ModelStateValidation.GeneratedCode.Models.UpdateSocialMediaAccountRequestDocument body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { -#nullable restore -#else - public async Task PatchAsync(global::OpenApiKiotaEndToEndTests.ModelStateValidation.GeneratedCode.Models.UpdateSocialMediaAccountRequestDocument body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) - { -#endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> @@ -64,21 +61,15 @@ public SocialMediaAccountsItemRequestBuilder(string rawUrl, IRequestAdapter requ }; return await RequestAdapter.SendAsync(requestInfo, global::OpenApiKiotaEndToEndTests.ModelStateValidation.GeneratedCode.Models.SocialMediaAccountPrimaryResponseDocument.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } + /// /// Updates an existing socialMediaAccount. /// /// A /// 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(global::OpenApiKiotaEndToEndTests.ModelStateValidation.GeneratedCode.Models.UpdateSocialMediaAccountRequestDocument body, Action>? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToPatchRequestInformation(global::OpenApiKiotaEndToEndTests.ModelStateValidation.GeneratedCode.Models.UpdateSocialMediaAccountRequestDocument body, Action> requestConfiguration = default) - { -#endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); @@ -86,6 +77,7 @@ public RequestInformation ToPatchRequestInformation(global::OpenApiKiotaEndToEnd requestInfo.SetContentFromParsable(RequestAdapter, "application/vnd.api+json", body); return requestInfo; } + /// /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. /// @@ -95,6 +87,7 @@ public RequestInformation ToPatchRequestInformation(global::OpenApiKiotaEndToEnd { return new global::OpenApiKiotaEndToEndTests.ModelStateValidation.GeneratedCode.SocialMediaAccounts.Item.SocialMediaAccountsItemRequestBuilder(rawUrl, RequestAdapter); } + /// /// Updates an existing socialMediaAccount. /// @@ -102,16 +95,10 @@ public RequestInformation ToPatchRequestInformation(global::OpenApiKiotaEndToEnd public partial class SocialMediaAccountsItemRequestBuilderPatchQueryParameters { /// For syntax, see the documentation for the [`include`](https://www.jsonapi.net/usage/reading/including-relationships.html)/[`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/ModelStateValidation/GeneratedCode/SocialMediaAccounts/SocialMediaAccountsRequestBuilder.cs b/test/OpenApiKiotaEndToEndTests/ModelStateValidation/GeneratedCode/SocialMediaAccounts/SocialMediaAccountsRequestBuilder.cs index 078df940d..133ed2cdf 100644 --- a/test/OpenApiKiotaEndToEndTests/ModelStateValidation/GeneratedCode/SocialMediaAccounts/SocialMediaAccountsRequestBuilder.cs +++ b/test/OpenApiKiotaEndToEndTests/ModelStateValidation/GeneratedCode/SocialMediaAccounts/SocialMediaAccountsRequestBuilder.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -30,6 +32,7 @@ public partial class SocialMediaAccountsRequestBuilder : BaseRequestBuilder return new global::OpenApiKiotaEndToEndTests.ModelStateValidation.GeneratedCode.SocialMediaAccounts.Item.SocialMediaAccountsItemRequestBuilder(urlTplParams, RequestAdapter); } } + /// /// Instantiates a new and sets the default values. /// @@ -38,6 +41,7 @@ public partial class SocialMediaAccountsRequestBuilder : BaseRequestBuilder public SocialMediaAccountsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/socialMediaAccounts{?query*}", pathParameters) { } + /// /// Instantiates a new and sets the default values. /// @@ -46,6 +50,7 @@ public SocialMediaAccountsRequestBuilder(Dictionary pathParamete public SocialMediaAccountsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/socialMediaAccounts{?query*}", rawUrl) { } + /// /// Creates a new socialMediaAccount. /// @@ -58,15 +63,8 @@ public SocialMediaAccountsRequestBuilder(string rawUrl, IRequestAdapter requestA /// When receiving a 404 status code /// When receiving a 409 status code /// When receiving a 422 status code -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public async Task PostAsync(global::OpenApiKiotaEndToEndTests.ModelStateValidation.GeneratedCode.Models.CreateSocialMediaAccountRequestDocument body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { -#nullable restore -#else - public async Task PostAsync(global::OpenApiKiotaEndToEndTests.ModelStateValidation.GeneratedCode.Models.CreateSocialMediaAccountRequestDocument body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) - { -#endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> @@ -79,21 +77,15 @@ public SocialMediaAccountsRequestBuilder(string rawUrl, IRequestAdapter requestA }; return await RequestAdapter.SendAsync(requestInfo, global::OpenApiKiotaEndToEndTests.ModelStateValidation.GeneratedCode.Models.SocialMediaAccountPrimaryResponseDocument.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } + /// /// Creates a new socialMediaAccount. /// /// A /// 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(global::OpenApiKiotaEndToEndTests.ModelStateValidation.GeneratedCode.Models.CreateSocialMediaAccountRequestDocument body, Action>? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToPostRequestInformation(global::OpenApiKiotaEndToEndTests.ModelStateValidation.GeneratedCode.Models.CreateSocialMediaAccountRequestDocument body, Action> requestConfiguration = default) - { -#endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); @@ -101,6 +93,7 @@ public RequestInformation ToPostRequestInformation(global::OpenApiKiotaEndToEndT requestInfo.SetContentFromParsable(RequestAdapter, "application/vnd.api+json", body); return requestInfo; } + /// /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. /// @@ -110,6 +103,7 @@ public RequestInformation ToPostRequestInformation(global::OpenApiKiotaEndToEndT { return new global::OpenApiKiotaEndToEndTests.ModelStateValidation.GeneratedCode.SocialMediaAccounts.SocialMediaAccountsRequestBuilder(rawUrl, RequestAdapter); } + /// /// Creates a new socialMediaAccount. /// @@ -117,16 +111,10 @@ public RequestInformation ToPostRequestInformation(global::OpenApiKiotaEndToEndT public partial class SocialMediaAccountsRequestBuilderPostQueryParameters { /// For syntax, see the documentation for the [`include`](https://www.jsonapi.net/usage/reading/including-relationships.html)/[`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/OpenApiKiotaEndToEndTests.csproj b/test/OpenApiKiotaEndToEndTests/OpenApiKiotaEndToEndTests.csproj index d70baa444..b3ecdca8f 100644 --- a/test/OpenApiKiotaEndToEndTests/OpenApiKiotaEndToEndTests.csproj +++ b/test/OpenApiKiotaEndToEndTests/OpenApiKiotaEndToEndTests.csproj @@ -39,18 +39,25 @@ Condition="$(DesignTimeBuild) != true And $(BuildingProject) == true"> + + + + + + + using (_requestAdapterFactory.WithQueryString(queryString)) { // Act - NodeCollectionResponseDocument? response = await apiClient.Nodes[node.StringId].Children.GetAsync(); + NodeCollectionResponseDocument? response = await apiClient.Nodes[node.StringId!].Children.GetAsync(); // Assert response.ShouldNotBeNull(); @@ -141,7 +141,7 @@ await _testContext.RunOnDatabaseAsync(async dbContext => using (_requestAdapterFactory.WithQueryString(queryString)) { // Act - NodeIdentifierCollectionResponseDocument? response = await apiClient.Nodes[node.StringId].Relationships.Children.GetAsync(); + NodeIdentifierCollectionResponseDocument? response = await apiClient.Nodes[node.StringId!].Relationships.Children.GetAsync(); // Assert response.ShouldNotBeNull(); diff --git a/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/AttributesInCreateNameValuePairRequest.cs b/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/AttributesInCreateNameValuePairRequest.cs index bdc6026b3..4234b60bd 100644 --- a/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/AttributesInCreateNameValuePairRequest.cs +++ b/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/AttributesInCreateNameValuePairRequest.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,38 +17,21 @@ public partial class AttributesInCreateNameValuePairRequest : IBackedModel, IPar { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The name property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Name { get { return BackingStore?.Get("name"); } set { BackingStore?.Set("name", value); } } -#nullable restore -#else - public string Name - { - get { return BackingStore?.Get("name"); } - set { BackingStore?.Set("name", value); } - } -#endif + /// The value property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Value { get { return BackingStore?.Get("value"); } set { BackingStore?.Set("value", value); } } -#nullable restore -#else - public string Value - { - get { return BackingStore?.Get("value"); } - set { BackingStore?.Set("value", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -54,6 +39,7 @@ public AttributesInCreateNameValuePairRequest() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -64,6 +50,7 @@ public AttributesInCreateNameValuePairRequest() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.AttributesInCreateNameValuePairRequest(); } + /// /// The deserialization information for the current model /// @@ -76,6 +63,7 @@ public virtual IDictionary> GetFieldDeserializers() { "value", n => { Value = n.GetStringValue(); } }, }; } + /// /// Serializes information the current object /// @@ -89,3 +77,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/AttributesInCreateNodeRequest.cs b/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/AttributesInCreateNodeRequest.cs index fa403d1ea..0d54b566d 100644 --- a/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/AttributesInCreateNodeRequest.cs +++ b/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/AttributesInCreateNodeRequest.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,38 +17,21 @@ public partial class AttributesInCreateNodeRequest : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The comment property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Comment { get { return BackingStore?.Get("comment"); } set { BackingStore?.Set("comment", value); } } -#nullable restore -#else - public string Comment - { - get { return BackingStore?.Get("comment"); } - set { BackingStore?.Set("comment", value); } - } -#endif + /// The name property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Name { get { return BackingStore?.Get("name"); } set { BackingStore?.Set("name", value); } } -#nullable restore -#else - public string Name - { - get { return BackingStore?.Get("name"); } - set { BackingStore?.Set("name", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -54,6 +39,7 @@ public AttributesInCreateNodeRequest() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -64,6 +50,7 @@ public AttributesInCreateNodeRequest() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.AttributesInCreateNodeRequest(); } + /// /// The deserialization information for the current model /// @@ -76,6 +63,7 @@ public virtual IDictionary> GetFieldDeserializers() { "name", n => { Name = n.GetStringValue(); } }, }; } + /// /// Serializes information the current object /// @@ -89,3 +77,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/AttributesInUpdateNameValuePairRequest.cs b/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/AttributesInUpdateNameValuePairRequest.cs index c3a914ae0..c34eef912 100644 --- a/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/AttributesInUpdateNameValuePairRequest.cs +++ b/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/AttributesInUpdateNameValuePairRequest.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,38 +17,21 @@ public partial class AttributesInUpdateNameValuePairRequest : IBackedModel, IPar { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The name property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Name { get { return BackingStore?.Get("name"); } set { BackingStore?.Set("name", value); } } -#nullable restore -#else - public string Name - { - get { return BackingStore?.Get("name"); } - set { BackingStore?.Set("name", value); } - } -#endif + /// The value property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Value { get { return BackingStore?.Get("value"); } set { BackingStore?.Set("value", value); } } -#nullable restore -#else - public string Value - { - get { return BackingStore?.Get("value"); } - set { BackingStore?.Set("value", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -54,6 +39,7 @@ public AttributesInUpdateNameValuePairRequest() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -64,6 +50,7 @@ public AttributesInUpdateNameValuePairRequest() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.AttributesInUpdateNameValuePairRequest(); } + /// /// The deserialization information for the current model /// @@ -76,6 +63,7 @@ public virtual IDictionary> GetFieldDeserializers() { "value", n => { Value = n.GetStringValue(); } }, }; } + /// /// Serializes information the current object /// @@ -89,3 +77,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/AttributesInUpdateNodeRequest.cs b/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/AttributesInUpdateNodeRequest.cs index 478938ff4..3cf8d2081 100644 --- a/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/AttributesInUpdateNodeRequest.cs +++ b/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/AttributesInUpdateNodeRequest.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,38 +17,21 @@ public partial class AttributesInUpdateNodeRequest : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The comment property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Comment { get { return BackingStore?.Get("comment"); } set { BackingStore?.Set("comment", value); } } -#nullable restore -#else - public string Comment - { - get { return BackingStore?.Get("comment"); } - set { BackingStore?.Set("comment", value); } - } -#endif + /// The name property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Name { get { return BackingStore?.Get("name"); } set { BackingStore?.Set("name", value); } } -#nullable restore -#else - public string Name - { - get { return BackingStore?.Get("name"); } - set { BackingStore?.Set("name", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -54,6 +39,7 @@ public AttributesInUpdateNodeRequest() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -64,6 +50,7 @@ public AttributesInUpdateNodeRequest() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.AttributesInUpdateNodeRequest(); } + /// /// The deserialization information for the current model /// @@ -76,6 +63,7 @@ public virtual IDictionary> GetFieldDeserializers() { "name", n => { Name = n.GetStringValue(); } }, }; } + /// /// Serializes information the current object /// @@ -89,3 +77,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/CreateNameValuePairRequestDocument.cs b/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/CreateNameValuePairRequestDocument.cs index 4d1a3d501..023c20fbe 100644 --- a/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/CreateNameValuePairRequestDocument.cs +++ b/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/CreateNameValuePairRequestDocument.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,38 +17,21 @@ public partial class CreateNameValuePairRequestDocument : IBackedModel, IParsabl { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The data property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.DataInCreateNameValuePairRequest? Data { get { return BackingStore?.Get("data"); } set { BackingStore?.Set("data", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.DataInCreateNameValuePairRequest Data - { - get { return BackingStore?.Get("data"); } - set { BackingStore?.Set("data", value); } - } -#endif + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -54,6 +39,7 @@ public CreateNameValuePairRequestDocument() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -64,6 +50,7 @@ public CreateNameValuePairRequestDocument() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.CreateNameValuePairRequestDocument(); } + /// /// The deserialization information for the current model /// @@ -76,6 +63,7 @@ public virtual IDictionary> GetFieldDeserializers() { "meta", n => { Meta = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.Meta.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -89,3 +77,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/CreateNodeRequestDocument.cs b/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/CreateNodeRequestDocument.cs index 8d55585cd..20ab25886 100644 --- a/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/CreateNodeRequestDocument.cs +++ b/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/CreateNodeRequestDocument.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,38 +17,21 @@ public partial class CreateNodeRequestDocument : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The data property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.DataInCreateNodeRequest? Data { get { return BackingStore?.Get("data"); } set { BackingStore?.Set("data", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.DataInCreateNodeRequest Data - { - get { return BackingStore?.Get("data"); } - set { BackingStore?.Set("data", value); } - } -#endif + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -54,6 +39,7 @@ public CreateNodeRequestDocument() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -64,6 +50,7 @@ public CreateNodeRequestDocument() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.CreateNodeRequestDocument(); } + /// /// The deserialization information for the current model /// @@ -76,6 +63,7 @@ public virtual IDictionary> GetFieldDeserializers() { "meta", n => { Meta = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.Meta.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -89,3 +77,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/DataInCreateNameValuePairRequest.cs b/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/DataInCreateNameValuePairRequest.cs index c9331e369..762bf26e7 100644 --- a/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/DataInCreateNameValuePairRequest.cs +++ b/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/DataInCreateNameValuePairRequest.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -14,61 +16,36 @@ public partial class DataInCreateNameValuePairRequest : IBackedModel, IParsable #pragma warning restore CS1591 { /// The attributes property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.AttributesInCreateNameValuePairRequest? Attributes { get { return BackingStore?.Get("attributes"); } set { BackingStore?.Set("attributes", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.AttributesInCreateNameValuePairRequest Attributes - { - get { return BackingStore?.Get("attributes"); } - set { BackingStore?.Set("attributes", value); } - } -#endif + /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// The relationships property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.RelationshipsInCreateNameValuePairRequest? Relationships { get { return BackingStore?.Get("relationships"); } set { BackingStore?.Set("relationships", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.RelationshipsInCreateNameValuePairRequest Relationships - { - get { return BackingStore?.Get("relationships"); } - set { BackingStore?.Set("relationships", value); } - } -#endif + /// The type property public global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.NameValuePairResourceType? Type { get { return BackingStore?.Get("type"); } set { BackingStore?.Set("type", value); } } + /// /// Instantiates a new and sets the default values. /// @@ -76,6 +53,7 @@ public DataInCreateNameValuePairRequest() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -86,6 +64,7 @@ public DataInCreateNameValuePairRequest() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.DataInCreateNameValuePairRequest(); } + /// /// The deserialization information for the current model /// @@ -100,6 +79,7 @@ public virtual IDictionary> GetFieldDeserializers() { "type", n => { Type = n.GetEnumValue(); } }, }; } + /// /// Serializes information the current object /// @@ -115,3 +95,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/DataInCreateNodeRequest.cs b/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/DataInCreateNodeRequest.cs index 1d084032f..c490b61b9 100644 --- a/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/DataInCreateNodeRequest.cs +++ b/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/DataInCreateNodeRequest.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -14,61 +16,36 @@ public partial class DataInCreateNodeRequest : IBackedModel, IParsable #pragma warning restore CS1591 { /// The attributes property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.AttributesInCreateNodeRequest? Attributes { get { return BackingStore?.Get("attributes"); } set { BackingStore?.Set("attributes", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.AttributesInCreateNodeRequest Attributes - { - get { return BackingStore?.Get("attributes"); } - set { BackingStore?.Set("attributes", value); } - } -#endif + /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// The relationships property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.RelationshipsInCreateNodeRequest? Relationships { get { return BackingStore?.Get("relationships"); } set { BackingStore?.Set("relationships", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.RelationshipsInCreateNodeRequest Relationships - { - get { return BackingStore?.Get("relationships"); } - set { BackingStore?.Set("relationships", value); } - } -#endif + /// The type property public global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.NodeResourceType? Type { get { return BackingStore?.Get("type"); } set { BackingStore?.Set("type", value); } } + /// /// Instantiates a new and sets the default values. /// @@ -76,6 +53,7 @@ public DataInCreateNodeRequest() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -86,6 +64,7 @@ public DataInCreateNodeRequest() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.DataInCreateNodeRequest(); } + /// /// The deserialization information for the current model /// @@ -100,6 +79,7 @@ public virtual IDictionary> GetFieldDeserializers() { "type", n => { Type = n.GetEnumValue(); } }, }; } + /// /// Serializes information the current object /// @@ -115,3 +95,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/DataInResponse.cs b/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/DataInResponse.cs index ddaf4edb8..301ca41f4 100644 --- a/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/DataInResponse.cs +++ b/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/DataInResponse.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,28 +17,21 @@ public partial class DataInResponse : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// The type property public global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.ResourceType? Type { get { return BackingStore?.Get("type"); } set { BackingStore?.Set("type", value); } } + /// /// Instantiates a new and sets the default values. /// @@ -44,6 +39,7 @@ public DataInResponse() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -60,6 +56,7 @@ public DataInResponse() _ => new global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.DataInResponse(), }; } + /// /// The deserialization information for the current model /// @@ -72,6 +69,7 @@ public virtual IDictionary> GetFieldDeserializers() { "type", n => { Type = n.GetEnumValue(); } }, }; } + /// /// Serializes information the current object /// @@ -85,3 +83,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/DataInUpdateNameValuePairRequest.cs b/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/DataInUpdateNameValuePairRequest.cs index cf33489d8..f67915933 100644 --- a/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/DataInUpdateNameValuePairRequest.cs +++ b/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/DataInUpdateNameValuePairRequest.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -14,77 +16,43 @@ public partial class DataInUpdateNameValuePairRequest : IBackedModel, IParsable #pragma warning restore CS1591 { /// The attributes property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.AttributesInUpdateNameValuePairRequest? Attributes { get { return BackingStore?.Get("attributes"); } set { BackingStore?.Set("attributes", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.AttributesInUpdateNameValuePairRequest Attributes - { - get { return BackingStore?.Get("attributes"); } - set { BackingStore?.Set("attributes", value); } - } -#endif + /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The id property -#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 meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// The relationships property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.RelationshipsInUpdateNameValuePairRequest? Relationships { get { return BackingStore?.Get("relationships"); } set { BackingStore?.Set("relationships", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.RelationshipsInUpdateNameValuePairRequest Relationships - { - get { return BackingStore?.Get("relationships"); } - set { BackingStore?.Set("relationships", value); } - } -#endif + /// The type property public global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.NameValuePairResourceType? Type { get { return BackingStore?.Get("type"); } set { BackingStore?.Set("type", value); } } + /// /// Instantiates a new and sets the default values. /// @@ -92,6 +60,7 @@ public DataInUpdateNameValuePairRequest() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -102,6 +71,7 @@ public DataInUpdateNameValuePairRequest() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.DataInUpdateNameValuePairRequest(); } + /// /// The deserialization information for the current model /// @@ -117,6 +87,7 @@ public virtual IDictionary> GetFieldDeserializers() { "type", n => { Type = n.GetEnumValue(); } }, }; } + /// /// Serializes information the current object /// @@ -133,3 +104,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/DataInUpdateNodeRequest.cs b/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/DataInUpdateNodeRequest.cs index cb3f3a399..17c2c9496 100644 --- a/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/DataInUpdateNodeRequest.cs +++ b/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/DataInUpdateNodeRequest.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -14,77 +16,43 @@ public partial class DataInUpdateNodeRequest : IBackedModel, IParsable #pragma warning restore CS1591 { /// The attributes property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.AttributesInUpdateNodeRequest? Attributes { get { return BackingStore?.Get("attributes"); } set { BackingStore?.Set("attributes", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.AttributesInUpdateNodeRequest Attributes - { - get { return BackingStore?.Get("attributes"); } - set { BackingStore?.Set("attributes", value); } - } -#endif + /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The id property -#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 meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// The relationships property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.RelationshipsInUpdateNodeRequest? Relationships { get { return BackingStore?.Get("relationships"); } set { BackingStore?.Set("relationships", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.RelationshipsInUpdateNodeRequest Relationships - { - get { return BackingStore?.Get("relationships"); } - set { BackingStore?.Set("relationships", value); } - } -#endif + /// The type property public global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.NodeResourceType? Type { get { return BackingStore?.Get("type"); } set { BackingStore?.Set("type", value); } } + /// /// Instantiates a new and sets the default values. /// @@ -92,6 +60,7 @@ public DataInUpdateNodeRequest() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -102,6 +71,7 @@ public DataInUpdateNodeRequest() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.DataInUpdateNodeRequest(); } + /// /// The deserialization information for the current model /// @@ -117,6 +87,7 @@ public virtual IDictionary> GetFieldDeserializers() { "type", n => { Type = n.GetEnumValue(); } }, }; } + /// /// Serializes information the current object /// @@ -133,3 +104,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/ErrorLinks.cs b/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/ErrorLinks.cs index e49befc19..5d8a04abd 100644 --- a/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/ErrorLinks.cs +++ b/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/ErrorLinks.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -14,39 +16,22 @@ public partial class ErrorLinks : IBackedModel, IParsable #pragma warning restore CS1591 { /// The about property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? About { get { return BackingStore?.Get("about"); } set { BackingStore?.Set("about", value); } } -#nullable restore -#else - public string About - { - get { return BackingStore?.Get("about"); } - set { BackingStore?.Set("about", value); } - } -#endif + /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// 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 and sets the default values. /// @@ -54,6 +39,7 @@ public ErrorLinks() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -64,6 +50,7 @@ public ErrorLinks() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.ErrorLinks(); } + /// /// The deserialization information for the current model /// @@ -76,6 +63,7 @@ public virtual IDictionary> GetFieldDeserializers() { "type", n => { Type = n.GetStringValue(); } }, }; } + /// /// Serializes information the current object /// @@ -89,3 +77,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/ErrorObject.cs b/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/ErrorObject.cs index 316e37fb1..c1a28478d 100644 --- a/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/ErrorObject.cs +++ b/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/ErrorObject.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,134 +17,63 @@ public partial class ErrorObject : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The code property -#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 detail property -#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 id property -#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 links property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.ErrorLinks? Links { get { return BackingStore?.Get("links"); } set { BackingStore?.Set("links", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.ErrorLinks Links - { - get { return BackingStore?.Get("links"); } - set { BackingStore?.Set("links", value); } - } -#endif + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// The source property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.ErrorSource? Source { get { return BackingStore?.Get("source"); } set { BackingStore?.Set("source", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.ErrorSource Source - { - get { return BackingStore?.Get("source"); } - set { BackingStore?.Set("source", value); } - } -#endif + /// The status property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Status { get { return BackingStore?.Get("status"); } set { BackingStore?.Set("status", value); } } -#nullable restore -#else - public string Status - { - get { return BackingStore?.Get("status"); } - set { BackingStore?.Set("status", value); } - } -#endif + /// The title property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Title { get { return BackingStore?.Get("title"); } set { BackingStore?.Set("title", value); } } -#nullable restore -#else - public string Title - { - get { return BackingStore?.Get("title"); } - set { BackingStore?.Set("title", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -150,6 +81,7 @@ public ErrorObject() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -160,6 +92,7 @@ public ErrorObject() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.ErrorObject(); } + /// /// The deserialization information for the current model /// @@ -178,6 +111,7 @@ public virtual IDictionary> GetFieldDeserializers() { "title", n => { Title = n.GetStringValue(); } }, }; } + /// /// Serializes information the current object /// @@ -197,3 +131,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/ErrorResponseDocument.cs b/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/ErrorResponseDocument.cs index 1e0f1be48..907849434 100644 --- a/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/ErrorResponseDocument.cs +++ b/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/ErrorResponseDocument.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -16,56 +18,31 @@ public partial class ErrorResponseDocument : ApiException, IBackedModel, IParsab { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The errors property -#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 + /// The links property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.ErrorTopLevelLinks? Links { get { return BackingStore?.Get("links"); } set { BackingStore?.Set("links", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.ErrorTopLevelLinks Links - { - get { return BackingStore?.Get("links"); } - set { BackingStore?.Set("links", value); } - } -#endif + /// The primary error message. public override string Message { get => base.Message; } + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -73,6 +50,7 @@ public ErrorResponseDocument() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -83,6 +61,7 @@ public ErrorResponseDocument() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.ErrorResponseDocument(); } + /// /// The deserialization information for the current model /// @@ -96,6 +75,7 @@ public virtual IDictionary> GetFieldDeserializers() { "meta", n => { Meta = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.Meta.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -110,3 +90,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/ErrorSource.cs b/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/ErrorSource.cs index 5f63edc3b..a2f5b98b7 100644 --- a/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/ErrorSource.cs +++ b/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/ErrorSource.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,54 +17,28 @@ public partial class ErrorSource : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The header property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Header { get { return BackingStore?.Get("header"); } set { BackingStore?.Set("header", value); } } -#nullable restore -#else - public string Header - { - get { return BackingStore?.Get("header"); } - set { BackingStore?.Set("header", value); } - } -#endif + /// The parameter property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Parameter { get { return BackingStore?.Get("parameter"); } set { BackingStore?.Set("parameter", value); } } -#nullable restore -#else - public string Parameter - { - get { return BackingStore?.Get("parameter"); } - set { BackingStore?.Set("parameter", value); } - } -#endif + /// The pointer property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Pointer { get { return BackingStore?.Get("pointer"); } set { BackingStore?.Set("pointer", value); } } -#nullable restore -#else - public string Pointer - { - get { return BackingStore?.Get("pointer"); } - set { BackingStore?.Set("pointer", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -70,6 +46,7 @@ public ErrorSource() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -80,6 +57,7 @@ public ErrorSource() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.ErrorSource(); } + /// /// The deserialization information for the current model /// @@ -93,6 +71,7 @@ public virtual IDictionary> GetFieldDeserializers() { "pointer", n => { Pointer = n.GetStringValue(); } }, }; } + /// /// Serializes information the current object /// @@ -107,3 +86,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/ErrorTopLevelLinks.cs b/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/ErrorTopLevelLinks.cs index b82a792a1..6b2ac9441 100644 --- a/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/ErrorTopLevelLinks.cs +++ b/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/ErrorTopLevelLinks.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,38 +17,21 @@ public partial class ErrorTopLevelLinks : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The describedby property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Describedby { get { return BackingStore?.Get("describedby"); } set { BackingStore?.Set("describedby", value); } } -#nullable restore -#else - public string Describedby - { - get { return BackingStore?.Get("describedby"); } - set { BackingStore?.Set("describedby", value); } - } -#endif + /// The self property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Self { get { return BackingStore?.Get("self"); } set { BackingStore?.Set("self", value); } } -#nullable restore -#else - public string Self - { - get { return BackingStore?.Get("self"); } - set { BackingStore?.Set("self", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -54,6 +39,7 @@ public ErrorTopLevelLinks() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -64,6 +50,7 @@ public ErrorTopLevelLinks() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.ErrorTopLevelLinks(); } + /// /// The deserialization information for the current model /// @@ -76,6 +63,7 @@ public virtual IDictionary> GetFieldDeserializers() { "self", n => { Self = n.GetStringValue(); } }, }; } + /// /// Serializes information the current object /// @@ -89,3 +77,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/Meta.cs b/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/Meta.cs index 6858e69fb..62ac6d2ca 100644 --- a/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/Meta.cs +++ b/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/Meta.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -19,8 +21,10 @@ public IDictionary AdditionalData get { return BackingStore.Get>("AdditionalData") ?? new Dictionary(); } set { BackingStore.Set("AdditionalData", value); } } + /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// /// Instantiates a new and sets the default values. /// @@ -29,6 +33,7 @@ public Meta() BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); AdditionalData = new Dictionary(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -39,6 +44,7 @@ public Meta() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.Meta(); } + /// /// The deserialization information for the current model /// @@ -49,6 +55,7 @@ public virtual IDictionary> GetFieldDeserializers() { }; } + /// /// Serializes information the current object /// @@ -61,3 +68,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/NameValuePairAttributesInResponse.cs b/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/NameValuePairAttributesInResponse.cs index f81a7287d..475e2c157 100644 --- a/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/NameValuePairAttributesInResponse.cs +++ b/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/NameValuePairAttributesInResponse.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,38 +17,21 @@ public partial class NameValuePairAttributesInResponse : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The name property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Name { get { return BackingStore?.Get("name"); } set { BackingStore?.Set("name", value); } } -#nullable restore -#else - public string Name - { - get { return BackingStore?.Get("name"); } - set { BackingStore?.Set("name", value); } - } -#endif + /// The value property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Value { get { return BackingStore?.Get("value"); } set { BackingStore?.Set("value", value); } } -#nullable restore -#else - public string Value - { - get { return BackingStore?.Get("value"); } - set { BackingStore?.Set("value", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -54,6 +39,7 @@ public NameValuePairAttributesInResponse() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -64,6 +50,7 @@ public NameValuePairAttributesInResponse() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.NameValuePairAttributesInResponse(); } + /// /// The deserialization information for the current model /// @@ -76,6 +63,7 @@ public virtual IDictionary> GetFieldDeserializers() { "value", n => { Value = n.GetStringValue(); } }, }; } + /// /// Serializes information the current object /// @@ -89,3 +77,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/NameValuePairCollectionResponseDocument.cs b/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/NameValuePairCollectionResponseDocument.cs index 6c93c3c7b..31dfe883a 100644 --- a/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/NameValuePairCollectionResponseDocument.cs +++ b/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/NameValuePairCollectionResponseDocument.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,70 +17,35 @@ public partial class NameValuePairCollectionResponseDocument : IBackedModel, IPa { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The data property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public List? Data { get { return BackingStore?.Get?>("data"); } set { BackingStore?.Set("data", value); } } -#nullable restore -#else - public List Data - { - get { return BackingStore?.Get>("data"); } - set { BackingStore?.Set("data", value); } - } -#endif + /// The included property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public List? Included { get { return BackingStore?.Get?>("included"); } set { BackingStore?.Set("included", value); } } -#nullable restore -#else - public List Included - { - get { return BackingStore?.Get>("included"); } - set { BackingStore?.Set("included", value); } - } -#endif + /// The links property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.ResourceCollectionTopLevelLinks? Links { get { return BackingStore?.Get("links"); } set { BackingStore?.Set("links", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.ResourceCollectionTopLevelLinks Links - { - get { return BackingStore?.Get("links"); } - set { BackingStore?.Set("links", value); } - } -#endif + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -86,6 +53,7 @@ public NameValuePairCollectionResponseDocument() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -96,6 +64,7 @@ public NameValuePairCollectionResponseDocument() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.NameValuePairCollectionResponseDocument(); } + /// /// The deserialization information for the current model /// @@ -110,6 +79,7 @@ public virtual IDictionary> GetFieldDeserializers() { "meta", n => { Meta = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.Meta.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -125,3 +95,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/NameValuePairDataInResponse.cs b/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/NameValuePairDataInResponse.cs index 6e73ee7a0..78bec3d0d 100644 --- a/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/NameValuePairDataInResponse.cs +++ b/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/NameValuePairDataInResponse.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -13,69 +15,33 @@ public partial class NameValuePairDataInResponse : global::OpenApiKiotaEndToEndT #pragma warning restore CS1591 { /// The attributes property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.NameValuePairAttributesInResponse? Attributes { get { return BackingStore?.Get("attributes"); } set { BackingStore?.Set("attributes", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.NameValuePairAttributesInResponse Attributes - { - get { return BackingStore?.Get("attributes"); } - set { BackingStore?.Set("attributes", value); } - } -#endif + /// The id property -#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 links property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.ResourceLinks? Links { get { return BackingStore?.Get("links"); } set { BackingStore?.Set("links", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.ResourceLinks Links - { - get { return BackingStore?.Get("links"); } - set { BackingStore?.Set("links", value); } - } -#endif + /// The relationships property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.NameValuePairRelationshipsInResponse? Relationships { get { return BackingStore?.Get("relationships"); } set { BackingStore?.Set("relationships", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.NameValuePairRelationshipsInResponse Relationships - { - get { return BackingStore?.Get("relationships"); } - set { BackingStore?.Set("relationships", value); } - } -#endif + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -86,6 +52,7 @@ public string Id _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.NameValuePairDataInResponse(); } + /// /// The deserialization information for the current model /// @@ -100,6 +67,7 @@ public override IDictionary> GetFieldDeserializers() { "relationships", n => { Relationships = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.NameValuePairRelationshipsInResponse.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -116,3 +84,4 @@ public override void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/NameValuePairIdentifierCollectionResponseDocument.cs b/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/NameValuePairIdentifierCollectionResponseDocument.cs index 7437a328e..28d037350 100644 --- a/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/NameValuePairIdentifierCollectionResponseDocument.cs +++ b/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/NameValuePairIdentifierCollectionResponseDocument.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,54 +17,28 @@ public partial class NameValuePairIdentifierCollectionResponseDocument : IBacked { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The data property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public List? Data { get { return BackingStore?.Get?>("data"); } set { BackingStore?.Set("data", value); } } -#nullable restore -#else - public List Data - { - get { return BackingStore?.Get>("data"); } - set { BackingStore?.Set("data", value); } - } -#endif + /// The links property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.ResourceIdentifierCollectionTopLevelLinks? Links { get { return BackingStore?.Get("links"); } set { BackingStore?.Set("links", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.ResourceIdentifierCollectionTopLevelLinks Links - { - get { return BackingStore?.Get("links"); } - set { BackingStore?.Set("links", value); } - } -#endif + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -70,6 +46,7 @@ public NameValuePairIdentifierCollectionResponseDocument() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -80,6 +57,7 @@ public NameValuePairIdentifierCollectionResponseDocument() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.NameValuePairIdentifierCollectionResponseDocument(); } + /// /// The deserialization information for the current model /// @@ -93,6 +71,7 @@ public virtual IDictionary> GetFieldDeserializers() { "meta", n => { Meta = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.Meta.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -107,3 +86,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/NameValuePairIdentifierInRequest.cs b/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/NameValuePairIdentifierInRequest.cs index 579fa1bd1..5b34aa22b 100644 --- a/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/NameValuePairIdentifierInRequest.cs +++ b/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/NameValuePairIdentifierInRequest.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,44 +17,28 @@ public partial class NameValuePairIdentifierInRequest : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The id property -#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 meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// The type property public global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.NameValuePairResourceType? Type { get { return BackingStore?.Get("type"); } set { BackingStore?.Set("type", value); } } + /// /// Instantiates a new and sets the default values. /// @@ -60,6 +46,7 @@ public NameValuePairIdentifierInRequest() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -70,6 +57,7 @@ public NameValuePairIdentifierInRequest() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.NameValuePairIdentifierInRequest(); } + /// /// The deserialization information for the current model /// @@ -83,6 +71,7 @@ public virtual IDictionary> GetFieldDeserializers() { "type", n => { Type = n.GetEnumValue(); } }, }; } + /// /// Serializes information the current object /// @@ -97,3 +86,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/NameValuePairIdentifierInResponse.cs b/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/NameValuePairIdentifierInResponse.cs index 00c505b4d..00453d362 100644 --- a/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/NameValuePairIdentifierInResponse.cs +++ b/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/NameValuePairIdentifierInResponse.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,44 +17,28 @@ public partial class NameValuePairIdentifierInResponse : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The id property -#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 meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// The type property public global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.NameValuePairResourceType? Type { get { return BackingStore?.Get("type"); } set { BackingStore?.Set("type", value); } } + /// /// Instantiates a new and sets the default values. /// @@ -60,6 +46,7 @@ public NameValuePairIdentifierInResponse() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -70,6 +57,7 @@ public NameValuePairIdentifierInResponse() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.NameValuePairIdentifierInResponse(); } + /// /// The deserialization information for the current model /// @@ -83,6 +71,7 @@ public virtual IDictionary> GetFieldDeserializers() { "type", n => { Type = n.GetEnumValue(); } }, }; } + /// /// Serializes information the current object /// @@ -97,3 +86,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/NameValuePairPrimaryResponseDocument.cs b/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/NameValuePairPrimaryResponseDocument.cs index ba3c15e06..f5bfbdcb1 100644 --- a/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/NameValuePairPrimaryResponseDocument.cs +++ b/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/NameValuePairPrimaryResponseDocument.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,70 +17,35 @@ public partial class NameValuePairPrimaryResponseDocument : IBackedModel, IParsa { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The data property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.NameValuePairDataInResponse? Data { get { return BackingStore?.Get("data"); } set { BackingStore?.Set("data", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.NameValuePairDataInResponse Data - { - get { return BackingStore?.Get("data"); } - set { BackingStore?.Set("data", value); } - } -#endif + /// The included property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public List? Included { get { return BackingStore?.Get?>("included"); } set { BackingStore?.Set("included", value); } } -#nullable restore -#else - public List Included - { - get { return BackingStore?.Get>("included"); } - set { BackingStore?.Set("included", value); } - } -#endif + /// The links property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.ResourceTopLevelLinks? Links { get { return BackingStore?.Get("links"); } set { BackingStore?.Set("links", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.ResourceTopLevelLinks Links - { - get { return BackingStore?.Get("links"); } - set { BackingStore?.Set("links", value); } - } -#endif + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -86,6 +53,7 @@ public NameValuePairPrimaryResponseDocument() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -96,6 +64,7 @@ public NameValuePairPrimaryResponseDocument() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.NameValuePairPrimaryResponseDocument(); } + /// /// The deserialization information for the current model /// @@ -110,6 +79,7 @@ public virtual IDictionary> GetFieldDeserializers() { "meta", n => { Meta = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.Meta.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -125,3 +95,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/NameValuePairRelationshipsInResponse.cs b/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/NameValuePairRelationshipsInResponse.cs index d124cac65..565898645 100644 --- a/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/NameValuePairRelationshipsInResponse.cs +++ b/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/NameValuePairRelationshipsInResponse.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,22 +17,14 @@ public partial class NameValuePairRelationshipsInResponse : IBackedModel, IParsa { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The owner property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.ToOneNodeInResponse? Owner { get { return BackingStore?.Get("owner"); } set { BackingStore?.Set("owner", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.ToOneNodeInResponse Owner - { - get { return BackingStore?.Get("owner"); } - set { BackingStore?.Set("owner", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -38,6 +32,7 @@ public NameValuePairRelationshipsInResponse() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -48,6 +43,7 @@ public NameValuePairRelationshipsInResponse() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.NameValuePairRelationshipsInResponse(); } + /// /// The deserialization information for the current model /// @@ -59,6 +55,7 @@ public virtual IDictionary> GetFieldDeserializers() { "owner", n => { Owner = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.ToOneNodeInResponse.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -71,3 +68,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/NameValuePairResourceType.cs b/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/NameValuePairResourceType.cs index 51b0e4bca..35da6be52 100644 --- a/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/NameValuePairResourceType.cs +++ b/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/NameValuePairResourceType.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 using System.Runtime.Serialization; using System; namespace OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models @@ -14,3 +16,4 @@ public enum NameValuePairResourceType #pragma warning restore CS1591 } } + diff --git a/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/NodeAttributesInResponse.cs b/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/NodeAttributesInResponse.cs index dd74df607..c77e32ae3 100644 --- a/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/NodeAttributesInResponse.cs +++ b/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/NodeAttributesInResponse.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,38 +17,21 @@ public partial class NodeAttributesInResponse : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The comment property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Comment { get { return BackingStore?.Get("comment"); } set { BackingStore?.Set("comment", value); } } -#nullable restore -#else - public string Comment - { - get { return BackingStore?.Get("comment"); } - set { BackingStore?.Set("comment", value); } - } -#endif + /// The name property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Name { get { return BackingStore?.Get("name"); } set { BackingStore?.Set("name", value); } } -#nullable restore -#else - public string Name - { - get { return BackingStore?.Get("name"); } - set { BackingStore?.Set("name", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -54,6 +39,7 @@ public NodeAttributesInResponse() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -64,6 +50,7 @@ public NodeAttributesInResponse() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.NodeAttributesInResponse(); } + /// /// The deserialization information for the current model /// @@ -76,6 +63,7 @@ public virtual IDictionary> GetFieldDeserializers() { "name", n => { Name = n.GetStringValue(); } }, }; } + /// /// Serializes information the current object /// @@ -89,3 +77,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/NodeCollectionResponseDocument.cs b/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/NodeCollectionResponseDocument.cs index 7ce180952..775304525 100644 --- a/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/NodeCollectionResponseDocument.cs +++ b/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/NodeCollectionResponseDocument.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,70 +17,35 @@ public partial class NodeCollectionResponseDocument : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The data property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public List? Data { get { return BackingStore?.Get?>("data"); } set { BackingStore?.Set("data", value); } } -#nullable restore -#else - public List Data - { - get { return BackingStore?.Get>("data"); } - set { BackingStore?.Set("data", value); } - } -#endif + /// The included property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public List? Included { get { return BackingStore?.Get?>("included"); } set { BackingStore?.Set("included", value); } } -#nullable restore -#else - public List Included - { - get { return BackingStore?.Get>("included"); } - set { BackingStore?.Set("included", value); } - } -#endif + /// The links property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.ResourceCollectionTopLevelLinks? Links { get { return BackingStore?.Get("links"); } set { BackingStore?.Set("links", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.ResourceCollectionTopLevelLinks Links - { - get { return BackingStore?.Get("links"); } - set { BackingStore?.Set("links", value); } - } -#endif + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -86,6 +53,7 @@ public NodeCollectionResponseDocument() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -96,6 +64,7 @@ public NodeCollectionResponseDocument() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.NodeCollectionResponseDocument(); } + /// /// The deserialization information for the current model /// @@ -110,6 +79,7 @@ public virtual IDictionary> GetFieldDeserializers() { "meta", n => { Meta = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.Meta.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -125,3 +95,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/NodeDataInResponse.cs b/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/NodeDataInResponse.cs index 8ea29a2d8..963af2c22 100644 --- a/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/NodeDataInResponse.cs +++ b/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/NodeDataInResponse.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -13,69 +15,33 @@ public partial class NodeDataInResponse : global::OpenApiKiotaEndToEndTests.Quer #pragma warning restore CS1591 { /// The attributes property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.NodeAttributesInResponse? Attributes { get { return BackingStore?.Get("attributes"); } set { BackingStore?.Set("attributes", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.NodeAttributesInResponse Attributes - { - get { return BackingStore?.Get("attributes"); } - set { BackingStore?.Set("attributes", value); } - } -#endif + /// The id property -#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 links property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.ResourceLinks? Links { get { return BackingStore?.Get("links"); } set { BackingStore?.Set("links", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.ResourceLinks Links - { - get { return BackingStore?.Get("links"); } - set { BackingStore?.Set("links", value); } - } -#endif + /// The relationships property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.NodeRelationshipsInResponse? Relationships { get { return BackingStore?.Get("relationships"); } set { BackingStore?.Set("relationships", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.NodeRelationshipsInResponse Relationships - { - get { return BackingStore?.Get("relationships"); } - set { BackingStore?.Set("relationships", value); } - } -#endif + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -86,6 +52,7 @@ public string Id _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.NodeDataInResponse(); } + /// /// The deserialization information for the current model /// @@ -100,6 +67,7 @@ public override IDictionary> GetFieldDeserializers() { "relationships", n => { Relationships = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.NodeRelationshipsInResponse.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -116,3 +84,4 @@ public override void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/NodeIdentifierCollectionResponseDocument.cs b/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/NodeIdentifierCollectionResponseDocument.cs index 9baf07d22..d94b14318 100644 --- a/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/NodeIdentifierCollectionResponseDocument.cs +++ b/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/NodeIdentifierCollectionResponseDocument.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,54 +17,28 @@ public partial class NodeIdentifierCollectionResponseDocument : IBackedModel, IP { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The data property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public List? Data { get { return BackingStore?.Get?>("data"); } set { BackingStore?.Set("data", value); } } -#nullable restore -#else - public List Data - { - get { return BackingStore?.Get>("data"); } - set { BackingStore?.Set("data", value); } - } -#endif + /// The links property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.ResourceIdentifierCollectionTopLevelLinks? Links { get { return BackingStore?.Get("links"); } set { BackingStore?.Set("links", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.ResourceIdentifierCollectionTopLevelLinks Links - { - get { return BackingStore?.Get("links"); } - set { BackingStore?.Set("links", value); } - } -#endif + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -70,6 +46,7 @@ public NodeIdentifierCollectionResponseDocument() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -80,6 +57,7 @@ public NodeIdentifierCollectionResponseDocument() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.NodeIdentifierCollectionResponseDocument(); } + /// /// The deserialization information for the current model /// @@ -93,6 +71,7 @@ public virtual IDictionary> GetFieldDeserializers() { "meta", n => { Meta = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.Meta.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -107,3 +86,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/NodeIdentifierInRequest.cs b/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/NodeIdentifierInRequest.cs index 55174b226..e5bfc9e4d 100644 --- a/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/NodeIdentifierInRequest.cs +++ b/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/NodeIdentifierInRequest.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,44 +17,28 @@ public partial class NodeIdentifierInRequest : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The id property -#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 meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// The type property public global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.NodeResourceType? Type { get { return BackingStore?.Get("type"); } set { BackingStore?.Set("type", value); } } + /// /// Instantiates a new and sets the default values. /// @@ -60,6 +46,7 @@ public NodeIdentifierInRequest() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -70,6 +57,7 @@ public NodeIdentifierInRequest() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.NodeIdentifierInRequest(); } + /// /// The deserialization information for the current model /// @@ -83,6 +71,7 @@ public virtual IDictionary> GetFieldDeserializers() { "type", n => { Type = n.GetEnumValue(); } }, }; } + /// /// Serializes information the current object /// @@ -97,3 +86,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/NodeIdentifierInResponse.cs b/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/NodeIdentifierInResponse.cs index f7433ece2..f7a5c687e 100644 --- a/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/NodeIdentifierInResponse.cs +++ b/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/NodeIdentifierInResponse.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,44 +17,28 @@ public partial class NodeIdentifierInResponse : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The id property -#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 meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// The type property public global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.NodeResourceType? Type { get { return BackingStore?.Get("type"); } set { BackingStore?.Set("type", value); } } + /// /// Instantiates a new and sets the default values. /// @@ -60,6 +46,7 @@ public NodeIdentifierInResponse() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -70,6 +57,7 @@ public NodeIdentifierInResponse() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.NodeIdentifierInResponse(); } + /// /// The deserialization information for the current model /// @@ -83,6 +71,7 @@ public virtual IDictionary> GetFieldDeserializers() { "type", n => { Type = n.GetEnumValue(); } }, }; } + /// /// Serializes information the current object /// @@ -97,3 +86,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/NodeIdentifierResponseDocument.cs b/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/NodeIdentifierResponseDocument.cs index 2944c8bcc..238f8d4b7 100644 --- a/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/NodeIdentifierResponseDocument.cs +++ b/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/NodeIdentifierResponseDocument.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,54 +17,28 @@ public partial class NodeIdentifierResponseDocument : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The data property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.NodeIdentifierInResponse? Data { get { return BackingStore?.Get("data"); } set { BackingStore?.Set("data", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.NodeIdentifierInResponse Data - { - get { return BackingStore?.Get("data"); } - set { BackingStore?.Set("data", value); } - } -#endif + /// The links property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.ResourceIdentifierTopLevelLinks? Links { get { return BackingStore?.Get("links"); } set { BackingStore?.Set("links", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.ResourceIdentifierTopLevelLinks Links - { - get { return BackingStore?.Get("links"); } - set { BackingStore?.Set("links", value); } - } -#endif + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -70,6 +46,7 @@ public NodeIdentifierResponseDocument() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -80,6 +57,7 @@ public NodeIdentifierResponseDocument() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.NodeIdentifierResponseDocument(); } + /// /// The deserialization information for the current model /// @@ -93,6 +71,7 @@ public virtual IDictionary> GetFieldDeserializers() { "meta", n => { Meta = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.Meta.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -107,3 +86,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/NodePrimaryResponseDocument.cs b/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/NodePrimaryResponseDocument.cs index 1752e2f24..73141e730 100644 --- a/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/NodePrimaryResponseDocument.cs +++ b/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/NodePrimaryResponseDocument.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,70 +17,35 @@ public partial class NodePrimaryResponseDocument : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The data property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.NodeDataInResponse? Data { get { return BackingStore?.Get("data"); } set { BackingStore?.Set("data", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.NodeDataInResponse Data - { - get { return BackingStore?.Get("data"); } - set { BackingStore?.Set("data", value); } - } -#endif + /// The included property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public List? Included { get { return BackingStore?.Get?>("included"); } set { BackingStore?.Set("included", value); } } -#nullable restore -#else - public List Included - { - get { return BackingStore?.Get>("included"); } - set { BackingStore?.Set("included", value); } - } -#endif + /// The links property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.ResourceTopLevelLinks? Links { get { return BackingStore?.Get("links"); } set { BackingStore?.Set("links", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.ResourceTopLevelLinks Links - { - get { return BackingStore?.Get("links"); } - set { BackingStore?.Set("links", value); } - } -#endif + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -86,6 +53,7 @@ public NodePrimaryResponseDocument() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -96,6 +64,7 @@ public NodePrimaryResponseDocument() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.NodePrimaryResponseDocument(); } + /// /// The deserialization information for the current model /// @@ -110,6 +79,7 @@ public virtual IDictionary> GetFieldDeserializers() { "meta", n => { Meta = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.Meta.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -125,3 +95,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/NodeRelationshipsInResponse.cs b/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/NodeRelationshipsInResponse.cs index 2cf3ddc6f..cc248006f 100644 --- a/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/NodeRelationshipsInResponse.cs +++ b/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/NodeRelationshipsInResponse.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,54 +17,28 @@ public partial class NodeRelationshipsInResponse : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The children property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.ToManyNodeInResponse? Children { get { return BackingStore?.Get("children"); } set { BackingStore?.Set("children", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.ToManyNodeInResponse Children - { - get { return BackingStore?.Get("children"); } - set { BackingStore?.Set("children", value); } - } -#endif + /// The parent property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.NullableToOneNodeInResponse? Parent { get { return BackingStore?.Get("parent"); } set { BackingStore?.Set("parent", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.NullableToOneNodeInResponse Parent - { - get { return BackingStore?.Get("parent"); } - set { BackingStore?.Set("parent", value); } - } -#endif + /// The values property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.ToManyNameValuePairInResponse? Values { get { return BackingStore?.Get("values"); } set { BackingStore?.Set("values", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.ToManyNameValuePairInResponse Values - { - get { return BackingStore?.Get("values"); } - set { BackingStore?.Set("values", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -70,6 +46,7 @@ public NodeRelationshipsInResponse() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -80,6 +57,7 @@ public NodeRelationshipsInResponse() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.NodeRelationshipsInResponse(); } + /// /// The deserialization information for the current model /// @@ -93,6 +71,7 @@ public virtual IDictionary> GetFieldDeserializers() { "values", n => { Values = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.ToManyNameValuePairInResponse.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -107,3 +86,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/NodeResourceType.cs b/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/NodeResourceType.cs index daeed04bc..3b3e6670d 100644 --- a/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/NodeResourceType.cs +++ b/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/NodeResourceType.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 using System.Runtime.Serialization; using System; namespace OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models @@ -14,3 +16,4 @@ public enum NodeResourceType #pragma warning restore CS1591 } } + diff --git a/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/NodeSecondaryResponseDocument.cs b/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/NodeSecondaryResponseDocument.cs index 655183d12..367cc9ee0 100644 --- a/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/NodeSecondaryResponseDocument.cs +++ b/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/NodeSecondaryResponseDocument.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,70 +17,35 @@ public partial class NodeSecondaryResponseDocument : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The data property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.NodeDataInResponse? Data { get { return BackingStore?.Get("data"); } set { BackingStore?.Set("data", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.NodeDataInResponse Data - { - get { return BackingStore?.Get("data"); } - set { BackingStore?.Set("data", value); } - } -#endif + /// The included property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public List? Included { get { return BackingStore?.Get?>("included"); } set { BackingStore?.Set("included", value); } } -#nullable restore -#else - public List Included - { - get { return BackingStore?.Get>("included"); } - set { BackingStore?.Set("included", value); } - } -#endif + /// The links property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.ResourceTopLevelLinks? Links { get { return BackingStore?.Get("links"); } set { BackingStore?.Set("links", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.ResourceTopLevelLinks Links - { - get { return BackingStore?.Get("links"); } - set { BackingStore?.Set("links", value); } - } -#endif + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -86,6 +53,7 @@ public NodeSecondaryResponseDocument() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -96,6 +64,7 @@ public NodeSecondaryResponseDocument() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.NodeSecondaryResponseDocument(); } + /// /// The deserialization information for the current model /// @@ -110,6 +79,7 @@ public virtual IDictionary> GetFieldDeserializers() { "meta", n => { Meta = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.Meta.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -125,3 +95,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/NullableNodeIdentifierResponseDocument.cs b/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/NullableNodeIdentifierResponseDocument.cs index ee706f467..a385beaa7 100644 --- a/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/NullableNodeIdentifierResponseDocument.cs +++ b/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/NullableNodeIdentifierResponseDocument.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,54 +17,28 @@ public partial class NullableNodeIdentifierResponseDocument : IBackedModel, IPar { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The data property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.NodeIdentifierInResponse? Data { get { return BackingStore?.Get("data"); } set { BackingStore?.Set("data", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.NodeIdentifierInResponse Data - { - get { return BackingStore?.Get("data"); } - set { BackingStore?.Set("data", value); } - } -#endif + /// The links property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.ResourceIdentifierTopLevelLinks? Links { get { return BackingStore?.Get("links"); } set { BackingStore?.Set("links", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.ResourceIdentifierTopLevelLinks Links - { - get { return BackingStore?.Get("links"); } - set { BackingStore?.Set("links", value); } - } -#endif + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -70,6 +46,7 @@ public NullableNodeIdentifierResponseDocument() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -80,6 +57,7 @@ public NullableNodeIdentifierResponseDocument() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.NullableNodeIdentifierResponseDocument(); } + /// /// The deserialization information for the current model /// @@ -93,6 +71,7 @@ public virtual IDictionary> GetFieldDeserializers() { "meta", n => { Meta = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.Meta.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -107,3 +86,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/NullableNodeSecondaryResponseDocument.cs b/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/NullableNodeSecondaryResponseDocument.cs index d8b3e524c..d281c2c87 100644 --- a/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/NullableNodeSecondaryResponseDocument.cs +++ b/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/NullableNodeSecondaryResponseDocument.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,70 +17,35 @@ public partial class NullableNodeSecondaryResponseDocument : IBackedModel, IPars { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The data property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.NodeDataInResponse? Data { get { return BackingStore?.Get("data"); } set { BackingStore?.Set("data", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.NodeDataInResponse Data - { - get { return BackingStore?.Get("data"); } - set { BackingStore?.Set("data", value); } - } -#endif + /// The included property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public List? Included { get { return BackingStore?.Get?>("included"); } set { BackingStore?.Set("included", value); } } -#nullable restore -#else - public List Included - { - get { return BackingStore?.Get>("included"); } - set { BackingStore?.Set("included", value); } - } -#endif + /// The links property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.ResourceTopLevelLinks? Links { get { return BackingStore?.Get("links"); } set { BackingStore?.Set("links", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.ResourceTopLevelLinks Links - { - get { return BackingStore?.Get("links"); } - set { BackingStore?.Set("links", value); } - } -#endif + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -86,6 +53,7 @@ public NullableNodeSecondaryResponseDocument() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -96,6 +64,7 @@ public NullableNodeSecondaryResponseDocument() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.NullableNodeSecondaryResponseDocument(); } + /// /// The deserialization information for the current model /// @@ -110,6 +79,7 @@ public virtual IDictionary> GetFieldDeserializers() { "meta", n => { Meta = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.Meta.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -125,3 +95,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/NullableToOneNodeInRequest.cs b/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/NullableToOneNodeInRequest.cs index 659f356dc..c140f9716 100644 --- a/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/NullableToOneNodeInRequest.cs +++ b/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/NullableToOneNodeInRequest.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,38 +17,21 @@ public partial class NullableToOneNodeInRequest : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The data property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.NodeIdentifierInRequest? Data { get { return BackingStore?.Get("data"); } set { BackingStore?.Set("data", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.NodeIdentifierInRequest Data - { - get { return BackingStore?.Get("data"); } - set { BackingStore?.Set("data", value); } - } -#endif + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -54,6 +39,7 @@ public NullableToOneNodeInRequest() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -64,6 +50,7 @@ public NullableToOneNodeInRequest() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.NullableToOneNodeInRequest(); } + /// /// The deserialization information for the current model /// @@ -76,6 +63,7 @@ public virtual IDictionary> GetFieldDeserializers() { "meta", n => { Meta = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.Meta.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -89,3 +77,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/NullableToOneNodeInResponse.cs b/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/NullableToOneNodeInResponse.cs index c8682a157..bb3ebf901 100644 --- a/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/NullableToOneNodeInResponse.cs +++ b/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/NullableToOneNodeInResponse.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,54 +17,28 @@ public partial class NullableToOneNodeInResponse : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The data property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.NodeIdentifierInResponse? Data { get { return BackingStore?.Get("data"); } set { BackingStore?.Set("data", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.NodeIdentifierInResponse Data - { - get { return BackingStore?.Get("data"); } - set { BackingStore?.Set("data", value); } - } -#endif + /// The links property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.RelationshipLinks? Links { get { return BackingStore?.Get("links"); } set { BackingStore?.Set("links", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.RelationshipLinks Links - { - get { return BackingStore?.Get("links"); } - set { BackingStore?.Set("links", value); } - } -#endif + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -70,6 +46,7 @@ public NullableToOneNodeInResponse() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -80,6 +57,7 @@ public NullableToOneNodeInResponse() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.NullableToOneNodeInResponse(); } + /// /// The deserialization information for the current model /// @@ -93,6 +71,7 @@ public virtual IDictionary> GetFieldDeserializers() { "meta", n => { Meta = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.Meta.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -107,3 +86,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/RelationshipLinks.cs b/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/RelationshipLinks.cs index 3e17199ed..8fff5b96b 100644 --- a/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/RelationshipLinks.cs +++ b/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/RelationshipLinks.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,38 +17,21 @@ public partial class RelationshipLinks : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The related property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Related { get { return BackingStore?.Get("related"); } set { BackingStore?.Set("related", value); } } -#nullable restore -#else - public string Related - { - get { return BackingStore?.Get("related"); } - set { BackingStore?.Set("related", value); } - } -#endif + /// The self property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Self { get { return BackingStore?.Get("self"); } set { BackingStore?.Set("self", value); } } -#nullable restore -#else - public string Self - { - get { return BackingStore?.Get("self"); } - set { BackingStore?.Set("self", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -54,6 +39,7 @@ public RelationshipLinks() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -64,6 +50,7 @@ public RelationshipLinks() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.RelationshipLinks(); } + /// /// The deserialization information for the current model /// @@ -76,6 +63,7 @@ public virtual IDictionary> GetFieldDeserializers() { "self", n => { Self = n.GetStringValue(); } }, }; } + /// /// Serializes information the current object /// @@ -89,3 +77,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/RelationshipsInCreateNameValuePairRequest.cs b/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/RelationshipsInCreateNameValuePairRequest.cs index 9736860ee..1b3697004 100644 --- a/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/RelationshipsInCreateNameValuePairRequest.cs +++ b/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/RelationshipsInCreateNameValuePairRequest.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,22 +17,14 @@ public partial class RelationshipsInCreateNameValuePairRequest : IBackedModel, I { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The owner property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.ToOneNodeInRequest? Owner { get { return BackingStore?.Get("owner"); } set { BackingStore?.Set("owner", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.ToOneNodeInRequest Owner - { - get { return BackingStore?.Get("owner"); } - set { BackingStore?.Set("owner", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -38,6 +32,7 @@ public RelationshipsInCreateNameValuePairRequest() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -48,6 +43,7 @@ public RelationshipsInCreateNameValuePairRequest() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.RelationshipsInCreateNameValuePairRequest(); } + /// /// The deserialization information for the current model /// @@ -59,6 +55,7 @@ public virtual IDictionary> GetFieldDeserializers() { "owner", n => { Owner = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.ToOneNodeInRequest.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -71,3 +68,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/RelationshipsInCreateNodeRequest.cs b/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/RelationshipsInCreateNodeRequest.cs index 195a584a9..14803eba1 100644 --- a/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/RelationshipsInCreateNodeRequest.cs +++ b/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/RelationshipsInCreateNodeRequest.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,54 +17,28 @@ public partial class RelationshipsInCreateNodeRequest : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The children property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.ToManyNodeInRequest? Children { get { return BackingStore?.Get("children"); } set { BackingStore?.Set("children", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.ToManyNodeInRequest Children - { - get { return BackingStore?.Get("children"); } - set { BackingStore?.Set("children", value); } - } -#endif + /// The parent property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.NullableToOneNodeInRequest? Parent { get { return BackingStore?.Get("parent"); } set { BackingStore?.Set("parent", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.NullableToOneNodeInRequest Parent - { - get { return BackingStore?.Get("parent"); } - set { BackingStore?.Set("parent", value); } - } -#endif + /// The values property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.ToManyNameValuePairInRequest? Values { get { return BackingStore?.Get("values"); } set { BackingStore?.Set("values", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.ToManyNameValuePairInRequest Values - { - get { return BackingStore?.Get("values"); } - set { BackingStore?.Set("values", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -70,6 +46,7 @@ public RelationshipsInCreateNodeRequest() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -80,6 +57,7 @@ public RelationshipsInCreateNodeRequest() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.RelationshipsInCreateNodeRequest(); } + /// /// The deserialization information for the current model /// @@ -93,6 +71,7 @@ public virtual IDictionary> GetFieldDeserializers() { "values", n => { Values = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.ToManyNameValuePairInRequest.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -107,3 +86,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/RelationshipsInUpdateNameValuePairRequest.cs b/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/RelationshipsInUpdateNameValuePairRequest.cs index 571cb62b3..3cc256551 100644 --- a/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/RelationshipsInUpdateNameValuePairRequest.cs +++ b/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/RelationshipsInUpdateNameValuePairRequest.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,22 +17,14 @@ public partial class RelationshipsInUpdateNameValuePairRequest : IBackedModel, I { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The owner property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.ToOneNodeInRequest? Owner { get { return BackingStore?.Get("owner"); } set { BackingStore?.Set("owner", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.ToOneNodeInRequest Owner - { - get { return BackingStore?.Get("owner"); } - set { BackingStore?.Set("owner", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -38,6 +32,7 @@ public RelationshipsInUpdateNameValuePairRequest() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -48,6 +43,7 @@ public RelationshipsInUpdateNameValuePairRequest() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.RelationshipsInUpdateNameValuePairRequest(); } + /// /// The deserialization information for the current model /// @@ -59,6 +55,7 @@ public virtual IDictionary> GetFieldDeserializers() { "owner", n => { Owner = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.ToOneNodeInRequest.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -71,3 +68,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/RelationshipsInUpdateNodeRequest.cs b/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/RelationshipsInUpdateNodeRequest.cs index e55855990..05d2dc38a 100644 --- a/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/RelationshipsInUpdateNodeRequest.cs +++ b/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/RelationshipsInUpdateNodeRequest.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,54 +17,28 @@ public partial class RelationshipsInUpdateNodeRequest : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The children property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.ToManyNodeInRequest? Children { get { return BackingStore?.Get("children"); } set { BackingStore?.Set("children", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.ToManyNodeInRequest Children - { - get { return BackingStore?.Get("children"); } - set { BackingStore?.Set("children", value); } - } -#endif + /// The parent property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.NullableToOneNodeInRequest? Parent { get { return BackingStore?.Get("parent"); } set { BackingStore?.Set("parent", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.NullableToOneNodeInRequest Parent - { - get { return BackingStore?.Get("parent"); } - set { BackingStore?.Set("parent", value); } - } -#endif + /// The values property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.ToManyNameValuePairInRequest? Values { get { return BackingStore?.Get("values"); } set { BackingStore?.Set("values", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.ToManyNameValuePairInRequest Values - { - get { return BackingStore?.Get("values"); } - set { BackingStore?.Set("values", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -70,6 +46,7 @@ public RelationshipsInUpdateNodeRequest() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -80,6 +57,7 @@ public RelationshipsInUpdateNodeRequest() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.RelationshipsInUpdateNodeRequest(); } + /// /// The deserialization information for the current model /// @@ -93,6 +71,7 @@ public virtual IDictionary> GetFieldDeserializers() { "values", n => { Values = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.ToManyNameValuePairInRequest.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -107,3 +86,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/ResourceCollectionTopLevelLinks.cs b/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/ResourceCollectionTopLevelLinks.cs index b5e34033c..d9f3c3842 100644 --- a/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/ResourceCollectionTopLevelLinks.cs +++ b/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/ResourceCollectionTopLevelLinks.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,102 +17,49 @@ public partial class ResourceCollectionTopLevelLinks : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The describedby property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Describedby { get { return BackingStore?.Get("describedby"); } set { BackingStore?.Set("describedby", value); } } -#nullable restore -#else - public string Describedby - { - get { return BackingStore?.Get("describedby"); } - set { BackingStore?.Set("describedby", value); } - } -#endif + /// The first property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? First { get { return BackingStore?.Get("first"); } set { BackingStore?.Set("first", value); } } -#nullable restore -#else - public string First - { - get { return BackingStore?.Get("first"); } - set { BackingStore?.Set("first", value); } - } -#endif + /// The last property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Last { get { return BackingStore?.Get("last"); } set { BackingStore?.Set("last", value); } } -#nullable restore -#else - public string Last - { - get { return BackingStore?.Get("last"); } - set { BackingStore?.Set("last", value); } - } -#endif + /// The next property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Next { get { return BackingStore?.Get("next"); } set { BackingStore?.Set("next", value); } } -#nullable restore -#else - public string Next - { - get { return BackingStore?.Get("next"); } - set { BackingStore?.Set("next", value); } - } -#endif + /// The prev property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Prev { get { return BackingStore?.Get("prev"); } set { BackingStore?.Set("prev", value); } } -#nullable restore -#else - public string Prev - { - get { return BackingStore?.Get("prev"); } - set { BackingStore?.Set("prev", value); } - } -#endif + /// The self property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Self { get { return BackingStore?.Get("self"); } set { BackingStore?.Set("self", value); } } -#nullable restore -#else - public string Self - { - get { return BackingStore?.Get("self"); } - set { BackingStore?.Set("self", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -118,6 +67,7 @@ public ResourceCollectionTopLevelLinks() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -128,6 +78,7 @@ public ResourceCollectionTopLevelLinks() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.ResourceCollectionTopLevelLinks(); } + /// /// The deserialization information for the current model /// @@ -144,6 +95,7 @@ public virtual IDictionary> GetFieldDeserializers() { "self", n => { Self = n.GetStringValue(); } }, }; } + /// /// Serializes information the current object /// @@ -161,3 +113,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/ResourceIdentifierCollectionTopLevelLinks.cs b/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/ResourceIdentifierCollectionTopLevelLinks.cs index 2266f81c4..ec4b4b123 100644 --- a/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/ResourceIdentifierCollectionTopLevelLinks.cs +++ b/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/ResourceIdentifierCollectionTopLevelLinks.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,118 +17,56 @@ public partial class ResourceIdentifierCollectionTopLevelLinks : IBackedModel, I { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The describedby property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Describedby { get { return BackingStore?.Get("describedby"); } set { BackingStore?.Set("describedby", value); } } -#nullable restore -#else - public string Describedby - { - get { return BackingStore?.Get("describedby"); } - set { BackingStore?.Set("describedby", value); } - } -#endif + /// The first property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? First { get { return BackingStore?.Get("first"); } set { BackingStore?.Set("first", value); } } -#nullable restore -#else - public string First - { - get { return BackingStore?.Get("first"); } - set { BackingStore?.Set("first", value); } - } -#endif + /// The last property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Last { get { return BackingStore?.Get("last"); } set { BackingStore?.Set("last", value); } } -#nullable restore -#else - public string Last - { - get { return BackingStore?.Get("last"); } - set { BackingStore?.Set("last", value); } - } -#endif + /// The next property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Next { get { return BackingStore?.Get("next"); } set { BackingStore?.Set("next", value); } } -#nullable restore -#else - public string Next - { - get { return BackingStore?.Get("next"); } - set { BackingStore?.Set("next", value); } - } -#endif + /// The prev property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Prev { get { return BackingStore?.Get("prev"); } set { BackingStore?.Set("prev", value); } } -#nullable restore -#else - public string Prev - { - get { return BackingStore?.Get("prev"); } - set { BackingStore?.Set("prev", value); } - } -#endif + /// The related property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Related { get { return BackingStore?.Get("related"); } set { BackingStore?.Set("related", value); } } -#nullable restore -#else - public string Related - { - get { return BackingStore?.Get("related"); } - set { BackingStore?.Set("related", value); } - } -#endif + /// The self property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Self { get { return BackingStore?.Get("self"); } set { BackingStore?.Set("self", value); } } -#nullable restore -#else - public string Self - { - get { return BackingStore?.Get("self"); } - set { BackingStore?.Set("self", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -134,6 +74,7 @@ public ResourceIdentifierCollectionTopLevelLinks() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -144,6 +85,7 @@ public ResourceIdentifierCollectionTopLevelLinks() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.ResourceIdentifierCollectionTopLevelLinks(); } + /// /// The deserialization information for the current model /// @@ -161,6 +103,7 @@ public virtual IDictionary> GetFieldDeserializers() { "self", n => { Self = n.GetStringValue(); } }, }; } + /// /// Serializes information the current object /// @@ -179,3 +122,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/ResourceIdentifierTopLevelLinks.cs b/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/ResourceIdentifierTopLevelLinks.cs index 3f5c73853..a327098ad 100644 --- a/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/ResourceIdentifierTopLevelLinks.cs +++ b/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/ResourceIdentifierTopLevelLinks.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,54 +17,28 @@ public partial class ResourceIdentifierTopLevelLinks : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The describedby property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Describedby { get { return BackingStore?.Get("describedby"); } set { BackingStore?.Set("describedby", value); } } -#nullable restore -#else - public string Describedby - { - get { return BackingStore?.Get("describedby"); } - set { BackingStore?.Set("describedby", value); } - } -#endif + /// The related property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Related { get { return BackingStore?.Get("related"); } set { BackingStore?.Set("related", value); } } -#nullable restore -#else - public string Related - { - get { return BackingStore?.Get("related"); } - set { BackingStore?.Set("related", value); } - } -#endif + /// The self property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Self { get { return BackingStore?.Get("self"); } set { BackingStore?.Set("self", value); } } -#nullable restore -#else - public string Self - { - get { return BackingStore?.Get("self"); } - set { BackingStore?.Set("self", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -70,6 +46,7 @@ public ResourceIdentifierTopLevelLinks() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -80,6 +57,7 @@ public ResourceIdentifierTopLevelLinks() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.ResourceIdentifierTopLevelLinks(); } + /// /// The deserialization information for the current model /// @@ -93,6 +71,7 @@ public virtual IDictionary> GetFieldDeserializers() { "self", n => { Self = n.GetStringValue(); } }, }; } + /// /// Serializes information the current object /// @@ -107,3 +86,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/ResourceLinks.cs b/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/ResourceLinks.cs index 4f89d05bb..7cfe28d8c 100644 --- a/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/ResourceLinks.cs +++ b/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/ResourceLinks.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,22 +17,14 @@ public partial class ResourceLinks : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The self property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Self { get { return BackingStore?.Get("self"); } set { BackingStore?.Set("self", value); } } -#nullable restore -#else - public string Self - { - get { return BackingStore?.Get("self"); } - set { BackingStore?.Set("self", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -38,6 +32,7 @@ public ResourceLinks() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -48,6 +43,7 @@ public ResourceLinks() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.ResourceLinks(); } + /// /// The deserialization information for the current model /// @@ -59,6 +55,7 @@ public virtual IDictionary> GetFieldDeserializers() { "self", n => { Self = n.GetStringValue(); } }, }; } + /// /// Serializes information the current object /// @@ -71,3 +68,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/ResourceTopLevelLinks.cs b/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/ResourceTopLevelLinks.cs index 885377e3b..934747386 100644 --- a/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/ResourceTopLevelLinks.cs +++ b/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/ResourceTopLevelLinks.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,38 +17,21 @@ public partial class ResourceTopLevelLinks : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The describedby property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Describedby { get { return BackingStore?.Get("describedby"); } set { BackingStore?.Set("describedby", value); } } -#nullable restore -#else - public string Describedby - { - get { return BackingStore?.Get("describedby"); } - set { BackingStore?.Set("describedby", value); } - } -#endif + /// The self property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Self { get { return BackingStore?.Get("self"); } set { BackingStore?.Set("self", value); } } -#nullable restore -#else - public string Self - { - get { return BackingStore?.Get("self"); } - set { BackingStore?.Set("self", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -54,6 +39,7 @@ public ResourceTopLevelLinks() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -64,6 +50,7 @@ public ResourceTopLevelLinks() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.ResourceTopLevelLinks(); } + /// /// The deserialization information for the current model /// @@ -76,6 +63,7 @@ public virtual IDictionary> GetFieldDeserializers() { "self", n => { Self = n.GetStringValue(); } }, }; } + /// /// Serializes information the current object /// @@ -89,3 +77,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/ResourceType.cs b/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/ResourceType.cs index be23605b1..a05cd15a7 100644 --- a/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/ResourceType.cs +++ b/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/ResourceType.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 using System.Runtime.Serialization; using System; namespace OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models @@ -18,3 +20,4 @@ public enum ResourceType #pragma warning restore CS1591 } } + diff --git a/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/ToManyNameValuePairInRequest.cs b/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/ToManyNameValuePairInRequest.cs index 591df4508..2f6fbdb53 100644 --- a/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/ToManyNameValuePairInRequest.cs +++ b/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/ToManyNameValuePairInRequest.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,38 +17,21 @@ public partial class ToManyNameValuePairInRequest : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The data property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public List? Data { get { return BackingStore?.Get?>("data"); } set { BackingStore?.Set("data", value); } } -#nullable restore -#else - public List Data - { - get { return BackingStore?.Get>("data"); } - set { BackingStore?.Set("data", value); } - } -#endif + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -54,6 +39,7 @@ public ToManyNameValuePairInRequest() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -64,6 +50,7 @@ public ToManyNameValuePairInRequest() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.ToManyNameValuePairInRequest(); } + /// /// The deserialization information for the current model /// @@ -76,6 +63,7 @@ public virtual IDictionary> GetFieldDeserializers() { "meta", n => { Meta = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.Meta.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -89,3 +77,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/ToManyNameValuePairInResponse.cs b/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/ToManyNameValuePairInResponse.cs index 7ae1bd1a6..c71425bc8 100644 --- a/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/ToManyNameValuePairInResponse.cs +++ b/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/ToManyNameValuePairInResponse.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,54 +17,28 @@ public partial class ToManyNameValuePairInResponse : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The data property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public List? Data { get { return BackingStore?.Get?>("data"); } set { BackingStore?.Set("data", value); } } -#nullable restore -#else - public List Data - { - get { return BackingStore?.Get>("data"); } - set { BackingStore?.Set("data", value); } - } -#endif + /// The links property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.RelationshipLinks? Links { get { return BackingStore?.Get("links"); } set { BackingStore?.Set("links", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.RelationshipLinks Links - { - get { return BackingStore?.Get("links"); } - set { BackingStore?.Set("links", value); } - } -#endif + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -70,6 +46,7 @@ public ToManyNameValuePairInResponse() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -80,6 +57,7 @@ public ToManyNameValuePairInResponse() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.ToManyNameValuePairInResponse(); } + /// /// The deserialization information for the current model /// @@ -93,6 +71,7 @@ public virtual IDictionary> GetFieldDeserializers() { "meta", n => { Meta = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.Meta.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -107,3 +86,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/ToManyNodeInRequest.cs b/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/ToManyNodeInRequest.cs index 4ff84236e..5c0c5eddd 100644 --- a/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/ToManyNodeInRequest.cs +++ b/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/ToManyNodeInRequest.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,38 +17,21 @@ public partial class ToManyNodeInRequest : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The data property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public List? Data { get { return BackingStore?.Get?>("data"); } set { BackingStore?.Set("data", value); } } -#nullable restore -#else - public List Data - { - get { return BackingStore?.Get>("data"); } - set { BackingStore?.Set("data", value); } - } -#endif + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -54,6 +39,7 @@ public ToManyNodeInRequest() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -64,6 +50,7 @@ public ToManyNodeInRequest() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.ToManyNodeInRequest(); } + /// /// The deserialization information for the current model /// @@ -76,6 +63,7 @@ public virtual IDictionary> GetFieldDeserializers() { "meta", n => { Meta = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.Meta.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -89,3 +77,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/ToManyNodeInResponse.cs b/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/ToManyNodeInResponse.cs index b84846b34..ef6fd493f 100644 --- a/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/ToManyNodeInResponse.cs +++ b/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/ToManyNodeInResponse.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,54 +17,28 @@ public partial class ToManyNodeInResponse : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The data property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public List? Data { get { return BackingStore?.Get?>("data"); } set { BackingStore?.Set("data", value); } } -#nullable restore -#else - public List Data - { - get { return BackingStore?.Get>("data"); } - set { BackingStore?.Set("data", value); } - } -#endif + /// The links property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.RelationshipLinks? Links { get { return BackingStore?.Get("links"); } set { BackingStore?.Set("links", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.RelationshipLinks Links - { - get { return BackingStore?.Get("links"); } - set { BackingStore?.Set("links", value); } - } -#endif + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -70,6 +46,7 @@ public ToManyNodeInResponse() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -80,6 +57,7 @@ public ToManyNodeInResponse() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.ToManyNodeInResponse(); } + /// /// The deserialization information for the current model /// @@ -93,6 +71,7 @@ public virtual IDictionary> GetFieldDeserializers() { "meta", n => { Meta = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.Meta.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -107,3 +86,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/ToOneNodeInRequest.cs b/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/ToOneNodeInRequest.cs index b33cddbb0..622639f7e 100644 --- a/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/ToOneNodeInRequest.cs +++ b/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/ToOneNodeInRequest.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,38 +17,21 @@ public partial class ToOneNodeInRequest : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The data property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.NodeIdentifierInRequest? Data { get { return BackingStore?.Get("data"); } set { BackingStore?.Set("data", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.NodeIdentifierInRequest Data - { - get { return BackingStore?.Get("data"); } - set { BackingStore?.Set("data", value); } - } -#endif + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -54,6 +39,7 @@ public ToOneNodeInRequest() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -64,6 +50,7 @@ public ToOneNodeInRequest() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.ToOneNodeInRequest(); } + /// /// The deserialization information for the current model /// @@ -76,6 +63,7 @@ public virtual IDictionary> GetFieldDeserializers() { "meta", n => { Meta = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.Meta.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -89,3 +77,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/ToOneNodeInResponse.cs b/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/ToOneNodeInResponse.cs index 67e74153a..2a4d4e31f 100644 --- a/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/ToOneNodeInResponse.cs +++ b/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/ToOneNodeInResponse.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,54 +17,28 @@ public partial class ToOneNodeInResponse : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The data property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.NodeIdentifierInResponse? Data { get { return BackingStore?.Get("data"); } set { BackingStore?.Set("data", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.NodeIdentifierInResponse Data - { - get { return BackingStore?.Get("data"); } - set { BackingStore?.Set("data", value); } - } -#endif + /// The links property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.RelationshipLinks? Links { get { return BackingStore?.Get("links"); } set { BackingStore?.Set("links", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.RelationshipLinks Links - { - get { return BackingStore?.Get("links"); } - set { BackingStore?.Set("links", value); } - } -#endif + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -70,6 +46,7 @@ public ToOneNodeInResponse() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -80,6 +57,7 @@ public ToOneNodeInResponse() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.ToOneNodeInResponse(); } + /// /// The deserialization information for the current model /// @@ -93,6 +71,7 @@ public virtual IDictionary> GetFieldDeserializers() { "meta", n => { Meta = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.Meta.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -107,3 +86,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/UpdateNameValuePairRequestDocument.cs b/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/UpdateNameValuePairRequestDocument.cs index ec979206b..43dab210c 100644 --- a/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/UpdateNameValuePairRequestDocument.cs +++ b/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/UpdateNameValuePairRequestDocument.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,38 +17,21 @@ public partial class UpdateNameValuePairRequestDocument : IBackedModel, IParsabl { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The data property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.DataInUpdateNameValuePairRequest? Data { get { return BackingStore?.Get("data"); } set { BackingStore?.Set("data", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.DataInUpdateNameValuePairRequest Data - { - get { return BackingStore?.Get("data"); } - set { BackingStore?.Set("data", value); } - } -#endif + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -54,6 +39,7 @@ public UpdateNameValuePairRequestDocument() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -64,6 +50,7 @@ public UpdateNameValuePairRequestDocument() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.UpdateNameValuePairRequestDocument(); } + /// /// The deserialization information for the current model /// @@ -76,6 +63,7 @@ public virtual IDictionary> GetFieldDeserializers() { "meta", n => { Meta = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.Meta.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -89,3 +77,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/UpdateNodeRequestDocument.cs b/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/UpdateNodeRequestDocument.cs index 32d339592..fa47cb59e 100644 --- a/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/UpdateNodeRequestDocument.cs +++ b/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Models/UpdateNodeRequestDocument.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,38 +17,21 @@ public partial class UpdateNodeRequestDocument : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The data property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.DataInUpdateNodeRequest? Data { get { return BackingStore?.Get("data"); } set { BackingStore?.Set("data", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.DataInUpdateNodeRequest Data - { - get { return BackingStore?.Get("data"); } - set { BackingStore?.Set("data", value); } - } -#endif + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -54,6 +39,7 @@ public UpdateNodeRequestDocument() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -64,6 +50,7 @@ public UpdateNodeRequestDocument() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.UpdateNodeRequestDocument(); } + /// /// The deserialization information for the current model /// @@ -76,6 +63,7 @@ public virtual IDictionary> GetFieldDeserializers() { "meta", n => { Meta = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.Meta.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -89,3 +77,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/NameValuePairs/Item/NameValuePairsItemRequestBuilder.cs b/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/NameValuePairs/Item/NameValuePairsItemRequestBuilder.cs index 1e9140caf..3d2dd2d34 100644 --- a/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/NameValuePairs/Item/NameValuePairsItemRequestBuilder.cs +++ b/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/NameValuePairs/Item/NameValuePairsItemRequestBuilder.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -24,11 +26,13 @@ public partial class NameValuePairsItemRequestBuilder : BaseRequestBuilder { get => new global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.NameValuePairs.Item.Owner.OwnerRequestBuilder(PathParameters, RequestAdapter); } + /// The relationships property public global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.NameValuePairs.Item.Relationships.RelationshipsRequestBuilder Relationships { get => new global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.NameValuePairs.Item.Relationships.RelationshipsRequestBuilder(PathParameters, RequestAdapter); } + /// /// Instantiates a new and sets the default values. /// @@ -37,6 +41,7 @@ public partial class NameValuePairsItemRequestBuilder : BaseRequestBuilder public NameValuePairsItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/nameValuePairs/{id}{?query*}", pathParameters) { } + /// /// Instantiates a new and sets the default values. /// @@ -45,21 +50,15 @@ public NameValuePairsItemRequestBuilder(Dictionary pathParameter public NameValuePairsItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/nameValuePairs/{id}{?query*}", rawUrl) { } + /// /// Deletes an existing nameValuePair by its identifier. /// /// Cancellation token to use when cancelling requests /// Configuration for the request such as headers, query parameters, and middleware options. /// When receiving a 404 status code -#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> { @@ -67,6 +66,7 @@ public async Task DeleteAsync(Action /// Retrieves an individual nameValuePair by its identifier. /// @@ -75,15 +75,8 @@ public async Task DeleteAsync(ActionConfiguration for the request such as headers, query parameters, and middleware options. /// When receiving a 400 status code /// When receiving a 404 status code -#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> { @@ -92,23 +85,18 @@ public async Task DeleteAsync(Action(requestInfo, global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.NameValuePairPrimaryResponseDocument.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// /// 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 HeadAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { -#nullable restore -#else - public async Task HeadAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) - { -#endif var requestInfo = ToHeadRequestInformation(requestConfiguration); await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); } + /// /// Updates an existing nameValuePair. /// @@ -120,15 +108,8 @@ public async Task HeadAsync(ActionWhen receiving a 404 status code /// When receiving a 409 status code /// When receiving a 422 status code -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public async Task PatchAsync(global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.UpdateNameValuePairRequestDocument body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { -#nullable restore -#else - public async Task PatchAsync(global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.UpdateNameValuePairRequestDocument body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) - { -#endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> @@ -140,77 +121,53 @@ public async Task HeadAsync(Action(requestInfo, global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.NameValuePairPrimaryResponseDocument.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } + /// /// Deletes an existing nameValuePair by its identifier. /// /// A /// 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(Method.DELETE, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/vnd.api+json"); return requestInfo; } + /// /// Retrieves an individual nameValuePair by its identifier. /// /// A /// 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(Method.GET, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/vnd.api+json"); return requestInfo; } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// /// A /// 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 ToHeadRequestInformation(Action>? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToHeadRequestInformation(Action> requestConfiguration = default) - { -#endif var requestInfo = new RequestInformation(Method.HEAD, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); return requestInfo; } + /// /// Updates an existing nameValuePair. /// /// A /// 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(global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.UpdateNameValuePairRequestDocument body, Action>? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToPatchRequestInformation(global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.UpdateNameValuePairRequestDocument body, Action> requestConfiguration = default) - { -#endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); @@ -218,6 +175,7 @@ public RequestInformation ToPatchRequestInformation(global::OpenApiKiotaEndToEnd requestInfo.SetContentFromParsable(RequestAdapter, "application/vnd.api+json", body); return requestInfo; } + /// /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. /// @@ -227,6 +185,7 @@ public RequestInformation ToPatchRequestInformation(global::OpenApiKiotaEndToEnd { return new global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.NameValuePairs.Item.NameValuePairsItemRequestBuilder(rawUrl, RequestAdapter); } + /// /// Retrieves an individual nameValuePair by its identifier. /// @@ -234,16 +193,10 @@ public RequestInformation ToPatchRequestInformation(global::OpenApiKiotaEndToEnd public partial class NameValuePairsItemRequestBuilderGetQueryParameters { /// For syntax, see the documentation for the [`include`](https://www.jsonapi.net/usage/reading/including-relationships.html)/[`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// @@ -251,16 +204,10 @@ public partial class NameValuePairsItemRequestBuilderGetQueryParameters public partial class NameValuePairsItemRequestBuilderHeadQueryParameters { /// For syntax, see the documentation for the [`include`](https://www.jsonapi.net/usage/reading/including-relationships.html)/[`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } + /// /// Updates an existing nameValuePair. /// @@ -268,16 +215,10 @@ public partial class NameValuePairsItemRequestBuilderHeadQueryParameters public partial class NameValuePairsItemRequestBuilderPatchQueryParameters { /// For syntax, see the documentation for the [`include`](https://www.jsonapi.net/usage/reading/including-relationships.html)/[`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/NameValuePairs/Item/Owner/OwnerRequestBuilder.cs b/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/NameValuePairs/Item/Owner/OwnerRequestBuilder.cs index 2994200ff..609ecc1c1 100644 --- a/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/NameValuePairs/Item/Owner/OwnerRequestBuilder.cs +++ b/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/NameValuePairs/Item/Owner/OwnerRequestBuilder.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -25,6 +27,7 @@ public partial class OwnerRequestBuilder : BaseRequestBuilder public OwnerRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/nameValuePairs/{id}/owner{?query*}", pathParameters) { } + /// /// Instantiates a new and sets the default values. /// @@ -33,6 +36,7 @@ public OwnerRequestBuilder(Dictionary pathParameters, IRequestAd public OwnerRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/nameValuePairs/{id}/owner{?query*}", rawUrl) { } + /// /// Retrieves the related node of an individual nameValuePair's owner relationship. /// @@ -41,15 +45,8 @@ public OwnerRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base /// Configuration for the request such as headers, query parameters, and middleware options. /// When receiving a 400 status code /// When receiving a 404 status code -#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> { @@ -58,60 +55,43 @@ public OwnerRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base }; return await RequestAdapter.SendAsync(requestInfo, global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.NodeSecondaryResponseDocument.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// /// 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 HeadAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { -#nullable restore -#else - public async Task HeadAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) - { -#endif var requestInfo = ToHeadRequestInformation(requestConfiguration); await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); } + /// /// Retrieves the related node of an individual nameValuePair's owner relationship. /// /// A /// 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(Method.GET, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/vnd.api+json"); return requestInfo; } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// /// A /// 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 ToHeadRequestInformation(Action>? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToHeadRequestInformation(Action> requestConfiguration = default) - { -#endif var requestInfo = new RequestInformation(Method.HEAD, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); return requestInfo; } + /// /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. /// @@ -121,6 +101,7 @@ public RequestInformation ToHeadRequestInformation(Action /// Retrieves the related node of an individual nameValuePair's owner relationship. /// @@ -128,16 +109,10 @@ public RequestInformation ToHeadRequestInformation(ActionFor syntax, see the documentation for the [`include`](https://www.jsonapi.net/usage/reading/including-relationships.html)/[`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// @@ -145,16 +120,10 @@ public partial class OwnerRequestBuilderGetQueryParameters public partial class OwnerRequestBuilderHeadQueryParameters { /// For syntax, see the documentation for the [`include`](https://www.jsonapi.net/usage/reading/including-relationships.html)/[`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/NameValuePairs/Item/Relationships/Owner/OwnerRequestBuilder.cs b/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/NameValuePairs/Item/Relationships/Owner/OwnerRequestBuilder.cs index e0e58b8fd..34f17d833 100644 --- a/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/NameValuePairs/Item/Relationships/Owner/OwnerRequestBuilder.cs +++ b/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/NameValuePairs/Item/Relationships/Owner/OwnerRequestBuilder.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -25,6 +27,7 @@ public partial class OwnerRequestBuilder : BaseRequestBuilder public OwnerRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/nameValuePairs/{id}/relationships/owner{?query*}", pathParameters) { } + /// /// Instantiates a new and sets the default values. /// @@ -33,6 +36,7 @@ public OwnerRequestBuilder(Dictionary pathParameters, IRequestAd public OwnerRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/nameValuePairs/{id}/relationships/owner{?query*}", rawUrl) { } + /// /// Retrieves the related node identity of an individual nameValuePair's owner relationship. /// @@ -41,15 +45,8 @@ public OwnerRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base /// Configuration for the request such as headers, query parameters, and middleware options. /// When receiving a 400 status code /// When receiving a 404 status code -#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> { @@ -58,23 +55,18 @@ public OwnerRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base }; return await RequestAdapter.SendAsync(requestInfo, global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.NodeIdentifierResponseDocument.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// /// 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 HeadAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { -#nullable restore -#else - public async Task HeadAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) - { -#endif var requestInfo = ToHeadRequestInformation(requestConfiguration); await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); } + /// /// Assigns an existing node to the owner relationship of an individual nameValuePair. /// @@ -84,15 +76,8 @@ public async Task HeadAsync(ActionWhen receiving a 400 status code /// When receiving a 404 status code /// When receiving a 409 status code -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public async Task PatchAsync(global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.ToOneNodeInRequest body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { -#nullable restore -#else - public async Task PatchAsync(global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.ToOneNodeInRequest body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) - { -#endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> @@ -103,58 +88,40 @@ public async Task PatchAsync(global::OpenApiKiotaEndToEndTests.QueryStrings.Gene }; await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); } + /// /// Retrieves the related node identity of an individual nameValuePair's owner relationship. /// /// A /// 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(Method.GET, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/vnd.api+json"); return requestInfo; } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// /// A /// 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 ToHeadRequestInformation(Action>? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToHeadRequestInformation(Action> requestConfiguration = default) - { -#endif var requestInfo = new RequestInformation(Method.HEAD, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); return requestInfo; } + /// /// Assigns an existing node to the owner relationship of an individual nameValuePair. /// /// A /// 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(global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.ToOneNodeInRequest body, Action>? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToPatchRequestInformation(global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.ToOneNodeInRequest body, Action> requestConfiguration = default) - { -#endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); @@ -162,6 +129,7 @@ public RequestInformation ToPatchRequestInformation(global::OpenApiKiotaEndToEnd requestInfo.SetContentFromParsable(RequestAdapter, "application/vnd.api+json", body); return requestInfo; } + /// /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. /// @@ -171,6 +139,7 @@ public RequestInformation ToPatchRequestInformation(global::OpenApiKiotaEndToEnd { return new global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.NameValuePairs.Item.Relationships.Owner.OwnerRequestBuilder(rawUrl, RequestAdapter); } + /// /// Retrieves the related node identity of an individual nameValuePair's owner relationship. /// @@ -178,16 +147,10 @@ public RequestInformation ToPatchRequestInformation(global::OpenApiKiotaEndToEnd public partial class OwnerRequestBuilderGetQueryParameters { /// For syntax, see the documentation for the [`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// @@ -195,16 +158,10 @@ public partial class OwnerRequestBuilderGetQueryParameters public partial class OwnerRequestBuilderHeadQueryParameters { /// For syntax, see the documentation for the [`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/NameValuePairs/Item/Relationships/RelationshipsRequestBuilder.cs b/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/NameValuePairs/Item/Relationships/RelationshipsRequestBuilder.cs index a0179668d..e59369f6a 100644 --- a/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/NameValuePairs/Item/Relationships/RelationshipsRequestBuilder.cs +++ b/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/NameValuePairs/Item/Relationships/RelationshipsRequestBuilder.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions; @@ -20,6 +22,7 @@ public partial class RelationshipsRequestBuilder : BaseRequestBuilder { get => new global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.NameValuePairs.Item.Relationships.Owner.OwnerRequestBuilder(PathParameters, RequestAdapter); } + /// /// Instantiates a new and sets the default values. /// @@ -28,6 +31,7 @@ public partial class RelationshipsRequestBuilder : BaseRequestBuilder public RelationshipsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/nameValuePairs/{id}/relationships", pathParameters) { } + /// /// Instantiates a new and sets the default values. /// @@ -39,3 +43,4 @@ public RelationshipsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/NameValuePairs/NameValuePairsRequestBuilder.cs b/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/NameValuePairs/NameValuePairsRequestBuilder.cs index bda032bbe..8af74ad5c 100644 --- a/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/NameValuePairs/NameValuePairsRequestBuilder.cs +++ b/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/NameValuePairs/NameValuePairsRequestBuilder.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -30,6 +32,7 @@ public partial class NameValuePairsRequestBuilder : BaseRequestBuilder return new global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.NameValuePairs.Item.NameValuePairsItemRequestBuilder(urlTplParams, RequestAdapter); } } + /// /// Instantiates a new and sets the default values. /// @@ -38,6 +41,7 @@ public partial class NameValuePairsRequestBuilder : BaseRequestBuilder public NameValuePairsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/nameValuePairs{?query*}", pathParameters) { } + /// /// Instantiates a new and sets the default values. /// @@ -46,6 +50,7 @@ public NameValuePairsRequestBuilder(Dictionary pathParameters, I public NameValuePairsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/nameValuePairs{?query*}", rawUrl) { } + /// /// Retrieves a collection of nameValuePairs. /// @@ -53,15 +58,8 @@ public NameValuePairsRequestBuilder(string rawUrl, IRequestAdapter requestAdapte /// Cancellation token to use when cancelling requests /// Configuration for the request such as headers, query parameters, and middleware options. /// When receiving a 400 status code -#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> { @@ -69,23 +67,18 @@ public NameValuePairsRequestBuilder(string rawUrl, IRequestAdapter requestAdapte }; return await RequestAdapter.SendAsync(requestInfo, global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.NameValuePairCollectionResponseDocument.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// /// 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 HeadAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { -#nullable restore -#else - public async Task HeadAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) - { -#endif var requestInfo = ToHeadRequestInformation(requestConfiguration); await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); } + /// /// Creates a new nameValuePair. /// @@ -98,15 +91,8 @@ public async Task HeadAsync(ActionWhen receiving a 404 status code /// When receiving a 409 status code /// When receiving a 422 status code -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public async Task PostAsync(global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.CreateNameValuePairRequestDocument body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { -#nullable restore -#else - public async Task PostAsync(global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.CreateNameValuePairRequestDocument body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) - { -#endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> @@ -119,58 +105,40 @@ public async Task HeadAsync(Action(requestInfo, global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.NameValuePairPrimaryResponseDocument.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } + /// /// Retrieves a collection of nameValuePairs. /// /// A /// 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(Method.GET, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/vnd.api+json"); return requestInfo; } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// /// A /// 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 ToHeadRequestInformation(Action>? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToHeadRequestInformation(Action> requestConfiguration = default) - { -#endif var requestInfo = new RequestInformation(Method.HEAD, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); return requestInfo; } + /// /// Creates a new nameValuePair. /// /// A /// 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(global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.CreateNameValuePairRequestDocument body, Action>? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToPostRequestInformation(global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.CreateNameValuePairRequestDocument body, Action> requestConfiguration = default) - { -#endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); @@ -178,6 +146,7 @@ public RequestInformation ToPostRequestInformation(global::OpenApiKiotaEndToEndT requestInfo.SetContentFromParsable(RequestAdapter, "application/vnd.api+json", body); return requestInfo; } + /// /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. /// @@ -187,6 +156,7 @@ public RequestInformation ToPostRequestInformation(global::OpenApiKiotaEndToEndT { return new global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.NameValuePairs.NameValuePairsRequestBuilder(rawUrl, RequestAdapter); } + /// /// Retrieves a collection of nameValuePairs. /// @@ -194,16 +164,10 @@ public RequestInformation ToPostRequestInformation(global::OpenApiKiotaEndToEndT public partial class NameValuePairsRequestBuilderGetQueryParameters { /// For syntax, see the documentation for the [`include`](https://www.jsonapi.net/usage/reading/including-relationships.html)/[`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// @@ -211,16 +175,10 @@ public partial class NameValuePairsRequestBuilderGetQueryParameters public partial class NameValuePairsRequestBuilderHeadQueryParameters { /// For syntax, see the documentation for the [`include`](https://www.jsonapi.net/usage/reading/including-relationships.html)/[`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } + /// /// Creates a new nameValuePair. /// @@ -228,16 +186,10 @@ public partial class NameValuePairsRequestBuilderHeadQueryParameters public partial class NameValuePairsRequestBuilderPostQueryParameters { /// For syntax, see the documentation for the [`include`](https://www.jsonapi.net/usage/reading/including-relationships.html)/[`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Nodes/Item/Children/ChildrenRequestBuilder.cs b/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Nodes/Item/Children/ChildrenRequestBuilder.cs index 4e7a51d41..72f356c9c 100644 --- a/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Nodes/Item/Children/ChildrenRequestBuilder.cs +++ b/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Nodes/Item/Children/ChildrenRequestBuilder.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -25,6 +27,7 @@ public partial class ChildrenRequestBuilder : BaseRequestBuilder public ChildrenRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/nodes/{id}/children{?query*}", pathParameters) { } + /// /// Instantiates a new and sets the default values. /// @@ -33,6 +36,7 @@ public ChildrenRequestBuilder(Dictionary pathParameters, IReques public ChildrenRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/nodes/{id}/children{?query*}", rawUrl) { } + /// /// Retrieves the related nodes of an individual node's children relationship. /// @@ -41,15 +45,8 @@ public ChildrenRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b /// Configuration for the request such as headers, query parameters, and middleware options. /// When receiving a 400 status code /// When receiving a 404 status code -#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> { @@ -58,60 +55,43 @@ public ChildrenRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b }; return await RequestAdapter.SendAsync(requestInfo, global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.NodeCollectionResponseDocument.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// /// 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 HeadAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { -#nullable restore -#else - public async Task HeadAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) - { -#endif var requestInfo = ToHeadRequestInformation(requestConfiguration); await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); } + /// /// Retrieves the related nodes of an individual node's children relationship. /// /// A /// 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(Method.GET, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/vnd.api+json"); return requestInfo; } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// /// A /// 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 ToHeadRequestInformation(Action>? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToHeadRequestInformation(Action> requestConfiguration = default) - { -#endif var requestInfo = new RequestInformation(Method.HEAD, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); return requestInfo; } + /// /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. /// @@ -121,6 +101,7 @@ public RequestInformation ToHeadRequestInformation(Action /// Retrieves the related nodes of an individual node's children relationship. /// @@ -128,16 +109,10 @@ public RequestInformation ToHeadRequestInformation(ActionFor syntax, see the documentation for the [`include`](https://www.jsonapi.net/usage/reading/including-relationships.html)/[`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// @@ -145,16 +120,10 @@ public partial class ChildrenRequestBuilderGetQueryParameters public partial class ChildrenRequestBuilderHeadQueryParameters { /// For syntax, see the documentation for the [`include`](https://www.jsonapi.net/usage/reading/including-relationships.html)/[`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Nodes/Item/NodesItemRequestBuilder.cs b/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Nodes/Item/NodesItemRequestBuilder.cs index 79ad8ae84..c66dc1b71 100644 --- a/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Nodes/Item/NodesItemRequestBuilder.cs +++ b/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Nodes/Item/NodesItemRequestBuilder.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -26,21 +28,25 @@ public partial class NodesItemRequestBuilder : BaseRequestBuilder { get => new global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Nodes.Item.Children.ChildrenRequestBuilder(PathParameters, RequestAdapter); } + /// The parent property public global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Nodes.Item.Parent.ParentRequestBuilder Parent { get => new global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Nodes.Item.Parent.ParentRequestBuilder(PathParameters, RequestAdapter); } + /// The relationships property public global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Nodes.Item.Relationships.RelationshipsRequestBuilder Relationships { get => new global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Nodes.Item.Relationships.RelationshipsRequestBuilder(PathParameters, RequestAdapter); } + /// The values property public global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Nodes.Item.Values.ValuesRequestBuilder Values { get => new global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Nodes.Item.Values.ValuesRequestBuilder(PathParameters, RequestAdapter); } + /// /// Instantiates a new and sets the default values. /// @@ -49,6 +55,7 @@ public partial class NodesItemRequestBuilder : BaseRequestBuilder public NodesItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/nodes/{id}{?query*}", pathParameters) { } + /// /// Instantiates a new and sets the default values. /// @@ -57,21 +64,15 @@ public NodesItemRequestBuilder(Dictionary pathParameters, IReque public NodesItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/nodes/{id}{?query*}", rawUrl) { } + /// /// Deletes an existing node by its identifier. /// /// Cancellation token to use when cancelling requests /// Configuration for the request such as headers, query parameters, and middleware options. /// When receiving a 404 status code -#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> { @@ -79,6 +80,7 @@ public async Task DeleteAsync(Action /// Retrieves an individual node by its identifier. /// @@ -87,15 +89,8 @@ public async Task DeleteAsync(ActionConfiguration for the request such as headers, query parameters, and middleware options. /// When receiving a 400 status code /// When receiving a 404 status code -#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> { @@ -104,23 +99,18 @@ public async Task DeleteAsync(Action(requestInfo, global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.NodePrimaryResponseDocument.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// /// 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 HeadAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { -#nullable restore -#else - public async Task HeadAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) - { -#endif var requestInfo = ToHeadRequestInformation(requestConfiguration); await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); } + /// /// Updates an existing node. /// @@ -132,15 +122,8 @@ public async Task HeadAsync(ActionWhen receiving a 404 status code /// When receiving a 409 status code /// When receiving a 422 status code -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public async Task PatchAsync(global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.UpdateNodeRequestDocument body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { -#nullable restore -#else - public async Task PatchAsync(global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.UpdateNodeRequestDocument body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) - { -#endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> @@ -152,77 +135,53 @@ public async Task HeadAsync(Action(requestInfo, global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.NodePrimaryResponseDocument.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } + /// /// Deletes an existing node by its identifier. /// /// A /// 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(Method.DELETE, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/vnd.api+json"); return requestInfo; } + /// /// Retrieves an individual node by its identifier. /// /// A /// 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(Method.GET, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/vnd.api+json"); return requestInfo; } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// /// A /// 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 ToHeadRequestInformation(Action>? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToHeadRequestInformation(Action> requestConfiguration = default) - { -#endif var requestInfo = new RequestInformation(Method.HEAD, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); return requestInfo; } + /// /// Updates an existing node. /// /// A /// 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(global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.UpdateNodeRequestDocument body, Action>? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToPatchRequestInformation(global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.UpdateNodeRequestDocument body, Action> requestConfiguration = default) - { -#endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); @@ -230,6 +189,7 @@ public RequestInformation ToPatchRequestInformation(global::OpenApiKiotaEndToEnd requestInfo.SetContentFromParsable(RequestAdapter, "application/vnd.api+json", body); return requestInfo; } + /// /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. /// @@ -239,6 +199,7 @@ public RequestInformation ToPatchRequestInformation(global::OpenApiKiotaEndToEnd { return new global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Nodes.Item.NodesItemRequestBuilder(rawUrl, RequestAdapter); } + /// /// Retrieves an individual node by its identifier. /// @@ -246,16 +207,10 @@ public RequestInformation ToPatchRequestInformation(global::OpenApiKiotaEndToEnd public partial class NodesItemRequestBuilderGetQueryParameters { /// For syntax, see the documentation for the [`include`](https://www.jsonapi.net/usage/reading/including-relationships.html)/[`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// @@ -263,16 +218,10 @@ public partial class NodesItemRequestBuilderGetQueryParameters public partial class NodesItemRequestBuilderHeadQueryParameters { /// For syntax, see the documentation for the [`include`](https://www.jsonapi.net/usage/reading/including-relationships.html)/[`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } + /// /// Updates an existing node. /// @@ -280,16 +229,10 @@ public partial class NodesItemRequestBuilderHeadQueryParameters public partial class NodesItemRequestBuilderPatchQueryParameters { /// For syntax, see the documentation for the [`include`](https://www.jsonapi.net/usage/reading/including-relationships.html)/[`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Nodes/Item/Parent/ParentRequestBuilder.cs b/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Nodes/Item/Parent/ParentRequestBuilder.cs index 2faac330a..476f5110a 100644 --- a/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Nodes/Item/Parent/ParentRequestBuilder.cs +++ b/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Nodes/Item/Parent/ParentRequestBuilder.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -25,6 +27,7 @@ public partial class ParentRequestBuilder : BaseRequestBuilder public ParentRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/nodes/{id}/parent{?query*}", pathParameters) { } + /// /// Instantiates a new and sets the default values. /// @@ -33,6 +36,7 @@ public ParentRequestBuilder(Dictionary pathParameters, IRequestA public ParentRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/nodes/{id}/parent{?query*}", rawUrl) { } + /// /// Retrieves the related node of an individual node's parent relationship. /// @@ -41,15 +45,8 @@ public ParentRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas /// Configuration for the request such as headers, query parameters, and middleware options. /// When receiving a 400 status code /// When receiving a 404 status code -#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> { @@ -58,60 +55,43 @@ public ParentRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas }; return await RequestAdapter.SendAsync(requestInfo, global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.NullableNodeSecondaryResponseDocument.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// /// 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 HeadAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { -#nullable restore -#else - public async Task HeadAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) - { -#endif var requestInfo = ToHeadRequestInformation(requestConfiguration); await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); } + /// /// Retrieves the related node of an individual node's parent relationship. /// /// A /// 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(Method.GET, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/vnd.api+json"); return requestInfo; } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// /// A /// 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 ToHeadRequestInformation(Action>? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToHeadRequestInformation(Action> requestConfiguration = default) - { -#endif var requestInfo = new RequestInformation(Method.HEAD, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); return requestInfo; } + /// /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. /// @@ -121,6 +101,7 @@ public RequestInformation ToHeadRequestInformation(Action /// Retrieves the related node of an individual node's parent relationship. /// @@ -128,16 +109,10 @@ public RequestInformation ToHeadRequestInformation(ActionFor syntax, see the documentation for the [`include`](https://www.jsonapi.net/usage/reading/including-relationships.html)/[`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// @@ -145,16 +120,10 @@ public partial class ParentRequestBuilderGetQueryParameters public partial class ParentRequestBuilderHeadQueryParameters { /// For syntax, see the documentation for the [`include`](https://www.jsonapi.net/usage/reading/including-relationships.html)/[`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Nodes/Item/Relationships/Children/ChildrenRequestBuilder.cs b/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Nodes/Item/Relationships/Children/ChildrenRequestBuilder.cs index 3d8267534..14fccf5f9 100644 --- a/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Nodes/Item/Relationships/Children/ChildrenRequestBuilder.cs +++ b/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Nodes/Item/Relationships/Children/ChildrenRequestBuilder.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -25,6 +27,7 @@ public partial class ChildrenRequestBuilder : BaseRequestBuilder public ChildrenRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/nodes/{id}/relationships/children{?query*}", pathParameters) { } + /// /// Instantiates a new and sets the default values. /// @@ -33,6 +36,7 @@ public ChildrenRequestBuilder(Dictionary pathParameters, IReques public ChildrenRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/nodes/{id}/relationships/children{?query*}", rawUrl) { } + /// /// Removes existing nodes from the children relationship of an individual node. /// @@ -42,15 +46,8 @@ public ChildrenRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : b /// When receiving a 400 status code /// When receiving a 404 status code /// When receiving a 409 status code -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public async Task DeleteAsync(global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.ToManyNodeInRequest body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { -#nullable restore -#else - public async Task DeleteAsync(global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.ToManyNodeInRequest body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) - { -#endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = ToDeleteRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> @@ -61,6 +58,7 @@ public async Task DeleteAsync(global::OpenApiKiotaEndToEndTests.QueryStrings.Gen }; await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); } + /// /// Retrieves the related node identities of an individual node's children relationship. /// @@ -69,15 +67,8 @@ public async Task DeleteAsync(global::OpenApiKiotaEndToEndTests.QueryStrings.Gen /// Configuration for the request such as headers, query parameters, and middleware options. /// When receiving a 400 status code /// When receiving a 404 status code -#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> { @@ -86,23 +77,18 @@ public async Task DeleteAsync(global::OpenApiKiotaEndToEndTests.QueryStrings.Gen }; return await RequestAdapter.SendAsync(requestInfo, global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.NodeIdentifierCollectionResponseDocument.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// /// 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 HeadAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { -#nullable restore -#else - public async Task HeadAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) - { -#endif var requestInfo = ToHeadRequestInformation(requestConfiguration); await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); } + /// /// Assigns existing nodes to the children relationship of an individual node. /// @@ -112,15 +98,8 @@ public async Task HeadAsync(ActionWhen receiving a 400 status code /// When receiving a 404 status code /// When receiving a 409 status code -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public async Task PatchAsync(global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.ToManyNodeInRequest body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { -#nullable restore -#else - public async Task PatchAsync(global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.ToManyNodeInRequest body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) - { -#endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> @@ -131,6 +110,7 @@ public async Task PatchAsync(global::OpenApiKiotaEndToEndTests.QueryStrings.Gene }; await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); } + /// /// Adds existing nodes to the children relationship of an individual node. /// @@ -140,15 +120,8 @@ public async Task PatchAsync(global::OpenApiKiotaEndToEndTests.QueryStrings.Gene /// When receiving a 400 status code /// When receiving a 404 status code /// When receiving a 409 status code -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public async Task PostAsync(global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.ToManyNodeInRequest body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { -#nullable restore -#else - public async Task PostAsync(global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.ToManyNodeInRequest body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) - { -#endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> @@ -159,21 +132,15 @@ public async Task PostAsync(global::OpenApiKiotaEndToEndTests.QueryStrings.Gener }; await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); } + /// /// Removes existing nodes from the children relationship of an individual node. /// /// A /// 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 ToDeleteRequestInformation(global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.ToManyNodeInRequest body, Action>? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToDeleteRequestInformation(global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.ToManyNodeInRequest body, Action> requestConfiguration = default) - { -#endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); @@ -181,58 +148,40 @@ public RequestInformation ToDeleteRequestInformation(global::OpenApiKiotaEndToEn requestInfo.SetContentFromParsable(RequestAdapter, "application/vnd.api+json", body); return requestInfo; } + /// /// Retrieves the related node identities of an individual node's children relationship. /// /// A /// 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(Method.GET, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/vnd.api+json"); return requestInfo; } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// /// A /// 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 ToHeadRequestInformation(Action>? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToHeadRequestInformation(Action> requestConfiguration = default) - { -#endif var requestInfo = new RequestInformation(Method.HEAD, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); return requestInfo; } + /// /// Assigns existing nodes to the children relationship of an individual node. /// /// A /// 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(global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.ToManyNodeInRequest body, Action>? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToPatchRequestInformation(global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.ToManyNodeInRequest body, Action> requestConfiguration = default) - { -#endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); @@ -240,21 +189,15 @@ public RequestInformation ToPatchRequestInformation(global::OpenApiKiotaEndToEnd requestInfo.SetContentFromParsable(RequestAdapter, "application/vnd.api+json", body); return requestInfo; } + /// /// Adds existing nodes to the children relationship of an individual node. /// /// A /// 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(global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.ToManyNodeInRequest body, Action>? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToPostRequestInformation(global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.ToManyNodeInRequest body, Action> requestConfiguration = default) - { -#endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); @@ -262,6 +205,7 @@ public RequestInformation ToPostRequestInformation(global::OpenApiKiotaEndToEndT requestInfo.SetContentFromParsable(RequestAdapter, "application/vnd.api+json", body); return requestInfo; } + /// /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. /// @@ -271,6 +215,7 @@ public RequestInformation ToPostRequestInformation(global::OpenApiKiotaEndToEndT { return new global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Nodes.Item.Relationships.Children.ChildrenRequestBuilder(rawUrl, RequestAdapter); } + /// /// Retrieves the related node identities of an individual node's children relationship. /// @@ -278,16 +223,10 @@ public RequestInformation ToPostRequestInformation(global::OpenApiKiotaEndToEndT public partial class ChildrenRequestBuilderGetQueryParameters { /// For syntax, see the documentation for the [`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// @@ -295,16 +234,10 @@ public partial class ChildrenRequestBuilderGetQueryParameters public partial class ChildrenRequestBuilderHeadQueryParameters { /// For syntax, see the documentation for the [`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Nodes/Item/Relationships/Parent/ParentRequestBuilder.cs b/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Nodes/Item/Relationships/Parent/ParentRequestBuilder.cs index 0226fee00..96431b6c5 100644 --- a/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Nodes/Item/Relationships/Parent/ParentRequestBuilder.cs +++ b/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Nodes/Item/Relationships/Parent/ParentRequestBuilder.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -25,6 +27,7 @@ public partial class ParentRequestBuilder : BaseRequestBuilder public ParentRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/nodes/{id}/relationships/parent{?query*}", pathParameters) { } + /// /// Instantiates a new and sets the default values. /// @@ -33,6 +36,7 @@ public ParentRequestBuilder(Dictionary pathParameters, IRequestA public ParentRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/nodes/{id}/relationships/parent{?query*}", rawUrl) { } + /// /// Retrieves the related node identity of an individual node's parent relationship. /// @@ -41,15 +45,8 @@ public ParentRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas /// Configuration for the request such as headers, query parameters, and middleware options. /// When receiving a 400 status code /// When receiving a 404 status code -#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> { @@ -58,23 +55,18 @@ public ParentRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas }; return await RequestAdapter.SendAsync(requestInfo, global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.NullableNodeIdentifierResponseDocument.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// /// 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 HeadAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { -#nullable restore -#else - public async Task HeadAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) - { -#endif var requestInfo = ToHeadRequestInformation(requestConfiguration); await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); } + /// /// Clears or assigns an existing node to the parent relationship of an individual node. /// @@ -84,15 +76,8 @@ public async Task HeadAsync(ActionWhen receiving a 400 status code /// When receiving a 404 status code /// When receiving a 409 status code -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public async Task PatchAsync(global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.NullableToOneNodeInRequest body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { -#nullable restore -#else - public async Task PatchAsync(global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.NullableToOneNodeInRequest body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) - { -#endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> @@ -103,58 +88,40 @@ public async Task PatchAsync(global::OpenApiKiotaEndToEndTests.QueryStrings.Gene }; await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); } + /// /// Retrieves the related node identity of an individual node's parent relationship. /// /// A /// 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(Method.GET, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/vnd.api+json"); return requestInfo; } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// /// A /// 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 ToHeadRequestInformation(Action>? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToHeadRequestInformation(Action> requestConfiguration = default) - { -#endif var requestInfo = new RequestInformation(Method.HEAD, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); return requestInfo; } + /// /// Clears or assigns an existing node to the parent relationship of an individual node. /// /// A /// 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(global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.NullableToOneNodeInRequest body, Action>? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToPatchRequestInformation(global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.NullableToOneNodeInRequest body, Action> requestConfiguration = default) - { -#endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); @@ -162,6 +129,7 @@ public RequestInformation ToPatchRequestInformation(global::OpenApiKiotaEndToEnd requestInfo.SetContentFromParsable(RequestAdapter, "application/vnd.api+json", body); return requestInfo; } + /// /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. /// @@ -171,6 +139,7 @@ public RequestInformation ToPatchRequestInformation(global::OpenApiKiotaEndToEnd { return new global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Nodes.Item.Relationships.Parent.ParentRequestBuilder(rawUrl, RequestAdapter); } + /// /// Retrieves the related node identity of an individual node's parent relationship. /// @@ -178,16 +147,10 @@ public RequestInformation ToPatchRequestInformation(global::OpenApiKiotaEndToEnd public partial class ParentRequestBuilderGetQueryParameters { /// For syntax, see the documentation for the [`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// @@ -195,16 +158,10 @@ public partial class ParentRequestBuilderGetQueryParameters public partial class ParentRequestBuilderHeadQueryParameters { /// For syntax, see the documentation for the [`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Nodes/Item/Relationships/RelationshipsRequestBuilder.cs b/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Nodes/Item/Relationships/RelationshipsRequestBuilder.cs index f0936f5c8..e6b75efa9 100644 --- a/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Nodes/Item/Relationships/RelationshipsRequestBuilder.cs +++ b/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Nodes/Item/Relationships/RelationshipsRequestBuilder.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions; @@ -22,16 +24,19 @@ public partial class RelationshipsRequestBuilder : BaseRequestBuilder { get => new global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Nodes.Item.Relationships.Children.ChildrenRequestBuilder(PathParameters, RequestAdapter); } + /// The parent property public global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Nodes.Item.Relationships.Parent.ParentRequestBuilder Parent { get => new global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Nodes.Item.Relationships.Parent.ParentRequestBuilder(PathParameters, RequestAdapter); } + /// The values property public global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Nodes.Item.Relationships.Values.ValuesRequestBuilder Values { get => new global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Nodes.Item.Relationships.Values.ValuesRequestBuilder(PathParameters, RequestAdapter); } + /// /// Instantiates a new and sets the default values. /// @@ -40,6 +45,7 @@ public partial class RelationshipsRequestBuilder : BaseRequestBuilder public RelationshipsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/nodes/{id}/relationships", pathParameters) { } + /// /// Instantiates a new and sets the default values. /// @@ -51,3 +57,4 @@ public RelationshipsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Nodes/Item/Relationships/Values/ValuesRequestBuilder.cs b/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Nodes/Item/Relationships/Values/ValuesRequestBuilder.cs index 8f31e045c..b23a16e7c 100644 --- a/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Nodes/Item/Relationships/Values/ValuesRequestBuilder.cs +++ b/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Nodes/Item/Relationships/Values/ValuesRequestBuilder.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -25,6 +27,7 @@ public partial class ValuesRequestBuilder : BaseRequestBuilder public ValuesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/nodes/{id}/relationships/values{?query*}", pathParameters) { } + /// /// Instantiates a new and sets the default values. /// @@ -33,6 +36,7 @@ public ValuesRequestBuilder(Dictionary pathParameters, IRequestA public ValuesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/nodes/{id}/relationships/values{?query*}", rawUrl) { } + /// /// Removes existing nameValuePairs from the values relationship of an individual node. /// @@ -42,15 +46,8 @@ public ValuesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas /// When receiving a 400 status code /// When receiving a 404 status code /// When receiving a 409 status code -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public async Task DeleteAsync(global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.ToManyNameValuePairInRequest body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { -#nullable restore -#else - public async Task DeleteAsync(global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.ToManyNameValuePairInRequest body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) - { -#endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = ToDeleteRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> @@ -61,6 +58,7 @@ public async Task DeleteAsync(global::OpenApiKiotaEndToEndTests.QueryStrings.Gen }; await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); } + /// /// Retrieves the related nameValuePair identities of an individual node's values relationship. /// @@ -69,15 +67,8 @@ public async Task DeleteAsync(global::OpenApiKiotaEndToEndTests.QueryStrings.Gen /// Configuration for the request such as headers, query parameters, and middleware options. /// When receiving a 400 status code /// When receiving a 404 status code -#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> { @@ -86,23 +77,18 @@ public async Task DeleteAsync(global::OpenApiKiotaEndToEndTests.QueryStrings.Gen }; return await RequestAdapter.SendAsync(requestInfo, global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.NameValuePairIdentifierCollectionResponseDocument.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// /// 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 HeadAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { -#nullable restore -#else - public async Task HeadAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) - { -#endif var requestInfo = ToHeadRequestInformation(requestConfiguration); await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); } + /// /// Assigns existing nameValuePairs to the values relationship of an individual node. /// @@ -112,15 +98,8 @@ public async Task HeadAsync(ActionWhen receiving a 400 status code /// When receiving a 404 status code /// When receiving a 409 status code -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public async Task PatchAsync(global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.ToManyNameValuePairInRequest body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { -#nullable restore -#else - public async Task PatchAsync(global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.ToManyNameValuePairInRequest body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) - { -#endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> @@ -131,6 +110,7 @@ public async Task PatchAsync(global::OpenApiKiotaEndToEndTests.QueryStrings.Gene }; await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); } + /// /// Adds existing nameValuePairs to the values relationship of an individual node. /// @@ -140,15 +120,8 @@ public async Task PatchAsync(global::OpenApiKiotaEndToEndTests.QueryStrings.Gene /// When receiving a 400 status code /// When receiving a 404 status code /// When receiving a 409 status code -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public async Task PostAsync(global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.ToManyNameValuePairInRequest body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { -#nullable restore -#else - public async Task PostAsync(global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.ToManyNameValuePairInRequest body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) - { -#endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> @@ -159,21 +132,15 @@ public async Task PostAsync(global::OpenApiKiotaEndToEndTests.QueryStrings.Gener }; await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); } + /// /// Removes existing nameValuePairs from the values relationship of an individual node. /// /// A /// 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 ToDeleteRequestInformation(global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.ToManyNameValuePairInRequest body, Action>? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToDeleteRequestInformation(global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.ToManyNameValuePairInRequest body, Action> requestConfiguration = default) - { -#endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); @@ -181,58 +148,40 @@ public RequestInformation ToDeleteRequestInformation(global::OpenApiKiotaEndToEn requestInfo.SetContentFromParsable(RequestAdapter, "application/vnd.api+json", body); return requestInfo; } + /// /// Retrieves the related nameValuePair identities of an individual node's values relationship. /// /// A /// 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(Method.GET, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/vnd.api+json"); return requestInfo; } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// /// A /// 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 ToHeadRequestInformation(Action>? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToHeadRequestInformation(Action> requestConfiguration = default) - { -#endif var requestInfo = new RequestInformation(Method.HEAD, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); return requestInfo; } + /// /// Assigns existing nameValuePairs to the values relationship of an individual node. /// /// A /// 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(global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.ToManyNameValuePairInRequest body, Action>? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToPatchRequestInformation(global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.ToManyNameValuePairInRequest body, Action> requestConfiguration = default) - { -#endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); @@ -240,21 +189,15 @@ public RequestInformation ToPatchRequestInformation(global::OpenApiKiotaEndToEnd requestInfo.SetContentFromParsable(RequestAdapter, "application/vnd.api+json", body); return requestInfo; } + /// /// Adds existing nameValuePairs to the values relationship of an individual node. /// /// A /// 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(global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.ToManyNameValuePairInRequest body, Action>? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToPostRequestInformation(global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.ToManyNameValuePairInRequest body, Action> requestConfiguration = default) - { -#endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); @@ -262,6 +205,7 @@ public RequestInformation ToPostRequestInformation(global::OpenApiKiotaEndToEndT requestInfo.SetContentFromParsable(RequestAdapter, "application/vnd.api+json", body); return requestInfo; } + /// /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. /// @@ -271,6 +215,7 @@ public RequestInformation ToPostRequestInformation(global::OpenApiKiotaEndToEndT { return new global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Nodes.Item.Relationships.Values.ValuesRequestBuilder(rawUrl, RequestAdapter); } + /// /// Retrieves the related nameValuePair identities of an individual node's values relationship. /// @@ -278,16 +223,10 @@ public RequestInformation ToPostRequestInformation(global::OpenApiKiotaEndToEndT public partial class ValuesRequestBuilderGetQueryParameters { /// For syntax, see the documentation for the [`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// @@ -295,16 +234,10 @@ public partial class ValuesRequestBuilderGetQueryParameters public partial class ValuesRequestBuilderHeadQueryParameters { /// For syntax, see the documentation for the [`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Nodes/Item/Values/ValuesRequestBuilder.cs b/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Nodes/Item/Values/ValuesRequestBuilder.cs index 6a3aa4b84..dc4a500b3 100644 --- a/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Nodes/Item/Values/ValuesRequestBuilder.cs +++ b/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Nodes/Item/Values/ValuesRequestBuilder.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -25,6 +27,7 @@ public partial class ValuesRequestBuilder : BaseRequestBuilder public ValuesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/nodes/{id}/values{?query*}", pathParameters) { } + /// /// Instantiates a new and sets the default values. /// @@ -33,6 +36,7 @@ public ValuesRequestBuilder(Dictionary pathParameters, IRequestA public ValuesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/nodes/{id}/values{?query*}", rawUrl) { } + /// /// Retrieves the related nameValuePairs of an individual node's values relationship. /// @@ -41,15 +45,8 @@ public ValuesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas /// Configuration for the request such as headers, query parameters, and middleware options. /// When receiving a 400 status code /// When receiving a 404 status code -#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> { @@ -58,60 +55,43 @@ public ValuesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas }; return await RequestAdapter.SendAsync(requestInfo, global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.NameValuePairCollectionResponseDocument.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// /// 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 HeadAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { -#nullable restore -#else - public async Task HeadAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) - { -#endif var requestInfo = ToHeadRequestInformation(requestConfiguration); await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); } + /// /// Retrieves the related nameValuePairs of an individual node's values relationship. /// /// A /// 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(Method.GET, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/vnd.api+json"); return requestInfo; } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// /// A /// 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 ToHeadRequestInformation(Action>? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToHeadRequestInformation(Action> requestConfiguration = default) - { -#endif var requestInfo = new RequestInformation(Method.HEAD, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); return requestInfo; } + /// /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. /// @@ -121,6 +101,7 @@ public RequestInformation ToHeadRequestInformation(Action /// Retrieves the related nameValuePairs of an individual node's values relationship. /// @@ -128,16 +109,10 @@ public RequestInformation ToHeadRequestInformation(ActionFor syntax, see the documentation for the [`include`](https://www.jsonapi.net/usage/reading/including-relationships.html)/[`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// @@ -145,16 +120,10 @@ public partial class ValuesRequestBuilderGetQueryParameters public partial class ValuesRequestBuilderHeadQueryParameters { /// For syntax, see the documentation for the [`include`](https://www.jsonapi.net/usage/reading/including-relationships.html)/[`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Nodes/NodesRequestBuilder.cs b/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Nodes/NodesRequestBuilder.cs index f42070112..d28e0c0d9 100644 --- a/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Nodes/NodesRequestBuilder.cs +++ b/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/Nodes/NodesRequestBuilder.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -30,6 +32,7 @@ public partial class NodesRequestBuilder : BaseRequestBuilder return new global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Nodes.Item.NodesItemRequestBuilder(urlTplParams, RequestAdapter); } } + /// /// Instantiates a new and sets the default values. /// @@ -38,6 +41,7 @@ public partial class NodesRequestBuilder : BaseRequestBuilder public NodesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/nodes{?query*}", pathParameters) { } + /// /// Instantiates a new and sets the default values. /// @@ -46,6 +50,7 @@ public NodesRequestBuilder(Dictionary pathParameters, IRequestAd public NodesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/nodes{?query*}", rawUrl) { } + /// /// Retrieves a collection of nodes. /// @@ -53,15 +58,8 @@ public NodesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base /// Cancellation token to use when cancelling requests /// Configuration for the request such as headers, query parameters, and middleware options. /// When receiving a 400 status code -#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> { @@ -69,23 +67,18 @@ public NodesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base }; return await RequestAdapter.SendAsync(requestInfo, global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.NodeCollectionResponseDocument.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// /// 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 HeadAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { -#nullable restore -#else - public async Task HeadAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) - { -#endif var requestInfo = ToHeadRequestInformation(requestConfiguration); await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); } + /// /// Creates a new node. /// @@ -98,15 +91,8 @@ public async Task HeadAsync(ActionWhen receiving a 404 status code /// When receiving a 409 status code /// When receiving a 422 status code -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public async Task PostAsync(global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.CreateNodeRequestDocument body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { -#nullable restore -#else - public async Task PostAsync(global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.CreateNodeRequestDocument body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) - { -#endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> @@ -119,58 +105,40 @@ public async Task HeadAsync(Action(requestInfo, global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.NodePrimaryResponseDocument.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } + /// /// Retrieves a collection of nodes. /// /// A /// 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(Method.GET, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/vnd.api+json"); return requestInfo; } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// /// A /// 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 ToHeadRequestInformation(Action>? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToHeadRequestInformation(Action> requestConfiguration = default) - { -#endif var requestInfo = new RequestInformation(Method.HEAD, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); return requestInfo; } + /// /// Creates a new node. /// /// A /// 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(global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.CreateNodeRequestDocument body, Action>? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToPostRequestInformation(global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Models.CreateNodeRequestDocument body, Action> requestConfiguration = default) - { -#endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); @@ -178,6 +146,7 @@ public RequestInformation ToPostRequestInformation(global::OpenApiKiotaEndToEndT requestInfo.SetContentFromParsable(RequestAdapter, "application/vnd.api+json", body); return requestInfo; } + /// /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. /// @@ -187,6 +156,7 @@ public RequestInformation ToPostRequestInformation(global::OpenApiKiotaEndToEndT { return new global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Nodes.NodesRequestBuilder(rawUrl, RequestAdapter); } + /// /// Retrieves a collection of nodes. /// @@ -194,16 +164,10 @@ public RequestInformation ToPostRequestInformation(global::OpenApiKiotaEndToEndT public partial class NodesRequestBuilderGetQueryParameters { /// For syntax, see the documentation for the [`include`](https://www.jsonapi.net/usage/reading/including-relationships.html)/[`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// @@ -211,16 +175,10 @@ public partial class NodesRequestBuilderGetQueryParameters public partial class NodesRequestBuilderHeadQueryParameters { /// For syntax, see the documentation for the [`include`](https://www.jsonapi.net/usage/reading/including-relationships.html)/[`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } + /// /// Creates a new node. /// @@ -228,16 +186,10 @@ public partial class NodesRequestBuilderHeadQueryParameters public partial class NodesRequestBuilderPostQueryParameters { /// For syntax, see the documentation for the [`include`](https://www.jsonapi.net/usage/reading/including-relationships.html)/[`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/QueryStringsClient.cs b/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/QueryStringsClient.cs index 254003811..c7c524167 100644 --- a/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/QueryStringsClient.cs +++ b/test/OpenApiKiotaEndToEndTests/QueryStrings/GeneratedCode/QueryStringsClient.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Store; @@ -26,11 +28,13 @@ public partial class QueryStringsClient : BaseRequestBuilder { get => new global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.NameValuePairs.NameValuePairsRequestBuilder(PathParameters, RequestAdapter); } + /// The nodes property public global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Nodes.NodesRequestBuilder Nodes { get => new global::OpenApiKiotaEndToEndTests.QueryStrings.GeneratedCode.Nodes.NodesRequestBuilder(PathParameters, RequestAdapter); } + /// /// Instantiates a new and sets the default values. /// @@ -55,3 +59,4 @@ public partial class QueryStringsClient : BaseRequestBuilder } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/QueryStrings/IncludeTests.cs b/test/OpenApiKiotaEndToEndTests/QueryStrings/IncludeTests.cs index 99880c594..d55cf9545 100644 --- a/test/OpenApiKiotaEndToEndTests/QueryStrings/IncludeTests.cs +++ b/test/OpenApiKiotaEndToEndTests/QueryStrings/IncludeTests.cs @@ -89,7 +89,7 @@ await _testContext.RunOnDatabaseAsync(async dbContext => using (_requestAdapterFactory.WithQueryString(queryString)) { // Act - NodePrimaryResponseDocument? response = await apiClient.Nodes[node.StringId].GetAsync(); + NodePrimaryResponseDocument? response = await apiClient.Nodes[node.StringId!].GetAsync(); // Assert response.ShouldNotBeNull(); @@ -129,7 +129,7 @@ await _testContext.RunOnDatabaseAsync(async dbContext => using (_requestAdapterFactory.WithQueryString(queryString)) { // Act - NameValuePairCollectionResponseDocument? response = await apiClient.Nodes[node.StringId].Values.GetAsync(); + NameValuePairCollectionResponseDocument? response = await apiClient.Nodes[node.StringId!].Values.GetAsync(); // Assert response.ShouldNotBeNull(); @@ -167,7 +167,7 @@ await _testContext.RunOnDatabaseAsync(async dbContext => using (_requestAdapterFactory.WithQueryString(queryString)) { // Act - NullableNodeSecondaryResponseDocument? response = await apiClient.Nodes[node.StringId].Parent.GetAsync(); + NullableNodeSecondaryResponseDocument? response = await apiClient.Nodes[node.StringId!].Parent.GetAsync(); // Assert response.ShouldNotBeNull(); @@ -208,7 +208,7 @@ await _testContext.RunOnDatabaseAsync(async dbContext => using (_requestAdapterFactory.WithQueryString(queryString)) { // Act - NodePrimaryResponseDocument? response = await apiClient.Nodes[node.StringId].GetAsync(); + NodePrimaryResponseDocument? response = await apiClient.Nodes[node.StringId!].GetAsync(); // Assert response.ShouldNotBeNull(); diff --git a/test/OpenApiKiotaEndToEndTests/QueryStrings/PaginationTests.cs b/test/OpenApiKiotaEndToEndTests/QueryStrings/PaginationTests.cs index 8d15fffc6..ce1f7ff1f 100644 --- a/test/OpenApiKiotaEndToEndTests/QueryStrings/PaginationTests.cs +++ b/test/OpenApiKiotaEndToEndTests/QueryStrings/PaginationTests.cs @@ -87,7 +87,7 @@ await _testContext.RunOnDatabaseAsync(async dbContext => using (_requestAdapterFactory.WithQueryString(queryString)) { // Act - NodeCollectionResponseDocument? response = await apiClient.Nodes[node.StringId].Children.GetAsync(); + NodeCollectionResponseDocument? response = await apiClient.Nodes[node.StringId!].Children.GetAsync(); // Assert response.ShouldNotBeNull(); @@ -125,7 +125,7 @@ await _testContext.RunOnDatabaseAsync(async dbContext => using (_requestAdapterFactory.WithQueryString(queryString)) { // Act - NodeIdentifierCollectionResponseDocument? response = await apiClient.Nodes[node.StringId].Relationships.Children.GetAsync(); + NodeIdentifierCollectionResponseDocument? response = await apiClient.Nodes[node.StringId!].Relationships.Children.GetAsync(); // Assert response.ShouldNotBeNull(); diff --git a/test/OpenApiKiotaEndToEndTests/QueryStrings/SortTests.cs b/test/OpenApiKiotaEndToEndTests/QueryStrings/SortTests.cs index 8944c8755..3cc562a66 100644 --- a/test/OpenApiKiotaEndToEndTests/QueryStrings/SortTests.cs +++ b/test/OpenApiKiotaEndToEndTests/QueryStrings/SortTests.cs @@ -88,7 +88,7 @@ await _testContext.RunOnDatabaseAsync(async dbContext => using (_requestAdapterFactory.WithQueryString(queryString)) { // Act - NodeCollectionResponseDocument? response = await apiClient.Nodes[node.StringId].Children.GetAsync(); + NodeCollectionResponseDocument? response = await apiClient.Nodes[node.StringId!].Children.GetAsync(); // Assert response.ShouldNotBeNull(); @@ -125,7 +125,7 @@ await _testContext.RunOnDatabaseAsync(async dbContext => using (_requestAdapterFactory.WithQueryString(queryString)) { // Act - NodeIdentifierCollectionResponseDocument? response = await apiClient.Nodes[node.StringId].Relationships.Children.GetAsync(); + NodeIdentifierCollectionResponseDocument? response = await apiClient.Nodes[node.StringId!].Relationships.Children.GetAsync(); // Assert response.ShouldNotBeNull(); diff --git a/test/OpenApiKiotaEndToEndTests/QueryStrings/SparseFieldSetTests.cs b/test/OpenApiKiotaEndToEndTests/QueryStrings/SparseFieldSetTests.cs index f67d9c6d3..83229492b 100644 --- a/test/OpenApiKiotaEndToEndTests/QueryStrings/SparseFieldSetTests.cs +++ b/test/OpenApiKiotaEndToEndTests/QueryStrings/SparseFieldSetTests.cs @@ -89,7 +89,7 @@ await _testContext.RunOnDatabaseAsync(async dbContext => using (_requestAdapterFactory.WithQueryString(queryString)) { // Act - NodePrimaryResponseDocument? response = await apiClient.Nodes[node.StringId].GetAsync(); + NodePrimaryResponseDocument? response = await apiClient.Nodes[node.StringId!].GetAsync(); // Assert response.ShouldNotBeNull(); @@ -129,7 +129,7 @@ await _testContext.RunOnDatabaseAsync(async dbContext => using (_requestAdapterFactory.WithQueryString(queryString)) { // Act - NodeCollectionResponseDocument? response = await apiClient.Nodes[node.StringId].Children.GetAsync(); + NodeCollectionResponseDocument? response = await apiClient.Nodes[node.StringId!].Children.GetAsync(); // Assert response.ShouldNotBeNull(); @@ -174,7 +174,7 @@ await _testContext.RunOnDatabaseAsync(async dbContext => using (_requestAdapterFactory.WithQueryString(queryString)) { // Act - NullableNodeSecondaryResponseDocument? response = await apiClient.Nodes[node.StringId].Parent.GetAsync(); + NullableNodeSecondaryResponseDocument? response = await apiClient.Nodes[node.StringId!].Parent.GetAsync(); // Assert response.ShouldNotBeNull(); @@ -212,7 +212,7 @@ await _testContext.RunOnDatabaseAsync(async dbContext => using (_requestAdapterFactory.WithQueryString(queryString)) { // Act - NodePrimaryResponseDocument? response = await apiClient.Nodes[node.StringId].GetAsync(); + NodePrimaryResponseDocument? response = await apiClient.Nodes[node.StringId!].GetAsync(); // Assert response.ShouldNotBeNull(); diff --git a/test/OpenApiKiotaEndToEndTests/RestrictedControllers/DeleteResourceTests.cs b/test/OpenApiKiotaEndToEndTests/RestrictedControllers/DeleteResourceTests.cs index cc3b8f7ad..6c2f00ef0 100644 --- a/test/OpenApiKiotaEndToEndTests/RestrictedControllers/DeleteResourceTests.cs +++ b/test/OpenApiKiotaEndToEndTests/RestrictedControllers/DeleteResourceTests.cs @@ -43,7 +43,7 @@ await _testContext.RunOnDatabaseAsync(async dbContext => var apiClient = new RestrictedControllersClient(requestAdapter); // Act - await apiClient.WriteOnlyChannels[existingChannel.StringId].DeleteAsync(); + await apiClient.WriteOnlyChannels[existingChannel.StringId!].DeleteAsync(); // Assert await _testContext.RunOnDatabaseAsync(async dbContext => diff --git a/test/OpenApiKiotaEndToEndTests/RestrictedControllers/FetchRelationshipTests.cs b/test/OpenApiKiotaEndToEndTests/RestrictedControllers/FetchRelationshipTests.cs index 416e32b99..979c6ab27 100644 --- a/test/OpenApiKiotaEndToEndTests/RestrictedControllers/FetchRelationshipTests.cs +++ b/test/OpenApiKiotaEndToEndTests/RestrictedControllers/FetchRelationshipTests.cs @@ -43,7 +43,7 @@ await _testContext.RunOnDatabaseAsync(async dbContext => var apiClient = new RestrictedControllersClient(requestAdapter); // Act - DataStreamIdentifierResponseDocument? response = await apiClient.ReadOnlyChannels[channel.StringId].Relationships.VideoStream.GetAsync(); + DataStreamIdentifierResponseDocument? response = await apiClient.ReadOnlyChannels[channel.StringId!].Relationships.VideoStream.GetAsync(); // Assert response.ShouldNotBeNull(); @@ -69,7 +69,7 @@ await _testContext.RunOnDatabaseAsync(async dbContext => // Act NullableDataStreamIdentifierResponseDocument? response = - await apiClient.ReadOnlyChannels[channel.StringId].Relationships.UltraHighDefinitionVideoStream.GetAsync(); + await apiClient.ReadOnlyChannels[channel.StringId!].Relationships.UltraHighDefinitionVideoStream.GetAsync(); // Assert response.ShouldNotBeNull(); @@ -94,7 +94,7 @@ await _testContext.RunOnDatabaseAsync(async dbContext => var apiClient = new RestrictedControllersClient(requestAdapter); // Act - DataStreamIdentifierCollectionResponseDocument? response = await apiClient.ReadOnlyChannels[channel.StringId].Relationships.AudioStreams.GetAsync(); + DataStreamIdentifierCollectionResponseDocument? response = await apiClient.ReadOnlyChannels[channel.StringId!].Relationships.AudioStreams.GetAsync(); // Assert response.ShouldNotBeNull(); @@ -120,7 +120,7 @@ await _testContext.RunOnDatabaseAsync(async dbContext => var apiClient = new RestrictedControllersClient(requestAdapter); // Act - DataStreamIdentifierCollectionResponseDocument? response = await apiClient.ReadOnlyChannels[channel.StringId].Relationships.AudioStreams.GetAsync(); + DataStreamIdentifierCollectionResponseDocument? response = await apiClient.ReadOnlyChannels[channel.StringId!].Relationships.AudioStreams.GetAsync(); // Assert response.ShouldNotBeNull(); diff --git a/test/OpenApiKiotaEndToEndTests/RestrictedControllers/FetchResourceTests.cs b/test/OpenApiKiotaEndToEndTests/RestrictedControllers/FetchResourceTests.cs index 4adb8b2f2..998daa337 100644 --- a/test/OpenApiKiotaEndToEndTests/RestrictedControllers/FetchResourceTests.cs +++ b/test/OpenApiKiotaEndToEndTests/RestrictedControllers/FetchResourceTests.cs @@ -94,7 +94,7 @@ await _testContext.RunOnDatabaseAsync(async dbContext => var apiClient = new RestrictedControllersClient(requestAdapter); // Act - ReadOnlyChannelPrimaryResponseDocument? response = await apiClient.ReadOnlyChannels[channel.StringId].GetAsync(); + ReadOnlyChannelPrimaryResponseDocument? response = await apiClient.ReadOnlyChannels[channel.StringId!].GetAsync(); // Assert response.ShouldNotBeNull(); @@ -154,7 +154,7 @@ await _testContext.RunOnDatabaseAsync(async dbContext => var apiClient = new RestrictedControllersClient(requestAdapter); // Act - DataStreamSecondaryResponseDocument? response = await apiClient.ReadOnlyChannels[channel.StringId].VideoStream.GetAsync(); + DataStreamSecondaryResponseDocument? response = await apiClient.ReadOnlyChannels[channel.StringId!].VideoStream.GetAsync(); // Assert response.ShouldNotBeNull(); @@ -181,7 +181,7 @@ await _testContext.RunOnDatabaseAsync(async dbContext => var apiClient = new RestrictedControllersClient(requestAdapter); // Act - NullableDataStreamSecondaryResponseDocument? response = await apiClient.ReadOnlyChannels[channel.StringId].UltraHighDefinitionVideoStream.GetAsync(); + NullableDataStreamSecondaryResponseDocument? response = await apiClient.ReadOnlyChannels[channel.StringId!].UltraHighDefinitionVideoStream.GetAsync(); // Assert response.ShouldNotBeNull(); @@ -206,7 +206,7 @@ await _testContext.RunOnDatabaseAsync(async dbContext => var apiClient = new RestrictedControllersClient(requestAdapter); // Act - DataStreamCollectionResponseDocument? response = await apiClient.ReadOnlyChannels[channel.StringId].AudioStreams.GetAsync(); + DataStreamCollectionResponseDocument? response = await apiClient.ReadOnlyChannels[channel.StringId!].AudioStreams.GetAsync(); // Assert response.ShouldNotBeNull(); @@ -238,7 +238,7 @@ await _testContext.RunOnDatabaseAsync(async dbContext => var apiClient = new RestrictedControllersClient(requestAdapter); // Act - DataStreamCollectionResponseDocument? response = await apiClient.ReadOnlyChannels[channel.StringId].AudioStreams.GetAsync(); + DataStreamCollectionResponseDocument? response = await apiClient.ReadOnlyChannels[channel.StringId!].AudioStreams.GetAsync(); // Assert response.ShouldNotBeNull(); diff --git a/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/DataStreams/DataStreamsRequestBuilder.cs b/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/DataStreams/DataStreamsRequestBuilder.cs index 57a47d9ad..b89061601 100644 --- a/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/DataStreams/DataStreamsRequestBuilder.cs +++ b/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/DataStreams/DataStreamsRequestBuilder.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -30,6 +32,7 @@ public partial class DataStreamsRequestBuilder : BaseRequestBuilder return new global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.DataStreams.Item.DataStreamsItemRequestBuilder(urlTplParams, RequestAdapter); } } + /// /// Instantiates a new and sets the default values. /// @@ -38,6 +41,7 @@ public partial class DataStreamsRequestBuilder : BaseRequestBuilder public DataStreamsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/dataStreams{?query*}", pathParameters) { } + /// /// Instantiates a new and sets the default values. /// @@ -46,6 +50,7 @@ public DataStreamsRequestBuilder(Dictionary pathParameters, IReq public DataStreamsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/dataStreams{?query*}", rawUrl) { } + /// /// Retrieves a collection of dataStreams. /// @@ -53,15 +58,8 @@ public DataStreamsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) /// Cancellation token to use when cancelling requests /// Configuration for the request such as headers, query parameters, and middleware options. /// When receiving a 400 status code -#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> { @@ -69,60 +67,43 @@ public DataStreamsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) }; return await RequestAdapter.SendAsync(requestInfo, global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.DataStreamCollectionResponseDocument.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// /// 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 HeadAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { -#nullable restore -#else - public async Task HeadAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) - { -#endif var requestInfo = ToHeadRequestInformation(requestConfiguration); await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); } + /// /// Retrieves a collection of dataStreams. /// /// A /// 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(Method.GET, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/vnd.api+json"); return requestInfo; } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// /// A /// 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 ToHeadRequestInformation(Action>? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToHeadRequestInformation(Action> requestConfiguration = default) - { -#endif var requestInfo = new RequestInformation(Method.HEAD, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); return requestInfo; } + /// /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. /// @@ -132,6 +113,7 @@ public RequestInformation ToHeadRequestInformation(Action /// Retrieves a collection of dataStreams. /// @@ -139,16 +121,10 @@ public RequestInformation ToHeadRequestInformation(ActionFor syntax, see the documentation for the [`include`](https://www.jsonapi.net/usage/reading/including-relationships.html)/[`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// @@ -156,16 +132,10 @@ public partial class DataStreamsRequestBuilderGetQueryParameters public partial class DataStreamsRequestBuilderHeadQueryParameters { /// For syntax, see the documentation for the [`include`](https://www.jsonapi.net/usage/reading/including-relationships.html)/[`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/DataStreams/Item/DataStreamsItemRequestBuilder.cs b/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/DataStreams/Item/DataStreamsItemRequestBuilder.cs index a3ff69f17..2da8cfcd5 100644 --- a/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/DataStreams/Item/DataStreamsItemRequestBuilder.cs +++ b/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/DataStreams/Item/DataStreamsItemRequestBuilder.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -25,6 +27,7 @@ public partial class DataStreamsItemRequestBuilder : BaseRequestBuilder public DataStreamsItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/dataStreams/{id}{?query*}", pathParameters) { } + /// /// Instantiates a new and sets the default values. /// @@ -33,6 +36,7 @@ public DataStreamsItemRequestBuilder(Dictionary pathParameters, public DataStreamsItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/dataStreams/{id}{?query*}", rawUrl) { } + /// /// Retrieves an individual dataStream by its identifier. /// @@ -41,15 +45,8 @@ public DataStreamsItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapt /// Configuration for the request such as headers, query parameters, and middleware options. /// When receiving a 400 status code /// When receiving a 404 status code -#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> { @@ -58,60 +55,43 @@ public DataStreamsItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapt }; return await RequestAdapter.SendAsync(requestInfo, global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.DataStreamPrimaryResponseDocument.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// /// 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 HeadAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { -#nullable restore -#else - public async Task HeadAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) - { -#endif var requestInfo = ToHeadRequestInformation(requestConfiguration); await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); } + /// /// Retrieves an individual dataStream by its identifier. /// /// A /// 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(Method.GET, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/vnd.api+json"); return requestInfo; } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// /// A /// 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 ToHeadRequestInformation(Action>? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToHeadRequestInformation(Action> requestConfiguration = default) - { -#endif var requestInfo = new RequestInformation(Method.HEAD, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); return requestInfo; } + /// /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. /// @@ -121,6 +101,7 @@ public RequestInformation ToHeadRequestInformation(Action /// Retrieves an individual dataStream by its identifier. /// @@ -128,16 +109,10 @@ public RequestInformation ToHeadRequestInformation(ActionFor syntax, see the documentation for the [`include`](https://www.jsonapi.net/usage/reading/including-relationships.html)/[`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// @@ -145,16 +120,10 @@ public partial class DataStreamsItemRequestBuilderGetQueryParameters public partial class DataStreamsItemRequestBuilderHeadQueryParameters { /// For syntax, see the documentation for the [`include`](https://www.jsonapi.net/usage/reading/including-relationships.html)/[`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/AttributesInCreateWriteOnlyChannelRequest.cs b/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/AttributesInCreateWriteOnlyChannelRequest.cs index e45b6bdd2..0f34e5a9f 100644 --- a/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/AttributesInCreateWriteOnlyChannelRequest.cs +++ b/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/AttributesInCreateWriteOnlyChannelRequest.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,34 +17,28 @@ public partial class AttributesInCreateWriteOnlyChannelRequest : IBackedModel, I { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The isAdultOnly property public bool? IsAdultOnly { get { return BackingStore?.Get("isAdultOnly"); } set { BackingStore?.Set("isAdultOnly", value); } } + /// The isCommercial property public bool? IsCommercial { get { return BackingStore?.Get("isCommercial"); } set { BackingStore?.Set("isCommercial", value); } } + /// The name property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Name { get { return BackingStore?.Get("name"); } set { BackingStore?.Set("name", value); } } -#nullable restore -#else - public string Name - { - get { return BackingStore?.Get("name"); } - set { BackingStore?.Set("name", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -50,6 +46,7 @@ public AttributesInCreateWriteOnlyChannelRequest() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -60,6 +57,7 @@ public AttributesInCreateWriteOnlyChannelRequest() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.AttributesInCreateWriteOnlyChannelRequest(); } + /// /// The deserialization information for the current model /// @@ -73,6 +71,7 @@ public virtual IDictionary> GetFieldDeserializers() { "name", n => { Name = n.GetStringValue(); } }, }; } + /// /// Serializes information the current object /// @@ -87,3 +86,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/AttributesInUpdateWriteOnlyChannelRequest.cs b/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/AttributesInUpdateWriteOnlyChannelRequest.cs index a0aa870b2..03b48cd9b 100644 --- a/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/AttributesInUpdateWriteOnlyChannelRequest.cs +++ b/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/AttributesInUpdateWriteOnlyChannelRequest.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,34 +17,28 @@ public partial class AttributesInUpdateWriteOnlyChannelRequest : IBackedModel, I { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The isAdultOnly property public bool? IsAdultOnly { get { return BackingStore?.Get("isAdultOnly"); } set { BackingStore?.Set("isAdultOnly", value); } } + /// The isCommercial property public bool? IsCommercial { get { return BackingStore?.Get("isCommercial"); } set { BackingStore?.Set("isCommercial", value); } } + /// The name property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Name { get { return BackingStore?.Get("name"); } set { BackingStore?.Set("name", value); } } -#nullable restore -#else - public string Name - { - get { return BackingStore?.Get("name"); } - set { BackingStore?.Set("name", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -50,6 +46,7 @@ public AttributesInUpdateWriteOnlyChannelRequest() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -60,6 +57,7 @@ public AttributesInUpdateWriteOnlyChannelRequest() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.AttributesInUpdateWriteOnlyChannelRequest(); } + /// /// The deserialization information for the current model /// @@ -73,6 +71,7 @@ public virtual IDictionary> GetFieldDeserializers() { "name", n => { Name = n.GetStringValue(); } }, }; } + /// /// Serializes information the current object /// @@ -87,3 +86,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/CreateWriteOnlyChannelRequestDocument.cs b/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/CreateWriteOnlyChannelRequestDocument.cs index 4639bff46..f9559b83e 100644 --- a/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/CreateWriteOnlyChannelRequestDocument.cs +++ b/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/CreateWriteOnlyChannelRequestDocument.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,38 +17,21 @@ public partial class CreateWriteOnlyChannelRequestDocument : IBackedModel, IPars { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The data property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.DataInCreateWriteOnlyChannelRequest? Data { get { return BackingStore?.Get("data"); } set { BackingStore?.Set("data", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.DataInCreateWriteOnlyChannelRequest Data - { - get { return BackingStore?.Get("data"); } - set { BackingStore?.Set("data", value); } - } -#endif + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -54,6 +39,7 @@ public CreateWriteOnlyChannelRequestDocument() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -64,6 +50,7 @@ public CreateWriteOnlyChannelRequestDocument() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.CreateWriteOnlyChannelRequestDocument(); } + /// /// The deserialization information for the current model /// @@ -76,6 +63,7 @@ public virtual IDictionary> GetFieldDeserializers() { "meta", n => { Meta = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.Meta.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -89,3 +77,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/DataInCreateWriteOnlyChannelRequest.cs b/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/DataInCreateWriteOnlyChannelRequest.cs index b0fff4d0e..34f1ed7e8 100644 --- a/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/DataInCreateWriteOnlyChannelRequest.cs +++ b/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/DataInCreateWriteOnlyChannelRequest.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -14,61 +16,36 @@ public partial class DataInCreateWriteOnlyChannelRequest : IBackedModel, IParsab #pragma warning restore CS1591 { /// The attributes property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.AttributesInCreateWriteOnlyChannelRequest? Attributes { get { return BackingStore?.Get("attributes"); } set { BackingStore?.Set("attributes", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.AttributesInCreateWriteOnlyChannelRequest Attributes - { - get { return BackingStore?.Get("attributes"); } - set { BackingStore?.Set("attributes", value); } - } -#endif + /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// The relationships property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.RelationshipsInCreateWriteOnlyChannelRequest? Relationships { get { return BackingStore?.Get("relationships"); } set { BackingStore?.Set("relationships", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.RelationshipsInCreateWriteOnlyChannelRequest Relationships - { - get { return BackingStore?.Get("relationships"); } - set { BackingStore?.Set("relationships", value); } - } -#endif + /// The type property public global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.WriteOnlyChannelResourceType? Type { get { return BackingStore?.Get("type"); } set { BackingStore?.Set("type", value); } } + /// /// Instantiates a new and sets the default values. /// @@ -76,6 +53,7 @@ public DataInCreateWriteOnlyChannelRequest() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -86,6 +64,7 @@ public DataInCreateWriteOnlyChannelRequest() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.DataInCreateWriteOnlyChannelRequest(); } + /// /// The deserialization information for the current model /// @@ -100,6 +79,7 @@ public virtual IDictionary> GetFieldDeserializers() { "type", n => { Type = n.GetEnumValue(); } }, }; } + /// /// Serializes information the current object /// @@ -115,3 +95,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/DataInResponse.cs b/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/DataInResponse.cs index b4754f455..65c6ef43c 100644 --- a/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/DataInResponse.cs +++ b/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/DataInResponse.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,28 +17,21 @@ public partial class DataInResponse : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// The type property public global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.ResourceType? Type { get { return BackingStore?.Get("type"); } set { BackingStore?.Set("type", value); } } + /// /// Instantiates a new and sets the default values. /// @@ -44,6 +39,7 @@ public DataInResponse() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -62,6 +58,7 @@ public DataInResponse() _ => new global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.DataInResponse(), }; } + /// /// The deserialization information for the current model /// @@ -74,6 +71,7 @@ public virtual IDictionary> GetFieldDeserializers() { "type", n => { Type = n.GetEnumValue(); } }, }; } + /// /// Serializes information the current object /// @@ -87,3 +85,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/DataInUpdateWriteOnlyChannelRequest.cs b/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/DataInUpdateWriteOnlyChannelRequest.cs index 062740df2..3870af636 100644 --- a/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/DataInUpdateWriteOnlyChannelRequest.cs +++ b/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/DataInUpdateWriteOnlyChannelRequest.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -14,77 +16,43 @@ public partial class DataInUpdateWriteOnlyChannelRequest : IBackedModel, IParsab #pragma warning restore CS1591 { /// The attributes property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.AttributesInUpdateWriteOnlyChannelRequest? Attributes { get { return BackingStore?.Get("attributes"); } set { BackingStore?.Set("attributes", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.AttributesInUpdateWriteOnlyChannelRequest Attributes - { - get { return BackingStore?.Get("attributes"); } - set { BackingStore?.Set("attributes", value); } - } -#endif + /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The id property -#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 meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// The relationships property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.RelationshipsInUpdateWriteOnlyChannelRequest? Relationships { get { return BackingStore?.Get("relationships"); } set { BackingStore?.Set("relationships", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.RelationshipsInUpdateWriteOnlyChannelRequest Relationships - { - get { return BackingStore?.Get("relationships"); } - set { BackingStore?.Set("relationships", value); } - } -#endif + /// The type property public global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.WriteOnlyChannelResourceType? Type { get { return BackingStore?.Get("type"); } set { BackingStore?.Set("type", value); } } + /// /// Instantiates a new and sets the default values. /// @@ -92,6 +60,7 @@ public DataInUpdateWriteOnlyChannelRequest() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -102,6 +71,7 @@ public DataInUpdateWriteOnlyChannelRequest() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.DataInUpdateWriteOnlyChannelRequest(); } + /// /// The deserialization information for the current model /// @@ -117,6 +87,7 @@ public virtual IDictionary> GetFieldDeserializers() { "type", n => { Type = n.GetEnumValue(); } }, }; } + /// /// Serializes information the current object /// @@ -133,3 +104,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/DataStreamAttributesInResponse.cs b/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/DataStreamAttributesInResponse.cs index 4317cb90d..e502fd6bd 100644 --- a/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/DataStreamAttributesInResponse.cs +++ b/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/DataStreamAttributesInResponse.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,12 +17,14 @@ public partial class DataStreamAttributesInResponse : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The bytesTransmitted property public long? BytesTransmitted { get { return BackingStore?.Get("bytesTransmitted"); } set { BackingStore?.Set("bytesTransmitted", value); } } + /// /// Instantiates a new and sets the default values. /// @@ -28,6 +32,7 @@ public DataStreamAttributesInResponse() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -38,6 +43,7 @@ public DataStreamAttributesInResponse() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.DataStreamAttributesInResponse(); } + /// /// The deserialization information for the current model /// @@ -49,6 +55,7 @@ public virtual IDictionary> GetFieldDeserializers() { "bytesTransmitted", n => { BytesTransmitted = n.GetLongValue(); } }, }; } + /// /// Serializes information the current object /// @@ -61,3 +68,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/DataStreamCollectionResponseDocument.cs b/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/DataStreamCollectionResponseDocument.cs index fc74bd354..78deca6fb 100644 --- a/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/DataStreamCollectionResponseDocument.cs +++ b/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/DataStreamCollectionResponseDocument.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,70 +17,35 @@ public partial class DataStreamCollectionResponseDocument : IBackedModel, IParsa { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The data property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public List? Data { get { return BackingStore?.Get?>("data"); } set { BackingStore?.Set("data", value); } } -#nullable restore -#else - public List Data - { - get { return BackingStore?.Get>("data"); } - set { BackingStore?.Set("data", value); } - } -#endif + /// The included property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public List? Included { get { return BackingStore?.Get?>("included"); } set { BackingStore?.Set("included", value); } } -#nullable restore -#else - public List Included - { - get { return BackingStore?.Get>("included"); } - set { BackingStore?.Set("included", value); } - } -#endif + /// The links property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.ResourceCollectionTopLevelLinks? Links { get { return BackingStore?.Get("links"); } set { BackingStore?.Set("links", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.ResourceCollectionTopLevelLinks Links - { - get { return BackingStore?.Get("links"); } - set { BackingStore?.Set("links", value); } - } -#endif + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -86,6 +53,7 @@ public DataStreamCollectionResponseDocument() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -96,6 +64,7 @@ public DataStreamCollectionResponseDocument() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.DataStreamCollectionResponseDocument(); } + /// /// The deserialization information for the current model /// @@ -110,6 +79,7 @@ public virtual IDictionary> GetFieldDeserializers() { "meta", n => { Meta = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.Meta.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -125,3 +95,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/DataStreamDataInResponse.cs b/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/DataStreamDataInResponse.cs index 6f9704642..ca507b572 100644 --- a/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/DataStreamDataInResponse.cs +++ b/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/DataStreamDataInResponse.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -13,53 +15,26 @@ public partial class DataStreamDataInResponse : global::OpenApiKiotaEndToEndTest #pragma warning restore CS1591 { /// The attributes property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.DataStreamAttributesInResponse? Attributes { get { return BackingStore?.Get("attributes"); } set { BackingStore?.Set("attributes", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.DataStreamAttributesInResponse Attributes - { - get { return BackingStore?.Get("attributes"); } - set { BackingStore?.Set("attributes", value); } - } -#endif + /// The id property -#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 links property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.ResourceLinks? Links { get { return BackingStore?.Get("links"); } set { BackingStore?.Set("links", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.ResourceLinks Links - { - get { return BackingStore?.Get("links"); } - set { BackingStore?.Set("links", value); } - } -#endif + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -70,6 +45,7 @@ public string Id _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.DataStreamDataInResponse(); } + /// /// The deserialization information for the current model /// @@ -83,6 +59,7 @@ public override IDictionary> GetFieldDeserializers() { "links", n => { Links = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.ResourceLinks.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -98,3 +75,4 @@ public override void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/DataStreamIdentifierCollectionResponseDocument.cs b/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/DataStreamIdentifierCollectionResponseDocument.cs index 7687dd76b..7dade181d 100644 --- a/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/DataStreamIdentifierCollectionResponseDocument.cs +++ b/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/DataStreamIdentifierCollectionResponseDocument.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,54 +17,28 @@ public partial class DataStreamIdentifierCollectionResponseDocument : IBackedMod { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The data property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public List? Data { get { return BackingStore?.Get?>("data"); } set { BackingStore?.Set("data", value); } } -#nullable restore -#else - public List Data - { - get { return BackingStore?.Get>("data"); } - set { BackingStore?.Set("data", value); } - } -#endif + /// The links property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.ResourceIdentifierCollectionTopLevelLinks? Links { get { return BackingStore?.Get("links"); } set { BackingStore?.Set("links", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.ResourceIdentifierCollectionTopLevelLinks Links - { - get { return BackingStore?.Get("links"); } - set { BackingStore?.Set("links", value); } - } -#endif + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -70,6 +46,7 @@ public DataStreamIdentifierCollectionResponseDocument() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -80,6 +57,7 @@ public DataStreamIdentifierCollectionResponseDocument() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.DataStreamIdentifierCollectionResponseDocument(); } + /// /// The deserialization information for the current model /// @@ -93,6 +71,7 @@ public virtual IDictionary> GetFieldDeserializers() { "meta", n => { Meta = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.Meta.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -107,3 +86,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/DataStreamIdentifierInRequest.cs b/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/DataStreamIdentifierInRequest.cs index d893dd50a..83f16dae0 100644 --- a/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/DataStreamIdentifierInRequest.cs +++ b/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/DataStreamIdentifierInRequest.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,44 +17,28 @@ public partial class DataStreamIdentifierInRequest : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The id property -#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 meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// The type property public global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.DataStreamResourceType? Type { get { return BackingStore?.Get("type"); } set { BackingStore?.Set("type", value); } } + /// /// Instantiates a new and sets the default values. /// @@ -60,6 +46,7 @@ public DataStreamIdentifierInRequest() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -70,6 +57,7 @@ public DataStreamIdentifierInRequest() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.DataStreamIdentifierInRequest(); } + /// /// The deserialization information for the current model /// @@ -83,6 +71,7 @@ public virtual IDictionary> GetFieldDeserializers() { "type", n => { Type = n.GetEnumValue(); } }, }; } + /// /// Serializes information the current object /// @@ -97,3 +86,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/DataStreamIdentifierInResponse.cs b/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/DataStreamIdentifierInResponse.cs index f9590cddd..6bb555059 100644 --- a/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/DataStreamIdentifierInResponse.cs +++ b/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/DataStreamIdentifierInResponse.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,44 +17,28 @@ public partial class DataStreamIdentifierInResponse : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The id property -#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 meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// The type property public global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.DataStreamResourceType? Type { get { return BackingStore?.Get("type"); } set { BackingStore?.Set("type", value); } } + /// /// Instantiates a new and sets the default values. /// @@ -60,6 +46,7 @@ public DataStreamIdentifierInResponse() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -70,6 +57,7 @@ public DataStreamIdentifierInResponse() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.DataStreamIdentifierInResponse(); } + /// /// The deserialization information for the current model /// @@ -83,6 +71,7 @@ public virtual IDictionary> GetFieldDeserializers() { "type", n => { Type = n.GetEnumValue(); } }, }; } + /// /// Serializes information the current object /// @@ -97,3 +86,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/DataStreamIdentifierResponseDocument.cs b/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/DataStreamIdentifierResponseDocument.cs index a0fe436e9..d0add552c 100644 --- a/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/DataStreamIdentifierResponseDocument.cs +++ b/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/DataStreamIdentifierResponseDocument.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,54 +17,28 @@ public partial class DataStreamIdentifierResponseDocument : IBackedModel, IParsa { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The data property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.DataStreamIdentifierInResponse? Data { get { return BackingStore?.Get("data"); } set { BackingStore?.Set("data", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.DataStreamIdentifierInResponse Data - { - get { return BackingStore?.Get("data"); } - set { BackingStore?.Set("data", value); } - } -#endif + /// The links property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.ResourceIdentifierTopLevelLinks? Links { get { return BackingStore?.Get("links"); } set { BackingStore?.Set("links", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.ResourceIdentifierTopLevelLinks Links - { - get { return BackingStore?.Get("links"); } - set { BackingStore?.Set("links", value); } - } -#endif + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -70,6 +46,7 @@ public DataStreamIdentifierResponseDocument() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -80,6 +57,7 @@ public DataStreamIdentifierResponseDocument() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.DataStreamIdentifierResponseDocument(); } + /// /// The deserialization information for the current model /// @@ -93,6 +71,7 @@ public virtual IDictionary> GetFieldDeserializers() { "meta", n => { Meta = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.Meta.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -107,3 +86,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/DataStreamPrimaryResponseDocument.cs b/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/DataStreamPrimaryResponseDocument.cs index c6e2ade1d..ee4c1c9b8 100644 --- a/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/DataStreamPrimaryResponseDocument.cs +++ b/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/DataStreamPrimaryResponseDocument.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,70 +17,35 @@ public partial class DataStreamPrimaryResponseDocument : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The data property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.DataStreamDataInResponse? Data { get { return BackingStore?.Get("data"); } set { BackingStore?.Set("data", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.DataStreamDataInResponse Data - { - get { return BackingStore?.Get("data"); } - set { BackingStore?.Set("data", value); } - } -#endif + /// The included property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public List? Included { get { return BackingStore?.Get?>("included"); } set { BackingStore?.Set("included", value); } } -#nullable restore -#else - public List Included - { - get { return BackingStore?.Get>("included"); } - set { BackingStore?.Set("included", value); } - } -#endif + /// The links property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.ResourceTopLevelLinks? Links { get { return BackingStore?.Get("links"); } set { BackingStore?.Set("links", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.ResourceTopLevelLinks Links - { - get { return BackingStore?.Get("links"); } - set { BackingStore?.Set("links", value); } - } -#endif + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -86,6 +53,7 @@ public DataStreamPrimaryResponseDocument() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -96,6 +64,7 @@ public DataStreamPrimaryResponseDocument() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.DataStreamPrimaryResponseDocument(); } + /// /// The deserialization information for the current model /// @@ -110,6 +79,7 @@ public virtual IDictionary> GetFieldDeserializers() { "meta", n => { Meta = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.Meta.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -125,3 +95,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/DataStreamResourceType.cs b/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/DataStreamResourceType.cs index 705883ae7..b89243fff 100644 --- a/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/DataStreamResourceType.cs +++ b/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/DataStreamResourceType.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 using System.Runtime.Serialization; using System; namespace OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models @@ -14,3 +16,4 @@ public enum DataStreamResourceType #pragma warning restore CS1591 } } + diff --git a/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/DataStreamSecondaryResponseDocument.cs b/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/DataStreamSecondaryResponseDocument.cs index 8077b58c1..bee9e4c1a 100644 --- a/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/DataStreamSecondaryResponseDocument.cs +++ b/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/DataStreamSecondaryResponseDocument.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,70 +17,35 @@ public partial class DataStreamSecondaryResponseDocument : IBackedModel, IParsab { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The data property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.DataStreamDataInResponse? Data { get { return BackingStore?.Get("data"); } set { BackingStore?.Set("data", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.DataStreamDataInResponse Data - { - get { return BackingStore?.Get("data"); } - set { BackingStore?.Set("data", value); } - } -#endif + /// The included property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public List? Included { get { return BackingStore?.Get?>("included"); } set { BackingStore?.Set("included", value); } } -#nullable restore -#else - public List Included - { - get { return BackingStore?.Get>("included"); } - set { BackingStore?.Set("included", value); } - } -#endif + /// The links property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.ResourceTopLevelLinks? Links { get { return BackingStore?.Get("links"); } set { BackingStore?.Set("links", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.ResourceTopLevelLinks Links - { - get { return BackingStore?.Get("links"); } - set { BackingStore?.Set("links", value); } - } -#endif + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -86,6 +53,7 @@ public DataStreamSecondaryResponseDocument() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -96,6 +64,7 @@ public DataStreamSecondaryResponseDocument() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.DataStreamSecondaryResponseDocument(); } + /// /// The deserialization information for the current model /// @@ -110,6 +79,7 @@ public virtual IDictionary> GetFieldDeserializers() { "meta", n => { Meta = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.Meta.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -125,3 +95,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/ErrorLinks.cs b/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/ErrorLinks.cs index b825f2486..afc6c7335 100644 --- a/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/ErrorLinks.cs +++ b/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/ErrorLinks.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -14,39 +16,22 @@ public partial class ErrorLinks : IBackedModel, IParsable #pragma warning restore CS1591 { /// The about property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? About { get { return BackingStore?.Get("about"); } set { BackingStore?.Set("about", value); } } -#nullable restore -#else - public string About - { - get { return BackingStore?.Get("about"); } - set { BackingStore?.Set("about", value); } - } -#endif + /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// 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 and sets the default values. /// @@ -54,6 +39,7 @@ public ErrorLinks() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -64,6 +50,7 @@ public ErrorLinks() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.ErrorLinks(); } + /// /// The deserialization information for the current model /// @@ -76,6 +63,7 @@ public virtual IDictionary> GetFieldDeserializers() { "type", n => { Type = n.GetStringValue(); } }, }; } + /// /// Serializes information the current object /// @@ -89,3 +77,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/ErrorObject.cs b/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/ErrorObject.cs index 02d1e4045..3cf402ef1 100644 --- a/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/ErrorObject.cs +++ b/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/ErrorObject.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,134 +17,63 @@ public partial class ErrorObject : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The code property -#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 detail property -#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 id property -#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 links property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.ErrorLinks? Links { get { return BackingStore?.Get("links"); } set { BackingStore?.Set("links", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.ErrorLinks Links - { - get { return BackingStore?.Get("links"); } - set { BackingStore?.Set("links", value); } - } -#endif + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// The source property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.ErrorSource? Source { get { return BackingStore?.Get("source"); } set { BackingStore?.Set("source", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.ErrorSource Source - { - get { return BackingStore?.Get("source"); } - set { BackingStore?.Set("source", value); } - } -#endif + /// The status property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Status { get { return BackingStore?.Get("status"); } set { BackingStore?.Set("status", value); } } -#nullable restore -#else - public string Status - { - get { return BackingStore?.Get("status"); } - set { BackingStore?.Set("status", value); } - } -#endif + /// The title property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Title { get { return BackingStore?.Get("title"); } set { BackingStore?.Set("title", value); } } -#nullable restore -#else - public string Title - { - get { return BackingStore?.Get("title"); } - set { BackingStore?.Set("title", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -150,6 +81,7 @@ public ErrorObject() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -160,6 +92,7 @@ public ErrorObject() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.ErrorObject(); } + /// /// The deserialization information for the current model /// @@ -178,6 +111,7 @@ public virtual IDictionary> GetFieldDeserializers() { "title", n => { Title = n.GetStringValue(); } }, }; } + /// /// Serializes information the current object /// @@ -197,3 +131,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/ErrorResponseDocument.cs b/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/ErrorResponseDocument.cs index 14f585f24..f25544dfe 100644 --- a/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/ErrorResponseDocument.cs +++ b/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/ErrorResponseDocument.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -16,56 +18,31 @@ public partial class ErrorResponseDocument : ApiException, IBackedModel, IParsab { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The errors property -#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 + /// The links property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.ErrorTopLevelLinks? Links { get { return BackingStore?.Get("links"); } set { BackingStore?.Set("links", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.ErrorTopLevelLinks Links - { - get { return BackingStore?.Get("links"); } - set { BackingStore?.Set("links", value); } - } -#endif + /// The primary error message. public override string Message { get => base.Message; } + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -73,6 +50,7 @@ public ErrorResponseDocument() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -83,6 +61,7 @@ public ErrorResponseDocument() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.ErrorResponseDocument(); } + /// /// The deserialization information for the current model /// @@ -96,6 +75,7 @@ public virtual IDictionary> GetFieldDeserializers() { "meta", n => { Meta = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.Meta.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -110,3 +90,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/ErrorSource.cs b/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/ErrorSource.cs index ae558c8fa..8ca737018 100644 --- a/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/ErrorSource.cs +++ b/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/ErrorSource.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,54 +17,28 @@ public partial class ErrorSource : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The header property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Header { get { return BackingStore?.Get("header"); } set { BackingStore?.Set("header", value); } } -#nullable restore -#else - public string Header - { - get { return BackingStore?.Get("header"); } - set { BackingStore?.Set("header", value); } - } -#endif + /// The parameter property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Parameter { get { return BackingStore?.Get("parameter"); } set { BackingStore?.Set("parameter", value); } } -#nullable restore -#else - public string Parameter - { - get { return BackingStore?.Get("parameter"); } - set { BackingStore?.Set("parameter", value); } - } -#endif + /// The pointer property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Pointer { get { return BackingStore?.Get("pointer"); } set { BackingStore?.Set("pointer", value); } } -#nullable restore -#else - public string Pointer - { - get { return BackingStore?.Get("pointer"); } - set { BackingStore?.Set("pointer", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -70,6 +46,7 @@ public ErrorSource() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -80,6 +57,7 @@ public ErrorSource() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.ErrorSource(); } + /// /// The deserialization information for the current model /// @@ -93,6 +71,7 @@ public virtual IDictionary> GetFieldDeserializers() { "pointer", n => { Pointer = n.GetStringValue(); } }, }; } + /// /// Serializes information the current object /// @@ -107,3 +86,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/ErrorTopLevelLinks.cs b/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/ErrorTopLevelLinks.cs index 8399067df..cc79a1790 100644 --- a/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/ErrorTopLevelLinks.cs +++ b/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/ErrorTopLevelLinks.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,38 +17,21 @@ public partial class ErrorTopLevelLinks : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The describedby property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Describedby { get { return BackingStore?.Get("describedby"); } set { BackingStore?.Set("describedby", value); } } -#nullable restore -#else - public string Describedby - { - get { return BackingStore?.Get("describedby"); } - set { BackingStore?.Set("describedby", value); } - } -#endif + /// The self property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Self { get { return BackingStore?.Get("self"); } set { BackingStore?.Set("self", value); } } -#nullable restore -#else - public string Self - { - get { return BackingStore?.Get("self"); } - set { BackingStore?.Set("self", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -54,6 +39,7 @@ public ErrorTopLevelLinks() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -64,6 +50,7 @@ public ErrorTopLevelLinks() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.ErrorTopLevelLinks(); } + /// /// The deserialization information for the current model /// @@ -76,6 +63,7 @@ public virtual IDictionary> GetFieldDeserializers() { "self", n => { Self = n.GetStringValue(); } }, }; } + /// /// Serializes information the current object /// @@ -89,3 +77,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/Meta.cs b/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/Meta.cs index d780fb83c..9737a9f32 100644 --- a/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/Meta.cs +++ b/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/Meta.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -19,8 +21,10 @@ public IDictionary AdditionalData get { return BackingStore.Get>("AdditionalData") ?? new Dictionary(); } set { BackingStore.Set("AdditionalData", value); } } + /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// /// Instantiates a new and sets the default values. /// @@ -29,6 +33,7 @@ public Meta() BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); AdditionalData = new Dictionary(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -39,6 +44,7 @@ public Meta() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.Meta(); } + /// /// The deserialization information for the current model /// @@ -49,6 +55,7 @@ public virtual IDictionary> GetFieldDeserializers() { }; } + /// /// Serializes information the current object /// @@ -61,3 +68,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/NullableDataStreamIdentifierResponseDocument.cs b/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/NullableDataStreamIdentifierResponseDocument.cs index 666219da1..c6a68fabb 100644 --- a/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/NullableDataStreamIdentifierResponseDocument.cs +++ b/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/NullableDataStreamIdentifierResponseDocument.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,54 +17,28 @@ public partial class NullableDataStreamIdentifierResponseDocument : IBackedModel { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The data property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.DataStreamIdentifierInResponse? Data { get { return BackingStore?.Get("data"); } set { BackingStore?.Set("data", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.DataStreamIdentifierInResponse Data - { - get { return BackingStore?.Get("data"); } - set { BackingStore?.Set("data", value); } - } -#endif + /// The links property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.ResourceIdentifierTopLevelLinks? Links { get { return BackingStore?.Get("links"); } set { BackingStore?.Set("links", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.ResourceIdentifierTopLevelLinks Links - { - get { return BackingStore?.Get("links"); } - set { BackingStore?.Set("links", value); } - } -#endif + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -70,6 +46,7 @@ public NullableDataStreamIdentifierResponseDocument() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -80,6 +57,7 @@ public NullableDataStreamIdentifierResponseDocument() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.NullableDataStreamIdentifierResponseDocument(); } + /// /// The deserialization information for the current model /// @@ -93,6 +71,7 @@ public virtual IDictionary> GetFieldDeserializers() { "meta", n => { Meta = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.Meta.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -107,3 +86,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/NullableDataStreamSecondaryResponseDocument.cs b/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/NullableDataStreamSecondaryResponseDocument.cs index 680fd5338..2a247c73a 100644 --- a/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/NullableDataStreamSecondaryResponseDocument.cs +++ b/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/NullableDataStreamSecondaryResponseDocument.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,70 +17,35 @@ public partial class NullableDataStreamSecondaryResponseDocument : IBackedModel, { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The data property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.DataStreamDataInResponse? Data { get { return BackingStore?.Get("data"); } set { BackingStore?.Set("data", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.DataStreamDataInResponse Data - { - get { return BackingStore?.Get("data"); } - set { BackingStore?.Set("data", value); } - } -#endif + /// The included property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public List? Included { get { return BackingStore?.Get?>("included"); } set { BackingStore?.Set("included", value); } } -#nullable restore -#else - public List Included - { - get { return BackingStore?.Get>("included"); } - set { BackingStore?.Set("included", value); } - } -#endif + /// The links property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.ResourceTopLevelLinks? Links { get { return BackingStore?.Get("links"); } set { BackingStore?.Set("links", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.ResourceTopLevelLinks Links - { - get { return BackingStore?.Get("links"); } - set { BackingStore?.Set("links", value); } - } -#endif + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -86,6 +53,7 @@ public NullableDataStreamSecondaryResponseDocument() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -96,6 +64,7 @@ public NullableDataStreamSecondaryResponseDocument() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.NullableDataStreamSecondaryResponseDocument(); } + /// /// The deserialization information for the current model /// @@ -110,6 +79,7 @@ public virtual IDictionary> GetFieldDeserializers() { "meta", n => { Meta = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.Meta.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -125,3 +95,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/NullableToOneDataStreamInRequest.cs b/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/NullableToOneDataStreamInRequest.cs index 52238b60a..575c2c6c2 100644 --- a/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/NullableToOneDataStreamInRequest.cs +++ b/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/NullableToOneDataStreamInRequest.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,38 +17,21 @@ public partial class NullableToOneDataStreamInRequest : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The data property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.DataStreamIdentifierInRequest? Data { get { return BackingStore?.Get("data"); } set { BackingStore?.Set("data", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.DataStreamIdentifierInRequest Data - { - get { return BackingStore?.Get("data"); } - set { BackingStore?.Set("data", value); } - } -#endif + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -54,6 +39,7 @@ public NullableToOneDataStreamInRequest() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -64,6 +50,7 @@ public NullableToOneDataStreamInRequest() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.NullableToOneDataStreamInRequest(); } + /// /// The deserialization information for the current model /// @@ -76,6 +63,7 @@ public virtual IDictionary> GetFieldDeserializers() { "meta", n => { Meta = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.Meta.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -89,3 +77,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/NullableToOneDataStreamInResponse.cs b/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/NullableToOneDataStreamInResponse.cs index eba3bc163..4759c73a3 100644 --- a/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/NullableToOneDataStreamInResponse.cs +++ b/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/NullableToOneDataStreamInResponse.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,54 +17,28 @@ public partial class NullableToOneDataStreamInResponse : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The data property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.DataStreamIdentifierInResponse? Data { get { return BackingStore?.Get("data"); } set { BackingStore?.Set("data", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.DataStreamIdentifierInResponse Data - { - get { return BackingStore?.Get("data"); } - set { BackingStore?.Set("data", value); } - } -#endif + /// The links property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.RelationshipLinks? Links { get { return BackingStore?.Get("links"); } set { BackingStore?.Set("links", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.RelationshipLinks Links - { - get { return BackingStore?.Get("links"); } - set { BackingStore?.Set("links", value); } - } -#endif + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -70,6 +46,7 @@ public NullableToOneDataStreamInResponse() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -80,6 +57,7 @@ public NullableToOneDataStreamInResponse() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.NullableToOneDataStreamInResponse(); } + /// /// The deserialization information for the current model /// @@ -93,6 +71,7 @@ public virtual IDictionary> GetFieldDeserializers() { "meta", n => { Meta = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.Meta.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -107,3 +86,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/ReadOnlyChannelAttributesInResponse.cs b/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/ReadOnlyChannelAttributesInResponse.cs index fee44d3ab..50af73c43 100644 --- a/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/ReadOnlyChannelAttributesInResponse.cs +++ b/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/ReadOnlyChannelAttributesInResponse.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,34 +17,28 @@ public partial class ReadOnlyChannelAttributesInResponse : IBackedModel, IParsab { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The isAdultOnly property public bool? IsAdultOnly { get { return BackingStore?.Get("isAdultOnly"); } set { BackingStore?.Set("isAdultOnly", value); } } + /// The isCommercial property public bool? IsCommercial { get { return BackingStore?.Get("isCommercial"); } set { BackingStore?.Set("isCommercial", value); } } + /// The name property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Name { get { return BackingStore?.Get("name"); } set { BackingStore?.Set("name", value); } } -#nullable restore -#else - public string Name - { - get { return BackingStore?.Get("name"); } - set { BackingStore?.Set("name", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -50,6 +46,7 @@ public ReadOnlyChannelAttributesInResponse() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -60,6 +57,7 @@ public ReadOnlyChannelAttributesInResponse() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.ReadOnlyChannelAttributesInResponse(); } + /// /// The deserialization information for the current model /// @@ -73,6 +71,7 @@ public virtual IDictionary> GetFieldDeserializers() { "name", n => { Name = n.GetStringValue(); } }, }; } + /// /// Serializes information the current object /// @@ -87,3 +86,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/ReadOnlyChannelCollectionResponseDocument.cs b/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/ReadOnlyChannelCollectionResponseDocument.cs index 1a3b88e13..7b772ce18 100644 --- a/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/ReadOnlyChannelCollectionResponseDocument.cs +++ b/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/ReadOnlyChannelCollectionResponseDocument.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,70 +17,35 @@ public partial class ReadOnlyChannelCollectionResponseDocument : IBackedModel, I { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The data property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public List? Data { get { return BackingStore?.Get?>("data"); } set { BackingStore?.Set("data", value); } } -#nullable restore -#else - public List Data - { - get { return BackingStore?.Get>("data"); } - set { BackingStore?.Set("data", value); } - } -#endif + /// The included property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public List? Included { get { return BackingStore?.Get?>("included"); } set { BackingStore?.Set("included", value); } } -#nullable restore -#else - public List Included - { - get { return BackingStore?.Get>("included"); } - set { BackingStore?.Set("included", value); } - } -#endif + /// The links property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.ResourceCollectionTopLevelLinks? Links { get { return BackingStore?.Get("links"); } set { BackingStore?.Set("links", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.ResourceCollectionTopLevelLinks Links - { - get { return BackingStore?.Get("links"); } - set { BackingStore?.Set("links", value); } - } -#endif + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -86,6 +53,7 @@ public ReadOnlyChannelCollectionResponseDocument() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -96,6 +64,7 @@ public ReadOnlyChannelCollectionResponseDocument() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.ReadOnlyChannelCollectionResponseDocument(); } + /// /// The deserialization information for the current model /// @@ -110,6 +79,7 @@ public virtual IDictionary> GetFieldDeserializers() { "meta", n => { Meta = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.Meta.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -125,3 +95,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/ReadOnlyChannelDataInResponse.cs b/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/ReadOnlyChannelDataInResponse.cs index 7f424f6bb..37db08552 100644 --- a/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/ReadOnlyChannelDataInResponse.cs +++ b/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/ReadOnlyChannelDataInResponse.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -13,69 +15,33 @@ public partial class ReadOnlyChannelDataInResponse : global::OpenApiKiotaEndToEn #pragma warning restore CS1591 { /// The attributes property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.ReadOnlyChannelAttributesInResponse? Attributes { get { return BackingStore?.Get("attributes"); } set { BackingStore?.Set("attributes", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.ReadOnlyChannelAttributesInResponse Attributes - { - get { return BackingStore?.Get("attributes"); } - set { BackingStore?.Set("attributes", value); } - } -#endif + /// The id property -#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 links property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.ResourceLinks? Links { get { return BackingStore?.Get("links"); } set { BackingStore?.Set("links", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.ResourceLinks Links - { - get { return BackingStore?.Get("links"); } - set { BackingStore?.Set("links", value); } - } -#endif + /// The relationships property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.ReadOnlyChannelRelationshipsInResponse? Relationships { get { return BackingStore?.Get("relationships"); } set { BackingStore?.Set("relationships", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.ReadOnlyChannelRelationshipsInResponse Relationships - { - get { return BackingStore?.Get("relationships"); } - set { BackingStore?.Set("relationships", value); } - } -#endif + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -86,6 +52,7 @@ public string Id _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.ReadOnlyChannelDataInResponse(); } + /// /// The deserialization information for the current model /// @@ -100,6 +67,7 @@ public override IDictionary> GetFieldDeserializers() { "relationships", n => { Relationships = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.ReadOnlyChannelRelationshipsInResponse.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -116,3 +84,4 @@ public override void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/ReadOnlyChannelPrimaryResponseDocument.cs b/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/ReadOnlyChannelPrimaryResponseDocument.cs index 16f08e4e2..239d9b780 100644 --- a/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/ReadOnlyChannelPrimaryResponseDocument.cs +++ b/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/ReadOnlyChannelPrimaryResponseDocument.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,70 +17,35 @@ public partial class ReadOnlyChannelPrimaryResponseDocument : IBackedModel, IPar { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The data property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.ReadOnlyChannelDataInResponse? Data { get { return BackingStore?.Get("data"); } set { BackingStore?.Set("data", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.ReadOnlyChannelDataInResponse Data - { - get { return BackingStore?.Get("data"); } - set { BackingStore?.Set("data", value); } - } -#endif + /// The included property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public List? Included { get { return BackingStore?.Get?>("included"); } set { BackingStore?.Set("included", value); } } -#nullable restore -#else - public List Included - { - get { return BackingStore?.Get>("included"); } - set { BackingStore?.Set("included", value); } - } -#endif + /// The links property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.ResourceTopLevelLinks? Links { get { return BackingStore?.Get("links"); } set { BackingStore?.Set("links", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.ResourceTopLevelLinks Links - { - get { return BackingStore?.Get("links"); } - set { BackingStore?.Set("links", value); } - } -#endif + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -86,6 +53,7 @@ public ReadOnlyChannelPrimaryResponseDocument() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -96,6 +64,7 @@ public ReadOnlyChannelPrimaryResponseDocument() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.ReadOnlyChannelPrimaryResponseDocument(); } + /// /// The deserialization information for the current model /// @@ -110,6 +79,7 @@ public virtual IDictionary> GetFieldDeserializers() { "meta", n => { Meta = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.Meta.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -125,3 +95,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/ReadOnlyChannelRelationshipsInResponse.cs b/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/ReadOnlyChannelRelationshipsInResponse.cs index 9c1fb14cd..caa6c1d03 100644 --- a/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/ReadOnlyChannelRelationshipsInResponse.cs +++ b/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/ReadOnlyChannelRelationshipsInResponse.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -14,55 +16,29 @@ public partial class ReadOnlyChannelRelationshipsInResponse : IBackedModel, IPar #pragma warning restore CS1591 { /// The audioStreams property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.ToManyDataStreamInResponse? AudioStreams { get { return BackingStore?.Get("audioStreams"); } set { BackingStore?.Set("audioStreams", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.ToManyDataStreamInResponse AudioStreams - { - get { return BackingStore?.Get("audioStreams"); } - set { BackingStore?.Set("audioStreams", value); } - } -#endif + /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The ultraHighDefinitionVideoStream property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.NullableToOneDataStreamInResponse? UltraHighDefinitionVideoStream { get { return BackingStore?.Get("ultraHighDefinitionVideoStream"); } set { BackingStore?.Set("ultraHighDefinitionVideoStream", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.NullableToOneDataStreamInResponse UltraHighDefinitionVideoStream - { - get { return BackingStore?.Get("ultraHighDefinitionVideoStream"); } - set { BackingStore?.Set("ultraHighDefinitionVideoStream", value); } - } -#endif + /// The videoStream property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.ToOneDataStreamInResponse? VideoStream { get { return BackingStore?.Get("videoStream"); } set { BackingStore?.Set("videoStream", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.ToOneDataStreamInResponse VideoStream - { - get { return BackingStore?.Get("videoStream"); } - set { BackingStore?.Set("videoStream", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -70,6 +46,7 @@ public ReadOnlyChannelRelationshipsInResponse() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -80,6 +57,7 @@ public ReadOnlyChannelRelationshipsInResponse() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.ReadOnlyChannelRelationshipsInResponse(); } + /// /// The deserialization information for the current model /// @@ -93,6 +71,7 @@ public virtual IDictionary> GetFieldDeserializers() { "videoStream", n => { VideoStream = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.ToOneDataStreamInResponse.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -107,3 +86,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/ReadOnlyResourceChannelAttributesInResponse.cs b/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/ReadOnlyResourceChannelAttributesInResponse.cs index d10cc1f09..1fc93b51a 100644 --- a/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/ReadOnlyResourceChannelAttributesInResponse.cs +++ b/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/ReadOnlyResourceChannelAttributesInResponse.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,34 +17,28 @@ public partial class ReadOnlyResourceChannelAttributesInResponse : IBackedModel, { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The isAdultOnly property public bool? IsAdultOnly { get { return BackingStore?.Get("isAdultOnly"); } set { BackingStore?.Set("isAdultOnly", value); } } + /// The isCommercial property public bool? IsCommercial { get { return BackingStore?.Get("isCommercial"); } set { BackingStore?.Set("isCommercial", value); } } + /// The name property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Name { get { return BackingStore?.Get("name"); } set { BackingStore?.Set("name", value); } } -#nullable restore -#else - public string Name - { - get { return BackingStore?.Get("name"); } - set { BackingStore?.Set("name", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -50,6 +46,7 @@ public ReadOnlyResourceChannelAttributesInResponse() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -60,6 +57,7 @@ public ReadOnlyResourceChannelAttributesInResponse() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.ReadOnlyResourceChannelAttributesInResponse(); } + /// /// The deserialization information for the current model /// @@ -73,6 +71,7 @@ public virtual IDictionary> GetFieldDeserializers() { "name", n => { Name = n.GetStringValue(); } }, }; } + /// /// Serializes information the current object /// @@ -87,3 +86,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/ReadOnlyResourceChannelCollectionResponseDocument.cs b/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/ReadOnlyResourceChannelCollectionResponseDocument.cs index 4adcbdf0b..432eda612 100644 --- a/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/ReadOnlyResourceChannelCollectionResponseDocument.cs +++ b/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/ReadOnlyResourceChannelCollectionResponseDocument.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,70 +17,35 @@ public partial class ReadOnlyResourceChannelCollectionResponseDocument : IBacked { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The data property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public List? Data { get { return BackingStore?.Get?>("data"); } set { BackingStore?.Set("data", value); } } -#nullable restore -#else - public List Data - { - get { return BackingStore?.Get>("data"); } - set { BackingStore?.Set("data", value); } - } -#endif + /// The included property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public List? Included { get { return BackingStore?.Get?>("included"); } set { BackingStore?.Set("included", value); } } -#nullable restore -#else - public List Included - { - get { return BackingStore?.Get>("included"); } - set { BackingStore?.Set("included", value); } - } -#endif + /// The links property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.ResourceCollectionTopLevelLinks? Links { get { return BackingStore?.Get("links"); } set { BackingStore?.Set("links", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.ResourceCollectionTopLevelLinks Links - { - get { return BackingStore?.Get("links"); } - set { BackingStore?.Set("links", value); } - } -#endif + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -86,6 +53,7 @@ public ReadOnlyResourceChannelCollectionResponseDocument() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -96,6 +64,7 @@ public ReadOnlyResourceChannelCollectionResponseDocument() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.ReadOnlyResourceChannelCollectionResponseDocument(); } + /// /// The deserialization information for the current model /// @@ -110,6 +79,7 @@ public virtual IDictionary> GetFieldDeserializers() { "meta", n => { Meta = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.Meta.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -125,3 +95,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/ReadOnlyResourceChannelDataInResponse.cs b/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/ReadOnlyResourceChannelDataInResponse.cs index 0eca201e8..2c6e5274d 100644 --- a/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/ReadOnlyResourceChannelDataInResponse.cs +++ b/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/ReadOnlyResourceChannelDataInResponse.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -13,69 +15,33 @@ public partial class ReadOnlyResourceChannelDataInResponse : global::OpenApiKiot #pragma warning restore CS1591 { /// The attributes property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.ReadOnlyResourceChannelAttributesInResponse? Attributes { get { return BackingStore?.Get("attributes"); } set { BackingStore?.Set("attributes", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.ReadOnlyResourceChannelAttributesInResponse Attributes - { - get { return BackingStore?.Get("attributes"); } - set { BackingStore?.Set("attributes", value); } - } -#endif + /// The id property -#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 links property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.ResourceLinks? Links { get { return BackingStore?.Get("links"); } set { BackingStore?.Set("links", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.ResourceLinks Links - { - get { return BackingStore?.Get("links"); } - set { BackingStore?.Set("links", value); } - } -#endif + /// The relationships property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.ReadOnlyResourceChannelRelationshipsInResponse? Relationships { get { return BackingStore?.Get("relationships"); } set { BackingStore?.Set("relationships", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.ReadOnlyResourceChannelRelationshipsInResponse Relationships - { - get { return BackingStore?.Get("relationships"); } - set { BackingStore?.Set("relationships", value); } - } -#endif + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -86,6 +52,7 @@ public string Id _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.ReadOnlyResourceChannelDataInResponse(); } + /// /// The deserialization information for the current model /// @@ -100,6 +67,7 @@ public override IDictionary> GetFieldDeserializers() { "relationships", n => { Relationships = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.ReadOnlyResourceChannelRelationshipsInResponse.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -116,3 +84,4 @@ public override void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/ReadOnlyResourceChannelPrimaryResponseDocument.cs b/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/ReadOnlyResourceChannelPrimaryResponseDocument.cs index 8f366552a..6dcac408d 100644 --- a/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/ReadOnlyResourceChannelPrimaryResponseDocument.cs +++ b/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/ReadOnlyResourceChannelPrimaryResponseDocument.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,70 +17,35 @@ public partial class ReadOnlyResourceChannelPrimaryResponseDocument : IBackedMod { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The data property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.ReadOnlyResourceChannelDataInResponse? Data { get { return BackingStore?.Get("data"); } set { BackingStore?.Set("data", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.ReadOnlyResourceChannelDataInResponse Data - { - get { return BackingStore?.Get("data"); } - set { BackingStore?.Set("data", value); } - } -#endif + /// The included property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public List? Included { get { return BackingStore?.Get?>("included"); } set { BackingStore?.Set("included", value); } } -#nullable restore -#else - public List Included - { - get { return BackingStore?.Get>("included"); } - set { BackingStore?.Set("included", value); } - } -#endif + /// The links property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.ResourceTopLevelLinks? Links { get { return BackingStore?.Get("links"); } set { BackingStore?.Set("links", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.ResourceTopLevelLinks Links - { - get { return BackingStore?.Get("links"); } - set { BackingStore?.Set("links", value); } - } -#endif + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -86,6 +53,7 @@ public ReadOnlyResourceChannelPrimaryResponseDocument() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -96,6 +64,7 @@ public ReadOnlyResourceChannelPrimaryResponseDocument() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.ReadOnlyResourceChannelPrimaryResponseDocument(); } + /// /// The deserialization information for the current model /// @@ -110,6 +79,7 @@ public virtual IDictionary> GetFieldDeserializers() { "meta", n => { Meta = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.Meta.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -125,3 +95,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/ReadOnlyResourceChannelRelationshipsInResponse.cs b/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/ReadOnlyResourceChannelRelationshipsInResponse.cs index 1f7e9f2ba..247cddfe9 100644 --- a/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/ReadOnlyResourceChannelRelationshipsInResponse.cs +++ b/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/ReadOnlyResourceChannelRelationshipsInResponse.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -14,55 +16,29 @@ public partial class ReadOnlyResourceChannelRelationshipsInResponse : IBackedMod #pragma warning restore CS1591 { /// The audioStreams property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.ToManyDataStreamInResponse? AudioStreams { get { return BackingStore?.Get("audioStreams"); } set { BackingStore?.Set("audioStreams", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.ToManyDataStreamInResponse AudioStreams - { - get { return BackingStore?.Get("audioStreams"); } - set { BackingStore?.Set("audioStreams", value); } - } -#endif + /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The ultraHighDefinitionVideoStream property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.NullableToOneDataStreamInResponse? UltraHighDefinitionVideoStream { get { return BackingStore?.Get("ultraHighDefinitionVideoStream"); } set { BackingStore?.Set("ultraHighDefinitionVideoStream", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.NullableToOneDataStreamInResponse UltraHighDefinitionVideoStream - { - get { return BackingStore?.Get("ultraHighDefinitionVideoStream"); } - set { BackingStore?.Set("ultraHighDefinitionVideoStream", value); } - } -#endif + /// The videoStream property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.ToOneDataStreamInResponse? VideoStream { get { return BackingStore?.Get("videoStream"); } set { BackingStore?.Set("videoStream", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.ToOneDataStreamInResponse VideoStream - { - get { return BackingStore?.Get("videoStream"); } - set { BackingStore?.Set("videoStream", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -70,6 +46,7 @@ public ReadOnlyResourceChannelRelationshipsInResponse() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -80,6 +57,7 @@ public ReadOnlyResourceChannelRelationshipsInResponse() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.ReadOnlyResourceChannelRelationshipsInResponse(); } + /// /// The deserialization information for the current model /// @@ -93,6 +71,7 @@ public virtual IDictionary> GetFieldDeserializers() { "videoStream", n => { VideoStream = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.ToOneDataStreamInResponse.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -107,3 +86,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/RelationshipLinks.cs b/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/RelationshipLinks.cs index 7ad3a04bc..a8fa902a5 100644 --- a/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/RelationshipLinks.cs +++ b/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/RelationshipLinks.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,38 +17,21 @@ public partial class RelationshipLinks : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The related property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Related { get { return BackingStore?.Get("related"); } set { BackingStore?.Set("related", value); } } -#nullable restore -#else - public string Related - { - get { return BackingStore?.Get("related"); } - set { BackingStore?.Set("related", value); } - } -#endif + /// The self property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Self { get { return BackingStore?.Get("self"); } set { BackingStore?.Set("self", value); } } -#nullable restore -#else - public string Self - { - get { return BackingStore?.Get("self"); } - set { BackingStore?.Set("self", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -54,6 +39,7 @@ public RelationshipLinks() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -64,6 +50,7 @@ public RelationshipLinks() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.RelationshipLinks(); } + /// /// The deserialization information for the current model /// @@ -76,6 +63,7 @@ public virtual IDictionary> GetFieldDeserializers() { "self", n => { Self = n.GetStringValue(); } }, }; } + /// /// Serializes information the current object /// @@ -89,3 +77,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/RelationshipsInCreateWriteOnlyChannelRequest.cs b/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/RelationshipsInCreateWriteOnlyChannelRequest.cs index 7226feb59..f1afb189e 100644 --- a/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/RelationshipsInCreateWriteOnlyChannelRequest.cs +++ b/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/RelationshipsInCreateWriteOnlyChannelRequest.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -14,55 +16,29 @@ public partial class RelationshipsInCreateWriteOnlyChannelRequest : IBackedModel #pragma warning restore CS1591 { /// The audioStreams property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.ToManyDataStreamInRequest? AudioStreams { get { return BackingStore?.Get("audioStreams"); } set { BackingStore?.Set("audioStreams", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.ToManyDataStreamInRequest AudioStreams - { - get { return BackingStore?.Get("audioStreams"); } - set { BackingStore?.Set("audioStreams", value); } - } -#endif + /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The ultraHighDefinitionVideoStream property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.NullableToOneDataStreamInRequest? UltraHighDefinitionVideoStream { get { return BackingStore?.Get("ultraHighDefinitionVideoStream"); } set { BackingStore?.Set("ultraHighDefinitionVideoStream", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.NullableToOneDataStreamInRequest UltraHighDefinitionVideoStream - { - get { return BackingStore?.Get("ultraHighDefinitionVideoStream"); } - set { BackingStore?.Set("ultraHighDefinitionVideoStream", value); } - } -#endif + /// The videoStream property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.ToOneDataStreamInRequest? VideoStream { get { return BackingStore?.Get("videoStream"); } set { BackingStore?.Set("videoStream", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.ToOneDataStreamInRequest VideoStream - { - get { return BackingStore?.Get("videoStream"); } - set { BackingStore?.Set("videoStream", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -70,6 +46,7 @@ public RelationshipsInCreateWriteOnlyChannelRequest() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -80,6 +57,7 @@ public RelationshipsInCreateWriteOnlyChannelRequest() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.RelationshipsInCreateWriteOnlyChannelRequest(); } + /// /// The deserialization information for the current model /// @@ -93,6 +71,7 @@ public virtual IDictionary> GetFieldDeserializers() { "videoStream", n => { VideoStream = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.ToOneDataStreamInRequest.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -107,3 +86,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/RelationshipsInUpdateWriteOnlyChannelRequest.cs b/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/RelationshipsInUpdateWriteOnlyChannelRequest.cs index 608005b41..97d5a6393 100644 --- a/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/RelationshipsInUpdateWriteOnlyChannelRequest.cs +++ b/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/RelationshipsInUpdateWriteOnlyChannelRequest.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -14,55 +16,29 @@ public partial class RelationshipsInUpdateWriteOnlyChannelRequest : IBackedModel #pragma warning restore CS1591 { /// The audioStreams property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.ToManyDataStreamInRequest? AudioStreams { get { return BackingStore?.Get("audioStreams"); } set { BackingStore?.Set("audioStreams", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.ToManyDataStreamInRequest AudioStreams - { - get { return BackingStore?.Get("audioStreams"); } - set { BackingStore?.Set("audioStreams", value); } - } -#endif + /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The ultraHighDefinitionVideoStream property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.NullableToOneDataStreamInRequest? UltraHighDefinitionVideoStream { get { return BackingStore?.Get("ultraHighDefinitionVideoStream"); } set { BackingStore?.Set("ultraHighDefinitionVideoStream", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.NullableToOneDataStreamInRequest UltraHighDefinitionVideoStream - { - get { return BackingStore?.Get("ultraHighDefinitionVideoStream"); } - set { BackingStore?.Set("ultraHighDefinitionVideoStream", value); } - } -#endif + /// The videoStream property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.ToOneDataStreamInRequest? VideoStream { get { return BackingStore?.Get("videoStream"); } set { BackingStore?.Set("videoStream", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.ToOneDataStreamInRequest VideoStream - { - get { return BackingStore?.Get("videoStream"); } - set { BackingStore?.Set("videoStream", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -70,6 +46,7 @@ public RelationshipsInUpdateWriteOnlyChannelRequest() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -80,6 +57,7 @@ public RelationshipsInUpdateWriteOnlyChannelRequest() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.RelationshipsInUpdateWriteOnlyChannelRequest(); } + /// /// The deserialization information for the current model /// @@ -93,6 +71,7 @@ public virtual IDictionary> GetFieldDeserializers() { "videoStream", n => { VideoStream = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.ToOneDataStreamInRequest.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -107,3 +86,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/ResourceCollectionTopLevelLinks.cs b/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/ResourceCollectionTopLevelLinks.cs index 677b0d0ee..5c802b836 100644 --- a/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/ResourceCollectionTopLevelLinks.cs +++ b/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/ResourceCollectionTopLevelLinks.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,102 +17,49 @@ public partial class ResourceCollectionTopLevelLinks : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The describedby property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Describedby { get { return BackingStore?.Get("describedby"); } set { BackingStore?.Set("describedby", value); } } -#nullable restore -#else - public string Describedby - { - get { return BackingStore?.Get("describedby"); } - set { BackingStore?.Set("describedby", value); } - } -#endif + /// The first property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? First { get { return BackingStore?.Get("first"); } set { BackingStore?.Set("first", value); } } -#nullable restore -#else - public string First - { - get { return BackingStore?.Get("first"); } - set { BackingStore?.Set("first", value); } - } -#endif + /// The last property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Last { get { return BackingStore?.Get("last"); } set { BackingStore?.Set("last", value); } } -#nullable restore -#else - public string Last - { - get { return BackingStore?.Get("last"); } - set { BackingStore?.Set("last", value); } - } -#endif + /// The next property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Next { get { return BackingStore?.Get("next"); } set { BackingStore?.Set("next", value); } } -#nullable restore -#else - public string Next - { - get { return BackingStore?.Get("next"); } - set { BackingStore?.Set("next", value); } - } -#endif + /// The prev property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Prev { get { return BackingStore?.Get("prev"); } set { BackingStore?.Set("prev", value); } } -#nullable restore -#else - public string Prev - { - get { return BackingStore?.Get("prev"); } - set { BackingStore?.Set("prev", value); } - } -#endif + /// The self property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Self { get { return BackingStore?.Get("self"); } set { BackingStore?.Set("self", value); } } -#nullable restore -#else - public string Self - { - get { return BackingStore?.Get("self"); } - set { BackingStore?.Set("self", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -118,6 +67,7 @@ public ResourceCollectionTopLevelLinks() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -128,6 +78,7 @@ public ResourceCollectionTopLevelLinks() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.ResourceCollectionTopLevelLinks(); } + /// /// The deserialization information for the current model /// @@ -144,6 +95,7 @@ public virtual IDictionary> GetFieldDeserializers() { "self", n => { Self = n.GetStringValue(); } }, }; } + /// /// Serializes information the current object /// @@ -161,3 +113,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/ResourceIdentifierCollectionTopLevelLinks.cs b/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/ResourceIdentifierCollectionTopLevelLinks.cs index 6e31fc71a..5d3db4d73 100644 --- a/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/ResourceIdentifierCollectionTopLevelLinks.cs +++ b/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/ResourceIdentifierCollectionTopLevelLinks.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,118 +17,56 @@ public partial class ResourceIdentifierCollectionTopLevelLinks : IBackedModel, I { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The describedby property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Describedby { get { return BackingStore?.Get("describedby"); } set { BackingStore?.Set("describedby", value); } } -#nullable restore -#else - public string Describedby - { - get { return BackingStore?.Get("describedby"); } - set { BackingStore?.Set("describedby", value); } - } -#endif + /// The first property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? First { get { return BackingStore?.Get("first"); } set { BackingStore?.Set("first", value); } } -#nullable restore -#else - public string First - { - get { return BackingStore?.Get("first"); } - set { BackingStore?.Set("first", value); } - } -#endif + /// The last property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Last { get { return BackingStore?.Get("last"); } set { BackingStore?.Set("last", value); } } -#nullable restore -#else - public string Last - { - get { return BackingStore?.Get("last"); } - set { BackingStore?.Set("last", value); } - } -#endif + /// The next property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Next { get { return BackingStore?.Get("next"); } set { BackingStore?.Set("next", value); } } -#nullable restore -#else - public string Next - { - get { return BackingStore?.Get("next"); } - set { BackingStore?.Set("next", value); } - } -#endif + /// The prev property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Prev { get { return BackingStore?.Get("prev"); } set { BackingStore?.Set("prev", value); } } -#nullable restore -#else - public string Prev - { - get { return BackingStore?.Get("prev"); } - set { BackingStore?.Set("prev", value); } - } -#endif + /// The related property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Related { get { return BackingStore?.Get("related"); } set { BackingStore?.Set("related", value); } } -#nullable restore -#else - public string Related - { - get { return BackingStore?.Get("related"); } - set { BackingStore?.Set("related", value); } - } -#endif + /// The self property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Self { get { return BackingStore?.Get("self"); } set { BackingStore?.Set("self", value); } } -#nullable restore -#else - public string Self - { - get { return BackingStore?.Get("self"); } - set { BackingStore?.Set("self", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -134,6 +74,7 @@ public ResourceIdentifierCollectionTopLevelLinks() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -144,6 +85,7 @@ public ResourceIdentifierCollectionTopLevelLinks() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.ResourceIdentifierCollectionTopLevelLinks(); } + /// /// The deserialization information for the current model /// @@ -161,6 +103,7 @@ public virtual IDictionary> GetFieldDeserializers() { "self", n => { Self = n.GetStringValue(); } }, }; } + /// /// Serializes information the current object /// @@ -179,3 +122,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/ResourceIdentifierTopLevelLinks.cs b/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/ResourceIdentifierTopLevelLinks.cs index f00883869..72b6d94b0 100644 --- a/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/ResourceIdentifierTopLevelLinks.cs +++ b/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/ResourceIdentifierTopLevelLinks.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,54 +17,28 @@ public partial class ResourceIdentifierTopLevelLinks : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The describedby property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Describedby { get { return BackingStore?.Get("describedby"); } set { BackingStore?.Set("describedby", value); } } -#nullable restore -#else - public string Describedby - { - get { return BackingStore?.Get("describedby"); } - set { BackingStore?.Set("describedby", value); } - } -#endif + /// The related property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Related { get { return BackingStore?.Get("related"); } set { BackingStore?.Set("related", value); } } -#nullable restore -#else - public string Related - { - get { return BackingStore?.Get("related"); } - set { BackingStore?.Set("related", value); } - } -#endif + /// The self property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Self { get { return BackingStore?.Get("self"); } set { BackingStore?.Set("self", value); } } -#nullable restore -#else - public string Self - { - get { return BackingStore?.Get("self"); } - set { BackingStore?.Set("self", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -70,6 +46,7 @@ public ResourceIdentifierTopLevelLinks() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -80,6 +57,7 @@ public ResourceIdentifierTopLevelLinks() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.ResourceIdentifierTopLevelLinks(); } + /// /// The deserialization information for the current model /// @@ -93,6 +71,7 @@ public virtual IDictionary> GetFieldDeserializers() { "self", n => { Self = n.GetStringValue(); } }, }; } + /// /// Serializes information the current object /// @@ -107,3 +86,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/ResourceLinks.cs b/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/ResourceLinks.cs index 327690337..04403be51 100644 --- a/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/ResourceLinks.cs +++ b/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/ResourceLinks.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,22 +17,14 @@ public partial class ResourceLinks : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The self property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Self { get { return BackingStore?.Get("self"); } set { BackingStore?.Set("self", value); } } -#nullable restore -#else - public string Self - { - get { return BackingStore?.Get("self"); } - set { BackingStore?.Set("self", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -38,6 +32,7 @@ public ResourceLinks() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -48,6 +43,7 @@ public ResourceLinks() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.ResourceLinks(); } + /// /// The deserialization information for the current model /// @@ -59,6 +55,7 @@ public virtual IDictionary> GetFieldDeserializers() { "self", n => { Self = n.GetStringValue(); } }, }; } + /// /// Serializes information the current object /// @@ -71,3 +68,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/ResourceTopLevelLinks.cs b/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/ResourceTopLevelLinks.cs index 7b7ef76e1..1f8b1af52 100644 --- a/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/ResourceTopLevelLinks.cs +++ b/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/ResourceTopLevelLinks.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,38 +17,21 @@ public partial class ResourceTopLevelLinks : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The describedby property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Describedby { get { return BackingStore?.Get("describedby"); } set { BackingStore?.Set("describedby", value); } } -#nullable restore -#else - public string Describedby - { - get { return BackingStore?.Get("describedby"); } - set { BackingStore?.Set("describedby", value); } - } -#endif + /// The self property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Self { get { return BackingStore?.Get("self"); } set { BackingStore?.Set("self", value); } } -#nullable restore -#else - public string Self - { - get { return BackingStore?.Get("self"); } - set { BackingStore?.Set("self", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -54,6 +39,7 @@ public ResourceTopLevelLinks() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -64,6 +50,7 @@ public ResourceTopLevelLinks() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.ResourceTopLevelLinks(); } + /// /// The deserialization information for the current model /// @@ -76,6 +63,7 @@ public virtual IDictionary> GetFieldDeserializers() { "self", n => { Self = n.GetStringValue(); } }, }; } + /// /// Serializes information the current object /// @@ -89,3 +77,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/ResourceType.cs b/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/ResourceType.cs index a522e6b32..2a96205e4 100644 --- a/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/ResourceType.cs +++ b/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/ResourceType.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 using System.Runtime.Serialization; using System; namespace OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models @@ -26,3 +28,4 @@ public enum ResourceType #pragma warning restore CS1591 } } + diff --git a/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/ToManyDataStreamInRequest.cs b/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/ToManyDataStreamInRequest.cs index 3760a50be..c771d9383 100644 --- a/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/ToManyDataStreamInRequest.cs +++ b/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/ToManyDataStreamInRequest.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,38 +17,21 @@ public partial class ToManyDataStreamInRequest : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The data property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public List? Data { get { return BackingStore?.Get?>("data"); } set { BackingStore?.Set("data", value); } } -#nullable restore -#else - public List Data - { - get { return BackingStore?.Get>("data"); } - set { BackingStore?.Set("data", value); } - } -#endif + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -54,6 +39,7 @@ public ToManyDataStreamInRequest() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -64,6 +50,7 @@ public ToManyDataStreamInRequest() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.ToManyDataStreamInRequest(); } + /// /// The deserialization information for the current model /// @@ -76,6 +63,7 @@ public virtual IDictionary> GetFieldDeserializers() { "meta", n => { Meta = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.Meta.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -89,3 +77,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/ToManyDataStreamInResponse.cs b/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/ToManyDataStreamInResponse.cs index 8e2022816..fca24ec18 100644 --- a/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/ToManyDataStreamInResponse.cs +++ b/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/ToManyDataStreamInResponse.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,54 +17,28 @@ public partial class ToManyDataStreamInResponse : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The data property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public List? Data { get { return BackingStore?.Get?>("data"); } set { BackingStore?.Set("data", value); } } -#nullable restore -#else - public List Data - { - get { return BackingStore?.Get>("data"); } - set { BackingStore?.Set("data", value); } - } -#endif + /// The links property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.RelationshipLinks? Links { get { return BackingStore?.Get("links"); } set { BackingStore?.Set("links", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.RelationshipLinks Links - { - get { return BackingStore?.Get("links"); } - set { BackingStore?.Set("links", value); } - } -#endif + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -70,6 +46,7 @@ public ToManyDataStreamInResponse() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -80,6 +57,7 @@ public ToManyDataStreamInResponse() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.ToManyDataStreamInResponse(); } + /// /// The deserialization information for the current model /// @@ -93,6 +71,7 @@ public virtual IDictionary> GetFieldDeserializers() { "meta", n => { Meta = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.Meta.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -107,3 +86,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/ToOneDataStreamInRequest.cs b/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/ToOneDataStreamInRequest.cs index 237f684aa..bc6f788f0 100644 --- a/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/ToOneDataStreamInRequest.cs +++ b/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/ToOneDataStreamInRequest.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,38 +17,21 @@ public partial class ToOneDataStreamInRequest : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The data property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.DataStreamIdentifierInRequest? Data { get { return BackingStore?.Get("data"); } set { BackingStore?.Set("data", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.DataStreamIdentifierInRequest Data - { - get { return BackingStore?.Get("data"); } - set { BackingStore?.Set("data", value); } - } -#endif + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -54,6 +39,7 @@ public ToOneDataStreamInRequest() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -64,6 +50,7 @@ public ToOneDataStreamInRequest() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.ToOneDataStreamInRequest(); } + /// /// The deserialization information for the current model /// @@ -76,6 +63,7 @@ public virtual IDictionary> GetFieldDeserializers() { "meta", n => { Meta = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.Meta.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -89,3 +77,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/ToOneDataStreamInResponse.cs b/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/ToOneDataStreamInResponse.cs index 037ea94ef..dc2068d32 100644 --- a/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/ToOneDataStreamInResponse.cs +++ b/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/ToOneDataStreamInResponse.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,54 +17,28 @@ public partial class ToOneDataStreamInResponse : IBackedModel, IParsable { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The data property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.DataStreamIdentifierInResponse? Data { get { return BackingStore?.Get("data"); } set { BackingStore?.Set("data", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.DataStreamIdentifierInResponse Data - { - get { return BackingStore?.Get("data"); } - set { BackingStore?.Set("data", value); } - } -#endif + /// The links property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.RelationshipLinks? Links { get { return BackingStore?.Get("links"); } set { BackingStore?.Set("links", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.RelationshipLinks Links - { - get { return BackingStore?.Get("links"); } - set { BackingStore?.Set("links", value); } - } -#endif + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -70,6 +46,7 @@ public ToOneDataStreamInResponse() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -80,6 +57,7 @@ public ToOneDataStreamInResponse() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.ToOneDataStreamInResponse(); } + /// /// The deserialization information for the current model /// @@ -93,6 +71,7 @@ public virtual IDictionary> GetFieldDeserializers() { "meta", n => { Meta = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.Meta.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -107,3 +86,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/UpdateWriteOnlyChannelRequestDocument.cs b/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/UpdateWriteOnlyChannelRequestDocument.cs index 5690e4967..fa408e6b8 100644 --- a/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/UpdateWriteOnlyChannelRequestDocument.cs +++ b/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/UpdateWriteOnlyChannelRequestDocument.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,38 +17,21 @@ public partial class UpdateWriteOnlyChannelRequestDocument : IBackedModel, IPars { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The data property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.DataInUpdateWriteOnlyChannelRequest? Data { get { return BackingStore?.Get("data"); } set { BackingStore?.Set("data", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.DataInUpdateWriteOnlyChannelRequest Data - { - get { return BackingStore?.Get("data"); } - set { BackingStore?.Set("data", value); } - } -#endif + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -54,6 +39,7 @@ public UpdateWriteOnlyChannelRequestDocument() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -64,6 +50,7 @@ public UpdateWriteOnlyChannelRequestDocument() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.UpdateWriteOnlyChannelRequestDocument(); } + /// /// The deserialization information for the current model /// @@ -76,6 +63,7 @@ public virtual IDictionary> GetFieldDeserializers() { "meta", n => { Meta = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.Meta.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -89,3 +77,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/WriteOnlyChannelAttributesInResponse.cs b/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/WriteOnlyChannelAttributesInResponse.cs index 8c5d185bc..588a8d0bf 100644 --- a/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/WriteOnlyChannelAttributesInResponse.cs +++ b/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/WriteOnlyChannelAttributesInResponse.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,34 +17,28 @@ public partial class WriteOnlyChannelAttributesInResponse : IBackedModel, IParsa { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The isAdultOnly property public bool? IsAdultOnly { get { return BackingStore?.Get("isAdultOnly"); } set { BackingStore?.Set("isAdultOnly", value); } } + /// The isCommercial property public bool? IsCommercial { get { return BackingStore?.Get("isCommercial"); } set { BackingStore?.Set("isCommercial", value); } } + /// The name property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public string? Name { get { return BackingStore?.Get("name"); } set { BackingStore?.Set("name", value); } } -#nullable restore -#else - public string Name - { - get { return BackingStore?.Get("name"); } - set { BackingStore?.Set("name", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -50,6 +46,7 @@ public WriteOnlyChannelAttributesInResponse() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -60,6 +57,7 @@ public WriteOnlyChannelAttributesInResponse() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.WriteOnlyChannelAttributesInResponse(); } + /// /// The deserialization information for the current model /// @@ -73,6 +71,7 @@ public virtual IDictionary> GetFieldDeserializers() { "name", n => { Name = n.GetStringValue(); } }, }; } + /// /// Serializes information the current object /// @@ -87,3 +86,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/WriteOnlyChannelDataInResponse.cs b/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/WriteOnlyChannelDataInResponse.cs index bedcf7201..66461cd3a 100644 --- a/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/WriteOnlyChannelDataInResponse.cs +++ b/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/WriteOnlyChannelDataInResponse.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -13,69 +15,33 @@ public partial class WriteOnlyChannelDataInResponse : global::OpenApiKiotaEndToE #pragma warning restore CS1591 { /// The attributes property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.WriteOnlyChannelAttributesInResponse? Attributes { get { return BackingStore?.Get("attributes"); } set { BackingStore?.Set("attributes", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.WriteOnlyChannelAttributesInResponse Attributes - { - get { return BackingStore?.Get("attributes"); } - set { BackingStore?.Set("attributes", value); } - } -#endif + /// The id property -#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 links property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.ResourceLinks? Links { get { return BackingStore?.Get("links"); } set { BackingStore?.Set("links", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.ResourceLinks Links - { - get { return BackingStore?.Get("links"); } - set { BackingStore?.Set("links", value); } - } -#endif + /// The relationships property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.WriteOnlyChannelRelationshipsInResponse? Relationships { get { return BackingStore?.Get("relationships"); } set { BackingStore?.Set("relationships", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.WriteOnlyChannelRelationshipsInResponse Relationships - { - get { return BackingStore?.Get("relationships"); } - set { BackingStore?.Set("relationships", value); } - } -#endif + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -86,6 +52,7 @@ public string Id _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.WriteOnlyChannelDataInResponse(); } + /// /// The deserialization information for the current model /// @@ -100,6 +67,7 @@ public override IDictionary> GetFieldDeserializers() { "relationships", n => { Relationships = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.WriteOnlyChannelRelationshipsInResponse.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -116,3 +84,4 @@ public override void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/WriteOnlyChannelPrimaryResponseDocument.cs b/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/WriteOnlyChannelPrimaryResponseDocument.cs index f7a2b145f..5c75420d7 100644 --- a/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/WriteOnlyChannelPrimaryResponseDocument.cs +++ b/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/WriteOnlyChannelPrimaryResponseDocument.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -15,70 +17,35 @@ public partial class WriteOnlyChannelPrimaryResponseDocument : IBackedModel, IPa { /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The data property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.WriteOnlyChannelDataInResponse? Data { get { return BackingStore?.Get("data"); } set { BackingStore?.Set("data", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.WriteOnlyChannelDataInResponse Data - { - get { return BackingStore?.Get("data"); } - set { BackingStore?.Set("data", value); } - } -#endif + /// The included property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public List? Included { get { return BackingStore?.Get?>("included"); } set { BackingStore?.Set("included", value); } } -#nullable restore -#else - public List Included - { - get { return BackingStore?.Get>("included"); } - set { BackingStore?.Set("included", value); } - } -#endif + /// The links property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.ResourceTopLevelLinks? Links { get { return BackingStore?.Get("links"); } set { BackingStore?.Set("links", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.ResourceTopLevelLinks Links - { - get { return BackingStore?.Get("links"); } - set { BackingStore?.Set("links", value); } - } -#endif + /// The meta property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.Meta? Meta { get { return BackingStore?.Get("meta"); } set { BackingStore?.Set("meta", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.Meta Meta - { - get { return BackingStore?.Get("meta"); } - set { BackingStore?.Set("meta", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -86,6 +53,7 @@ public WriteOnlyChannelPrimaryResponseDocument() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -96,6 +64,7 @@ public WriteOnlyChannelPrimaryResponseDocument() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.WriteOnlyChannelPrimaryResponseDocument(); } + /// /// The deserialization information for the current model /// @@ -110,6 +79,7 @@ public virtual IDictionary> GetFieldDeserializers() { "meta", n => { Meta = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.Meta.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -125,3 +95,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/WriteOnlyChannelRelationshipsInResponse.cs b/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/WriteOnlyChannelRelationshipsInResponse.cs index 854b2a607..c2bcf64a1 100644 --- a/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/WriteOnlyChannelRelationshipsInResponse.cs +++ b/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/WriteOnlyChannelRelationshipsInResponse.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -14,55 +16,29 @@ public partial class WriteOnlyChannelRelationshipsInResponse : IBackedModel, IPa #pragma warning restore CS1591 { /// The audioStreams property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.ToManyDataStreamInResponse? AudioStreams { get { return BackingStore?.Get("audioStreams"); } set { BackingStore?.Set("audioStreams", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.ToManyDataStreamInResponse AudioStreams - { - get { return BackingStore?.Get("audioStreams"); } - set { BackingStore?.Set("audioStreams", value); } - } -#endif + /// Stores model information. public IBackingStore BackingStore { get; private set; } + /// The ultraHighDefinitionVideoStream property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.NullableToOneDataStreamInResponse? UltraHighDefinitionVideoStream { get { return BackingStore?.Get("ultraHighDefinitionVideoStream"); } set { BackingStore?.Set("ultraHighDefinitionVideoStream", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.NullableToOneDataStreamInResponse UltraHighDefinitionVideoStream - { - get { return BackingStore?.Get("ultraHighDefinitionVideoStream"); } - set { BackingStore?.Set("ultraHighDefinitionVideoStream", value); } - } -#endif + /// The videoStream property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.ToOneDataStreamInResponse? VideoStream { get { return BackingStore?.Get("videoStream"); } set { BackingStore?.Set("videoStream", value); } } -#nullable restore -#else - public global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.ToOneDataStreamInResponse VideoStream - { - get { return BackingStore?.Get("videoStream"); } - set { BackingStore?.Set("videoStream", value); } - } -#endif + /// /// Instantiates a new and sets the default values. /// @@ -70,6 +46,7 @@ public WriteOnlyChannelRelationshipsInResponse() { BackingStore = BackingStoreFactorySingleton.Instance.CreateBackingStore(); } + /// /// Creates a new instance of the appropriate class based on discriminator value /// @@ -80,6 +57,7 @@ public WriteOnlyChannelRelationshipsInResponse() _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); return new global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.WriteOnlyChannelRelationshipsInResponse(); } + /// /// The deserialization information for the current model /// @@ -93,6 +71,7 @@ public virtual IDictionary> GetFieldDeserializers() { "videoStream", n => { VideoStream = n.GetObjectValue(global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.ToOneDataStreamInResponse.CreateFromDiscriminatorValue); } }, }; } + /// /// Serializes information the current object /// @@ -107,3 +86,4 @@ public virtual void Serialize(ISerializationWriter writer) } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/WriteOnlyChannelResourceType.cs b/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/WriteOnlyChannelResourceType.cs index 072d77e6a..96a3f5c27 100644 --- a/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/WriteOnlyChannelResourceType.cs +++ b/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/Models/WriteOnlyChannelResourceType.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 using System.Runtime.Serialization; using System; namespace OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models @@ -14,3 +16,4 @@ public enum WriteOnlyChannelResourceType #pragma warning restore CS1591 } } + diff --git a/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/ReadOnlyChannels/Item/AudioStreams/AudioStreamsRequestBuilder.cs b/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/ReadOnlyChannels/Item/AudioStreams/AudioStreamsRequestBuilder.cs index 34da3b314..e9d7863fd 100644 --- a/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/ReadOnlyChannels/Item/AudioStreams/AudioStreamsRequestBuilder.cs +++ b/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/ReadOnlyChannels/Item/AudioStreams/AudioStreamsRequestBuilder.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -25,6 +27,7 @@ public partial class AudioStreamsRequestBuilder : BaseRequestBuilder public AudioStreamsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/readOnlyChannels/{id}/audioStreams{?query*}", pathParameters) { } + /// /// Instantiates a new and sets the default values. /// @@ -33,6 +36,7 @@ public AudioStreamsRequestBuilder(Dictionary pathParameters, IRe public AudioStreamsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/readOnlyChannels/{id}/audioStreams{?query*}", rawUrl) { } + /// /// Retrieves the related dataStreams of an individual readOnlyChannel's audioStreams relationship. /// @@ -41,15 +45,8 @@ public AudioStreamsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) /// Configuration for the request such as headers, query parameters, and middleware options. /// When receiving a 400 status code /// When receiving a 404 status code -#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> { @@ -58,60 +55,43 @@ public AudioStreamsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) }; return await RequestAdapter.SendAsync(requestInfo, global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.DataStreamCollectionResponseDocument.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// /// 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 HeadAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { -#nullable restore -#else - public async Task HeadAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) - { -#endif var requestInfo = ToHeadRequestInformation(requestConfiguration); await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); } + /// /// Retrieves the related dataStreams of an individual readOnlyChannel's audioStreams relationship. /// /// A /// 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(Method.GET, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/vnd.api+json"); return requestInfo; } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// /// A /// 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 ToHeadRequestInformation(Action>? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToHeadRequestInformation(Action> requestConfiguration = default) - { -#endif var requestInfo = new RequestInformation(Method.HEAD, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); return requestInfo; } + /// /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. /// @@ -121,6 +101,7 @@ public RequestInformation ToHeadRequestInformation(Action /// Retrieves the related dataStreams of an individual readOnlyChannel's audioStreams relationship. /// @@ -128,16 +109,10 @@ public RequestInformation ToHeadRequestInformation(ActionFor syntax, see the documentation for the [`include`](https://www.jsonapi.net/usage/reading/including-relationships.html)/[`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// @@ -145,16 +120,10 @@ public partial class AudioStreamsRequestBuilderGetQueryParameters public partial class AudioStreamsRequestBuilderHeadQueryParameters { /// For syntax, see the documentation for the [`include`](https://www.jsonapi.net/usage/reading/including-relationships.html)/[`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/ReadOnlyChannels/Item/ReadOnlyChannelsItemRequestBuilder.cs b/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/ReadOnlyChannels/Item/ReadOnlyChannelsItemRequestBuilder.cs index adb216fb3..d9cb0813a 100644 --- a/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/ReadOnlyChannels/Item/ReadOnlyChannelsItemRequestBuilder.cs +++ b/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/ReadOnlyChannels/Item/ReadOnlyChannelsItemRequestBuilder.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -26,21 +28,25 @@ public partial class ReadOnlyChannelsItemRequestBuilder : BaseRequestBuilder { get => new global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.ReadOnlyChannels.Item.AudioStreams.AudioStreamsRequestBuilder(PathParameters, RequestAdapter); } + /// The relationships property public global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.ReadOnlyChannels.Item.Relationships.RelationshipsRequestBuilder Relationships { get => new global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.ReadOnlyChannels.Item.Relationships.RelationshipsRequestBuilder(PathParameters, RequestAdapter); } + /// The ultraHighDefinitionVideoStream property public global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.ReadOnlyChannels.Item.UltraHighDefinitionVideoStream.UltraHighDefinitionVideoStreamRequestBuilder UltraHighDefinitionVideoStream { get => new global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.ReadOnlyChannels.Item.UltraHighDefinitionVideoStream.UltraHighDefinitionVideoStreamRequestBuilder(PathParameters, RequestAdapter); } + /// The videoStream property public global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.ReadOnlyChannels.Item.VideoStream.VideoStreamRequestBuilder VideoStream { get => new global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.ReadOnlyChannels.Item.VideoStream.VideoStreamRequestBuilder(PathParameters, RequestAdapter); } + /// /// Instantiates a new and sets the default values. /// @@ -49,6 +55,7 @@ public partial class ReadOnlyChannelsItemRequestBuilder : BaseRequestBuilder public ReadOnlyChannelsItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/readOnlyChannels/{id}{?query*}", pathParameters) { } + /// /// Instantiates a new and sets the default values. /// @@ -57,6 +64,7 @@ public ReadOnlyChannelsItemRequestBuilder(Dictionary pathParamet public ReadOnlyChannelsItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/readOnlyChannels/{id}{?query*}", rawUrl) { } + /// /// Retrieves an individual readOnlyChannel by its identifier. /// @@ -65,15 +73,8 @@ public ReadOnlyChannelsItemRequestBuilder(string rawUrl, IRequestAdapter request /// Configuration for the request such as headers, query parameters, and middleware options. /// When receiving a 400 status code /// When receiving a 404 status code -#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> { @@ -82,60 +83,43 @@ public ReadOnlyChannelsItemRequestBuilder(string rawUrl, IRequestAdapter request }; return await RequestAdapter.SendAsync(requestInfo, global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.ReadOnlyChannelPrimaryResponseDocument.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// /// 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 HeadAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { -#nullable restore -#else - public async Task HeadAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) - { -#endif var requestInfo = ToHeadRequestInformation(requestConfiguration); await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); } + /// /// Retrieves an individual readOnlyChannel by its identifier. /// /// A /// 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(Method.GET, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/vnd.api+json"); return requestInfo; } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// /// A /// 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 ToHeadRequestInformation(Action>? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToHeadRequestInformation(Action> requestConfiguration = default) - { -#endif var requestInfo = new RequestInformation(Method.HEAD, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); return requestInfo; } + /// /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. /// @@ -145,6 +129,7 @@ public RequestInformation ToHeadRequestInformation(Action /// Retrieves an individual readOnlyChannel by its identifier. /// @@ -152,16 +137,10 @@ public RequestInformation ToHeadRequestInformation(ActionFor syntax, see the documentation for the [`include`](https://www.jsonapi.net/usage/reading/including-relationships.html)/[`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// @@ -169,16 +148,10 @@ public partial class ReadOnlyChannelsItemRequestBuilderGetQueryParameters public partial class ReadOnlyChannelsItemRequestBuilderHeadQueryParameters { /// For syntax, see the documentation for the [`include`](https://www.jsonapi.net/usage/reading/including-relationships.html)/[`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/ReadOnlyChannels/Item/Relationships/AudioStreams/AudioStreamsRequestBuilder.cs b/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/ReadOnlyChannels/Item/Relationships/AudioStreams/AudioStreamsRequestBuilder.cs index 44052b3cf..738140c8b 100644 --- a/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/ReadOnlyChannels/Item/Relationships/AudioStreams/AudioStreamsRequestBuilder.cs +++ b/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/ReadOnlyChannels/Item/Relationships/AudioStreams/AudioStreamsRequestBuilder.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -25,6 +27,7 @@ public partial class AudioStreamsRequestBuilder : BaseRequestBuilder public AudioStreamsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/readOnlyChannels/{id}/relationships/audioStreams{?query*}", pathParameters) { } + /// /// Instantiates a new and sets the default values. /// @@ -33,6 +36,7 @@ public AudioStreamsRequestBuilder(Dictionary pathParameters, IRe public AudioStreamsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/readOnlyChannels/{id}/relationships/audioStreams{?query*}", rawUrl) { } + /// /// Retrieves the related dataStream identities of an individual readOnlyChannel's audioStreams relationship. /// @@ -41,15 +45,8 @@ public AudioStreamsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) /// Configuration for the request such as headers, query parameters, and middleware options. /// When receiving a 400 status code /// When receiving a 404 status code -#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> { @@ -58,60 +55,43 @@ public AudioStreamsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) }; return await RequestAdapter.SendAsync(requestInfo, global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.DataStreamIdentifierCollectionResponseDocument.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// /// 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 HeadAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { -#nullable restore -#else - public async Task HeadAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) - { -#endif var requestInfo = ToHeadRequestInformation(requestConfiguration); await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); } + /// /// Retrieves the related dataStream identities of an individual readOnlyChannel's audioStreams relationship. /// /// A /// 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(Method.GET, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/vnd.api+json"); return requestInfo; } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// /// A /// 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 ToHeadRequestInformation(Action>? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToHeadRequestInformation(Action> requestConfiguration = default) - { -#endif var requestInfo = new RequestInformation(Method.HEAD, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); return requestInfo; } + /// /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. /// @@ -121,6 +101,7 @@ public RequestInformation ToHeadRequestInformation(Action /// Retrieves the related dataStream identities of an individual readOnlyChannel's audioStreams relationship. /// @@ -128,16 +109,10 @@ public RequestInformation ToHeadRequestInformation(ActionFor syntax, see the documentation for the [`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// @@ -145,16 +120,10 @@ public partial class AudioStreamsRequestBuilderGetQueryParameters public partial class AudioStreamsRequestBuilderHeadQueryParameters { /// For syntax, see the documentation for the [`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/ReadOnlyChannels/Item/Relationships/RelationshipsRequestBuilder.cs b/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/ReadOnlyChannels/Item/Relationships/RelationshipsRequestBuilder.cs index bc667bc73..c495897fd 100644 --- a/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/ReadOnlyChannels/Item/Relationships/RelationshipsRequestBuilder.cs +++ b/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/ReadOnlyChannels/Item/Relationships/RelationshipsRequestBuilder.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions; @@ -22,16 +24,19 @@ public partial class RelationshipsRequestBuilder : BaseRequestBuilder { get => new global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.ReadOnlyChannels.Item.Relationships.AudioStreams.AudioStreamsRequestBuilder(PathParameters, RequestAdapter); } + /// The ultraHighDefinitionVideoStream property public global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.ReadOnlyChannels.Item.Relationships.UltraHighDefinitionVideoStream.UltraHighDefinitionVideoStreamRequestBuilder UltraHighDefinitionVideoStream { get => new global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.ReadOnlyChannels.Item.Relationships.UltraHighDefinitionVideoStream.UltraHighDefinitionVideoStreamRequestBuilder(PathParameters, RequestAdapter); } + /// The videoStream property public global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.ReadOnlyChannels.Item.Relationships.VideoStream.VideoStreamRequestBuilder VideoStream { get => new global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.ReadOnlyChannels.Item.Relationships.VideoStream.VideoStreamRequestBuilder(PathParameters, RequestAdapter); } + /// /// Instantiates a new and sets the default values. /// @@ -40,6 +45,7 @@ public partial class RelationshipsRequestBuilder : BaseRequestBuilder public RelationshipsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/readOnlyChannels/{id}/relationships", pathParameters) { } + /// /// Instantiates a new and sets the default values. /// @@ -51,3 +57,4 @@ public RelationshipsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/ReadOnlyChannels/Item/Relationships/UltraHighDefinitionVideoStream/UltraHighDefinitionVideoStreamRequestBuilder.cs b/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/ReadOnlyChannels/Item/Relationships/UltraHighDefinitionVideoStream/UltraHighDefinitionVideoStreamRequestBuilder.cs index aedc4e1d6..09a2bdd77 100644 --- a/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/ReadOnlyChannels/Item/Relationships/UltraHighDefinitionVideoStream/UltraHighDefinitionVideoStreamRequestBuilder.cs +++ b/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/ReadOnlyChannels/Item/Relationships/UltraHighDefinitionVideoStream/UltraHighDefinitionVideoStreamRequestBuilder.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -25,6 +27,7 @@ public partial class UltraHighDefinitionVideoStreamRequestBuilder : BaseRequestB public UltraHighDefinitionVideoStreamRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/readOnlyChannels/{id}/relationships/ultraHighDefinitionVideoStream{?query*}", pathParameters) { } + /// /// Instantiates a new and sets the default values. /// @@ -33,6 +36,7 @@ public UltraHighDefinitionVideoStreamRequestBuilder(Dictionary p public UltraHighDefinitionVideoStreamRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/readOnlyChannels/{id}/relationships/ultraHighDefinitionVideoStream{?query*}", rawUrl) { } + /// /// Retrieves the related dataStream identity of an individual readOnlyChannel's ultraHighDefinitionVideoStream relationship. /// @@ -41,15 +45,8 @@ public UltraHighDefinitionVideoStreamRequestBuilder(string rawUrl, IRequestAdapt /// Configuration for the request such as headers, query parameters, and middleware options. /// When receiving a 400 status code /// When receiving a 404 status code -#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> { @@ -58,60 +55,43 @@ public UltraHighDefinitionVideoStreamRequestBuilder(string rawUrl, IRequestAdapt }; return await RequestAdapter.SendAsync(requestInfo, global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.NullableDataStreamIdentifierResponseDocument.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// /// 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 HeadAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { -#nullable restore -#else - public async Task HeadAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) - { -#endif var requestInfo = ToHeadRequestInformation(requestConfiguration); await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); } + /// /// Retrieves the related dataStream identity of an individual readOnlyChannel's ultraHighDefinitionVideoStream relationship. /// /// A /// 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(Method.GET, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/vnd.api+json"); return requestInfo; } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// /// A /// 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 ToHeadRequestInformation(Action>? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToHeadRequestInformation(Action> requestConfiguration = default) - { -#endif var requestInfo = new RequestInformation(Method.HEAD, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); return requestInfo; } + /// /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. /// @@ -121,6 +101,7 @@ public RequestInformation ToHeadRequestInformation(Action /// Retrieves the related dataStream identity of an individual readOnlyChannel's ultraHighDefinitionVideoStream relationship. /// @@ -128,16 +109,10 @@ public RequestInformation ToHeadRequestInformation(ActionFor syntax, see the documentation for the [`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// @@ -145,16 +120,10 @@ public partial class UltraHighDefinitionVideoStreamRequestBuilderGetQueryParamet public partial class UltraHighDefinitionVideoStreamRequestBuilderHeadQueryParameters { /// For syntax, see the documentation for the [`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/ReadOnlyChannels/Item/Relationships/VideoStream/VideoStreamRequestBuilder.cs b/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/ReadOnlyChannels/Item/Relationships/VideoStream/VideoStreamRequestBuilder.cs index b2e51e8c3..6c8fad748 100644 --- a/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/ReadOnlyChannels/Item/Relationships/VideoStream/VideoStreamRequestBuilder.cs +++ b/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/ReadOnlyChannels/Item/Relationships/VideoStream/VideoStreamRequestBuilder.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -25,6 +27,7 @@ public partial class VideoStreamRequestBuilder : BaseRequestBuilder public VideoStreamRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/readOnlyChannels/{id}/relationships/videoStream{?query*}", pathParameters) { } + /// /// Instantiates a new and sets the default values. /// @@ -33,6 +36,7 @@ public VideoStreamRequestBuilder(Dictionary pathParameters, IReq public VideoStreamRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/readOnlyChannels/{id}/relationships/videoStream{?query*}", rawUrl) { } + /// /// Retrieves the related dataStream identity of an individual readOnlyChannel's videoStream relationship. /// @@ -41,15 +45,8 @@ public VideoStreamRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) /// Configuration for the request such as headers, query parameters, and middleware options. /// When receiving a 400 status code /// When receiving a 404 status code -#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> { @@ -58,60 +55,43 @@ public VideoStreamRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) }; return await RequestAdapter.SendAsync(requestInfo, global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.DataStreamIdentifierResponseDocument.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// /// 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 HeadAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { -#nullable restore -#else - public async Task HeadAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) - { -#endif var requestInfo = ToHeadRequestInformation(requestConfiguration); await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); } + /// /// Retrieves the related dataStream identity of an individual readOnlyChannel's videoStream relationship. /// /// A /// 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(Method.GET, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/vnd.api+json"); return requestInfo; } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// /// A /// 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 ToHeadRequestInformation(Action>? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToHeadRequestInformation(Action> requestConfiguration = default) - { -#endif var requestInfo = new RequestInformation(Method.HEAD, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); return requestInfo; } + /// /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. /// @@ -121,6 +101,7 @@ public RequestInformation ToHeadRequestInformation(Action /// Retrieves the related dataStream identity of an individual readOnlyChannel's videoStream relationship. /// @@ -128,16 +109,10 @@ public RequestInformation ToHeadRequestInformation(ActionFor syntax, see the documentation for the [`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// @@ -145,16 +120,10 @@ public partial class VideoStreamRequestBuilderGetQueryParameters public partial class VideoStreamRequestBuilderHeadQueryParameters { /// For syntax, see the documentation for the [`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/ReadOnlyChannels/Item/UltraHighDefinitionVideoStream/UltraHighDefinitionVideoStreamRequestBuilder.cs b/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/ReadOnlyChannels/Item/UltraHighDefinitionVideoStream/UltraHighDefinitionVideoStreamRequestBuilder.cs index 94db7810a..d9dd05ebb 100644 --- a/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/ReadOnlyChannels/Item/UltraHighDefinitionVideoStream/UltraHighDefinitionVideoStreamRequestBuilder.cs +++ b/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/ReadOnlyChannels/Item/UltraHighDefinitionVideoStream/UltraHighDefinitionVideoStreamRequestBuilder.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -25,6 +27,7 @@ public partial class UltraHighDefinitionVideoStreamRequestBuilder : BaseRequestB public UltraHighDefinitionVideoStreamRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/readOnlyChannels/{id}/ultraHighDefinitionVideoStream{?query*}", pathParameters) { } + /// /// Instantiates a new and sets the default values. /// @@ -33,6 +36,7 @@ public UltraHighDefinitionVideoStreamRequestBuilder(Dictionary p public UltraHighDefinitionVideoStreamRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/readOnlyChannels/{id}/ultraHighDefinitionVideoStream{?query*}", rawUrl) { } + /// /// Retrieves the related dataStream of an individual readOnlyChannel's ultraHighDefinitionVideoStream relationship. /// @@ -41,15 +45,8 @@ public UltraHighDefinitionVideoStreamRequestBuilder(string rawUrl, IRequestAdapt /// Configuration for the request such as headers, query parameters, and middleware options. /// When receiving a 400 status code /// When receiving a 404 status code -#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> { @@ -58,60 +55,43 @@ public UltraHighDefinitionVideoStreamRequestBuilder(string rawUrl, IRequestAdapt }; return await RequestAdapter.SendAsync(requestInfo, global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.NullableDataStreamSecondaryResponseDocument.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// /// 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 HeadAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { -#nullable restore -#else - public async Task HeadAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) - { -#endif var requestInfo = ToHeadRequestInformation(requestConfiguration); await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); } + /// /// Retrieves the related dataStream of an individual readOnlyChannel's ultraHighDefinitionVideoStream relationship. /// /// A /// 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(Method.GET, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/vnd.api+json"); return requestInfo; } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// /// A /// 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 ToHeadRequestInformation(Action>? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToHeadRequestInformation(Action> requestConfiguration = default) - { -#endif var requestInfo = new RequestInformation(Method.HEAD, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); return requestInfo; } + /// /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. /// @@ -121,6 +101,7 @@ public RequestInformation ToHeadRequestInformation(Action /// Retrieves the related dataStream of an individual readOnlyChannel's ultraHighDefinitionVideoStream relationship. /// @@ -128,16 +109,10 @@ public RequestInformation ToHeadRequestInformation(ActionFor syntax, see the documentation for the [`include`](https://www.jsonapi.net/usage/reading/including-relationships.html)/[`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// @@ -145,16 +120,10 @@ public partial class UltraHighDefinitionVideoStreamRequestBuilderGetQueryParamet public partial class UltraHighDefinitionVideoStreamRequestBuilderHeadQueryParameters { /// For syntax, see the documentation for the [`include`](https://www.jsonapi.net/usage/reading/including-relationships.html)/[`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/ReadOnlyChannels/Item/VideoStream/VideoStreamRequestBuilder.cs b/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/ReadOnlyChannels/Item/VideoStream/VideoStreamRequestBuilder.cs index e8c0364a4..0e72e1d2f 100644 --- a/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/ReadOnlyChannels/Item/VideoStream/VideoStreamRequestBuilder.cs +++ b/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/ReadOnlyChannels/Item/VideoStream/VideoStreamRequestBuilder.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -25,6 +27,7 @@ public partial class VideoStreamRequestBuilder : BaseRequestBuilder public VideoStreamRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/readOnlyChannels/{id}/videoStream{?query*}", pathParameters) { } + /// /// Instantiates a new and sets the default values. /// @@ -33,6 +36,7 @@ public VideoStreamRequestBuilder(Dictionary pathParameters, IReq public VideoStreamRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/readOnlyChannels/{id}/videoStream{?query*}", rawUrl) { } + /// /// Retrieves the related dataStream of an individual readOnlyChannel's videoStream relationship. /// @@ -41,15 +45,8 @@ public VideoStreamRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) /// Configuration for the request such as headers, query parameters, and middleware options. /// When receiving a 400 status code /// When receiving a 404 status code -#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> { @@ -58,60 +55,43 @@ public VideoStreamRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) }; return await RequestAdapter.SendAsync(requestInfo, global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.DataStreamSecondaryResponseDocument.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// /// 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 HeadAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { -#nullable restore -#else - public async Task HeadAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) - { -#endif var requestInfo = ToHeadRequestInformation(requestConfiguration); await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); } + /// /// Retrieves the related dataStream of an individual readOnlyChannel's videoStream relationship. /// /// A /// 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(Method.GET, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/vnd.api+json"); return requestInfo; } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// /// A /// 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 ToHeadRequestInformation(Action>? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToHeadRequestInformation(Action> requestConfiguration = default) - { -#endif var requestInfo = new RequestInformation(Method.HEAD, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); return requestInfo; } + /// /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. /// @@ -121,6 +101,7 @@ public RequestInformation ToHeadRequestInformation(Action /// Retrieves the related dataStream of an individual readOnlyChannel's videoStream relationship. /// @@ -128,16 +109,10 @@ public RequestInformation ToHeadRequestInformation(ActionFor syntax, see the documentation for the [`include`](https://www.jsonapi.net/usage/reading/including-relationships.html)/[`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// @@ -145,16 +120,10 @@ public partial class VideoStreamRequestBuilderGetQueryParameters public partial class VideoStreamRequestBuilderHeadQueryParameters { /// For syntax, see the documentation for the [`include`](https://www.jsonapi.net/usage/reading/including-relationships.html)/[`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/ReadOnlyChannels/ReadOnlyChannelsRequestBuilder.cs b/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/ReadOnlyChannels/ReadOnlyChannelsRequestBuilder.cs index de896e7d2..ebffdd8f8 100644 --- a/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/ReadOnlyChannels/ReadOnlyChannelsRequestBuilder.cs +++ b/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/ReadOnlyChannels/ReadOnlyChannelsRequestBuilder.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -30,6 +32,7 @@ public partial class ReadOnlyChannelsRequestBuilder : BaseRequestBuilder return new global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.ReadOnlyChannels.Item.ReadOnlyChannelsItemRequestBuilder(urlTplParams, RequestAdapter); } } + /// /// Instantiates a new and sets the default values. /// @@ -38,6 +41,7 @@ public partial class ReadOnlyChannelsRequestBuilder : BaseRequestBuilder public ReadOnlyChannelsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/readOnlyChannels{?query*}", pathParameters) { } + /// /// Instantiates a new and sets the default values. /// @@ -46,6 +50,7 @@ public ReadOnlyChannelsRequestBuilder(Dictionary pathParameters, public ReadOnlyChannelsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/readOnlyChannels{?query*}", rawUrl) { } + /// /// Retrieves a collection of readOnlyChannels. /// @@ -53,15 +58,8 @@ public ReadOnlyChannelsRequestBuilder(string rawUrl, IRequestAdapter requestAdap /// Cancellation token to use when cancelling requests /// Configuration for the request such as headers, query parameters, and middleware options. /// When receiving a 400 status code -#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> { @@ -69,60 +67,43 @@ public ReadOnlyChannelsRequestBuilder(string rawUrl, IRequestAdapter requestAdap }; return await RequestAdapter.SendAsync(requestInfo, global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.ReadOnlyChannelCollectionResponseDocument.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// /// 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 HeadAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { -#nullable restore -#else - public async Task HeadAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) - { -#endif var requestInfo = ToHeadRequestInformation(requestConfiguration); await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); } + /// /// Retrieves a collection of readOnlyChannels. /// /// A /// 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(Method.GET, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/vnd.api+json"); return requestInfo; } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// /// A /// 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 ToHeadRequestInformation(Action>? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToHeadRequestInformation(Action> requestConfiguration = default) - { -#endif var requestInfo = new RequestInformation(Method.HEAD, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); return requestInfo; } + /// /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. /// @@ -132,6 +113,7 @@ public RequestInformation ToHeadRequestInformation(Action /// Retrieves a collection of readOnlyChannels. /// @@ -139,16 +121,10 @@ public RequestInformation ToHeadRequestInformation(ActionFor syntax, see the documentation for the [`include`](https://www.jsonapi.net/usage/reading/including-relationships.html)/[`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// @@ -156,16 +132,10 @@ public partial class ReadOnlyChannelsRequestBuilderGetQueryParameters public partial class ReadOnlyChannelsRequestBuilderHeadQueryParameters { /// For syntax, see the documentation for the [`include`](https://www.jsonapi.net/usage/reading/including-relationships.html)/[`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/ReadOnlyResourceChannels/Item/AudioStreams/AudioStreamsRequestBuilder.cs b/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/ReadOnlyResourceChannels/Item/AudioStreams/AudioStreamsRequestBuilder.cs index c6039918a..4f9519fea 100644 --- a/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/ReadOnlyResourceChannels/Item/AudioStreams/AudioStreamsRequestBuilder.cs +++ b/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/ReadOnlyResourceChannels/Item/AudioStreams/AudioStreamsRequestBuilder.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -25,6 +27,7 @@ public partial class AudioStreamsRequestBuilder : BaseRequestBuilder public AudioStreamsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/readOnlyResourceChannels/{id}/audioStreams{?query*}", pathParameters) { } + /// /// Instantiates a new and sets the default values. /// @@ -33,6 +36,7 @@ public AudioStreamsRequestBuilder(Dictionary pathParameters, IRe public AudioStreamsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/readOnlyResourceChannels/{id}/audioStreams{?query*}", rawUrl) { } + /// /// Retrieves the related dataStreams of an individual readOnlyResourceChannel's audioStreams relationship. /// @@ -41,15 +45,8 @@ public AudioStreamsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) /// Configuration for the request such as headers, query parameters, and middleware options. /// When receiving a 400 status code /// When receiving a 404 status code -#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> { @@ -58,60 +55,43 @@ public AudioStreamsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) }; return await RequestAdapter.SendAsync(requestInfo, global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.DataStreamCollectionResponseDocument.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// /// 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 HeadAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { -#nullable restore -#else - public async Task HeadAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) - { -#endif var requestInfo = ToHeadRequestInformation(requestConfiguration); await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); } + /// /// Retrieves the related dataStreams of an individual readOnlyResourceChannel's audioStreams relationship. /// /// A /// 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(Method.GET, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/vnd.api+json"); return requestInfo; } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// /// A /// 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 ToHeadRequestInformation(Action>? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToHeadRequestInformation(Action> requestConfiguration = default) - { -#endif var requestInfo = new RequestInformation(Method.HEAD, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); return requestInfo; } + /// /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. /// @@ -121,6 +101,7 @@ public RequestInformation ToHeadRequestInformation(Action /// Retrieves the related dataStreams of an individual readOnlyResourceChannel's audioStreams relationship. /// @@ -128,16 +109,10 @@ public RequestInformation ToHeadRequestInformation(ActionFor syntax, see the documentation for the [`include`](https://www.jsonapi.net/usage/reading/including-relationships.html)/[`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// @@ -145,16 +120,10 @@ public partial class AudioStreamsRequestBuilderGetQueryParameters public partial class AudioStreamsRequestBuilderHeadQueryParameters { /// For syntax, see the documentation for the [`include`](https://www.jsonapi.net/usage/reading/including-relationships.html)/[`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/ReadOnlyResourceChannels/Item/ReadOnlyResourceChannelsItemRequestBuilder.cs b/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/ReadOnlyResourceChannels/Item/ReadOnlyResourceChannelsItemRequestBuilder.cs index 199d1be9f..c440a63fe 100644 --- a/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/ReadOnlyResourceChannels/Item/ReadOnlyResourceChannelsItemRequestBuilder.cs +++ b/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/ReadOnlyResourceChannels/Item/ReadOnlyResourceChannelsItemRequestBuilder.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -25,16 +27,19 @@ public partial class ReadOnlyResourceChannelsItemRequestBuilder : BaseRequestBui { get => new global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.ReadOnlyResourceChannels.Item.AudioStreams.AudioStreamsRequestBuilder(PathParameters, RequestAdapter); } + /// The ultraHighDefinitionVideoStream property public global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.ReadOnlyResourceChannels.Item.UltraHighDefinitionVideoStream.UltraHighDefinitionVideoStreamRequestBuilder UltraHighDefinitionVideoStream { get => new global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.ReadOnlyResourceChannels.Item.UltraHighDefinitionVideoStream.UltraHighDefinitionVideoStreamRequestBuilder(PathParameters, RequestAdapter); } + /// The videoStream property public global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.ReadOnlyResourceChannels.Item.VideoStream.VideoStreamRequestBuilder VideoStream { get => new global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.ReadOnlyResourceChannels.Item.VideoStream.VideoStreamRequestBuilder(PathParameters, RequestAdapter); } + /// /// Instantiates a new and sets the default values. /// @@ -43,6 +48,7 @@ public partial class ReadOnlyResourceChannelsItemRequestBuilder : BaseRequestBui public ReadOnlyResourceChannelsItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/readOnlyResourceChannels/{id}{?query*}", pathParameters) { } + /// /// Instantiates a new and sets the default values. /// @@ -51,6 +57,7 @@ public ReadOnlyResourceChannelsItemRequestBuilder(Dictionary pat public ReadOnlyResourceChannelsItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/readOnlyResourceChannels/{id}{?query*}", rawUrl) { } + /// /// Retrieves an individual readOnlyResourceChannel by its identifier. /// @@ -59,15 +66,8 @@ public ReadOnlyResourceChannelsItemRequestBuilder(string rawUrl, IRequestAdapter /// Configuration for the request such as headers, query parameters, and middleware options. /// When receiving a 400 status code /// When receiving a 404 status code -#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> { @@ -76,60 +76,43 @@ public ReadOnlyResourceChannelsItemRequestBuilder(string rawUrl, IRequestAdapter }; return await RequestAdapter.SendAsync(requestInfo, global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.ReadOnlyResourceChannelPrimaryResponseDocument.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// /// 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 HeadAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { -#nullable restore -#else - public async Task HeadAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) - { -#endif var requestInfo = ToHeadRequestInformation(requestConfiguration); await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); } + /// /// Retrieves an individual readOnlyResourceChannel by its identifier. /// /// A /// 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(Method.GET, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/vnd.api+json"); return requestInfo; } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// /// A /// 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 ToHeadRequestInformation(Action>? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToHeadRequestInformation(Action> requestConfiguration = default) - { -#endif var requestInfo = new RequestInformation(Method.HEAD, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); return requestInfo; } + /// /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. /// @@ -139,6 +122,7 @@ public RequestInformation ToHeadRequestInformation(Action /// Retrieves an individual readOnlyResourceChannel by its identifier. /// @@ -146,16 +130,10 @@ public RequestInformation ToHeadRequestInformation(ActionFor syntax, see the documentation for the [`include`](https://www.jsonapi.net/usage/reading/including-relationships.html)/[`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// @@ -163,16 +141,10 @@ public partial class ReadOnlyResourceChannelsItemRequestBuilderGetQueryParameter public partial class ReadOnlyResourceChannelsItemRequestBuilderHeadQueryParameters { /// For syntax, see the documentation for the [`include`](https://www.jsonapi.net/usage/reading/including-relationships.html)/[`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/ReadOnlyResourceChannels/Item/UltraHighDefinitionVideoStream/UltraHighDefinitionVideoStreamRequestBuilder.cs b/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/ReadOnlyResourceChannels/Item/UltraHighDefinitionVideoStream/UltraHighDefinitionVideoStreamRequestBuilder.cs index e6ef12289..e5327c976 100644 --- a/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/ReadOnlyResourceChannels/Item/UltraHighDefinitionVideoStream/UltraHighDefinitionVideoStreamRequestBuilder.cs +++ b/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/ReadOnlyResourceChannels/Item/UltraHighDefinitionVideoStream/UltraHighDefinitionVideoStreamRequestBuilder.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -25,6 +27,7 @@ public partial class UltraHighDefinitionVideoStreamRequestBuilder : BaseRequestB public UltraHighDefinitionVideoStreamRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/readOnlyResourceChannels/{id}/ultraHighDefinitionVideoStream{?query*}", pathParameters) { } + /// /// Instantiates a new and sets the default values. /// @@ -33,6 +36,7 @@ public UltraHighDefinitionVideoStreamRequestBuilder(Dictionary p public UltraHighDefinitionVideoStreamRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/readOnlyResourceChannels/{id}/ultraHighDefinitionVideoStream{?query*}", rawUrl) { } + /// /// Retrieves the related dataStream of an individual readOnlyResourceChannel's ultraHighDefinitionVideoStream relationship. /// @@ -41,15 +45,8 @@ public UltraHighDefinitionVideoStreamRequestBuilder(string rawUrl, IRequestAdapt /// Configuration for the request such as headers, query parameters, and middleware options. /// When receiving a 400 status code /// When receiving a 404 status code -#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> { @@ -58,60 +55,43 @@ public UltraHighDefinitionVideoStreamRequestBuilder(string rawUrl, IRequestAdapt }; return await RequestAdapter.SendAsync(requestInfo, global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.NullableDataStreamSecondaryResponseDocument.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// /// 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 HeadAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { -#nullable restore -#else - public async Task HeadAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) - { -#endif var requestInfo = ToHeadRequestInformation(requestConfiguration); await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); } + /// /// Retrieves the related dataStream of an individual readOnlyResourceChannel's ultraHighDefinitionVideoStream relationship. /// /// A /// 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(Method.GET, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/vnd.api+json"); return requestInfo; } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// /// A /// 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 ToHeadRequestInformation(Action>? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToHeadRequestInformation(Action> requestConfiguration = default) - { -#endif var requestInfo = new RequestInformation(Method.HEAD, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); return requestInfo; } + /// /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. /// @@ -121,6 +101,7 @@ public RequestInformation ToHeadRequestInformation(Action /// Retrieves the related dataStream of an individual readOnlyResourceChannel's ultraHighDefinitionVideoStream relationship. /// @@ -128,16 +109,10 @@ public RequestInformation ToHeadRequestInformation(ActionFor syntax, see the documentation for the [`include`](https://www.jsonapi.net/usage/reading/including-relationships.html)/[`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// @@ -145,16 +120,10 @@ public partial class UltraHighDefinitionVideoStreamRequestBuilderGetQueryParamet public partial class UltraHighDefinitionVideoStreamRequestBuilderHeadQueryParameters { /// For syntax, see the documentation for the [`include`](https://www.jsonapi.net/usage/reading/including-relationships.html)/[`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/ReadOnlyResourceChannels/Item/VideoStream/VideoStreamRequestBuilder.cs b/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/ReadOnlyResourceChannels/Item/VideoStream/VideoStreamRequestBuilder.cs index f3cd83827..072069432 100644 --- a/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/ReadOnlyResourceChannels/Item/VideoStream/VideoStreamRequestBuilder.cs +++ b/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/ReadOnlyResourceChannels/Item/VideoStream/VideoStreamRequestBuilder.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -25,6 +27,7 @@ public partial class VideoStreamRequestBuilder : BaseRequestBuilder public VideoStreamRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/readOnlyResourceChannels/{id}/videoStream{?query*}", pathParameters) { } + /// /// Instantiates a new and sets the default values. /// @@ -33,6 +36,7 @@ public VideoStreamRequestBuilder(Dictionary pathParameters, IReq public VideoStreamRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/readOnlyResourceChannels/{id}/videoStream{?query*}", rawUrl) { } + /// /// Retrieves the related dataStream of an individual readOnlyResourceChannel's videoStream relationship. /// @@ -41,15 +45,8 @@ public VideoStreamRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) /// Configuration for the request such as headers, query parameters, and middleware options. /// When receiving a 400 status code /// When receiving a 404 status code -#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> { @@ -58,60 +55,43 @@ public VideoStreamRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) }; return await RequestAdapter.SendAsync(requestInfo, global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.DataStreamSecondaryResponseDocument.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// /// 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 HeadAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { -#nullable restore -#else - public async Task HeadAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) - { -#endif var requestInfo = ToHeadRequestInformation(requestConfiguration); await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); } + /// /// Retrieves the related dataStream of an individual readOnlyResourceChannel's videoStream relationship. /// /// A /// 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(Method.GET, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/vnd.api+json"); return requestInfo; } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// /// A /// 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 ToHeadRequestInformation(Action>? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToHeadRequestInformation(Action> requestConfiguration = default) - { -#endif var requestInfo = new RequestInformation(Method.HEAD, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); return requestInfo; } + /// /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. /// @@ -121,6 +101,7 @@ public RequestInformation ToHeadRequestInformation(Action /// Retrieves the related dataStream of an individual readOnlyResourceChannel's videoStream relationship. /// @@ -128,16 +109,10 @@ public RequestInformation ToHeadRequestInformation(ActionFor syntax, see the documentation for the [`include`](https://www.jsonapi.net/usage/reading/including-relationships.html)/[`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// @@ -145,16 +120,10 @@ public partial class VideoStreamRequestBuilderGetQueryParameters public partial class VideoStreamRequestBuilderHeadQueryParameters { /// For syntax, see the documentation for the [`include`](https://www.jsonapi.net/usage/reading/including-relationships.html)/[`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/ReadOnlyResourceChannels/ReadOnlyResourceChannelsRequestBuilder.cs b/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/ReadOnlyResourceChannels/ReadOnlyResourceChannelsRequestBuilder.cs index cbeaad426..7b002cf40 100644 --- a/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/ReadOnlyResourceChannels/ReadOnlyResourceChannelsRequestBuilder.cs +++ b/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/ReadOnlyResourceChannels/ReadOnlyResourceChannelsRequestBuilder.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -30,6 +32,7 @@ public partial class ReadOnlyResourceChannelsRequestBuilder : BaseRequestBuilder return new global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.ReadOnlyResourceChannels.Item.ReadOnlyResourceChannelsItemRequestBuilder(urlTplParams, RequestAdapter); } } + /// /// Instantiates a new and sets the default values. /// @@ -38,6 +41,7 @@ public partial class ReadOnlyResourceChannelsRequestBuilder : BaseRequestBuilder public ReadOnlyResourceChannelsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/readOnlyResourceChannels{?query*}", pathParameters) { } + /// /// Instantiates a new and sets the default values. /// @@ -46,6 +50,7 @@ public ReadOnlyResourceChannelsRequestBuilder(Dictionary pathPar public ReadOnlyResourceChannelsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/readOnlyResourceChannels{?query*}", rawUrl) { } + /// /// Retrieves a collection of readOnlyResourceChannels. /// @@ -53,15 +58,8 @@ public ReadOnlyResourceChannelsRequestBuilder(string rawUrl, IRequestAdapter req /// Cancellation token to use when cancelling requests /// Configuration for the request such as headers, query parameters, and middleware options. /// When receiving a 400 status code -#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> { @@ -69,60 +67,43 @@ public ReadOnlyResourceChannelsRequestBuilder(string rawUrl, IRequestAdapter req }; return await RequestAdapter.SendAsync(requestInfo, global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.ReadOnlyResourceChannelCollectionResponseDocument.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// /// 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 HeadAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { -#nullable restore -#else - public async Task HeadAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) - { -#endif var requestInfo = ToHeadRequestInformation(requestConfiguration); await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); } + /// /// Retrieves a collection of readOnlyResourceChannels. /// /// A /// 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(Method.GET, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/vnd.api+json"); return requestInfo; } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// /// A /// 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 ToHeadRequestInformation(Action>? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToHeadRequestInformation(Action> requestConfiguration = default) - { -#endif var requestInfo = new RequestInformation(Method.HEAD, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); return requestInfo; } + /// /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. /// @@ -132,6 +113,7 @@ public RequestInformation ToHeadRequestInformation(Action /// Retrieves a collection of readOnlyResourceChannels. /// @@ -139,16 +121,10 @@ public RequestInformation ToHeadRequestInformation(ActionFor syntax, see the documentation for the [`include`](https://www.jsonapi.net/usage/reading/including-relationships.html)/[`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// @@ -156,16 +132,10 @@ public partial class ReadOnlyResourceChannelsRequestBuilderGetQueryParameters public partial class ReadOnlyResourceChannelsRequestBuilderHeadQueryParameters { /// For syntax, see the documentation for the [`include`](https://www.jsonapi.net/usage/reading/including-relationships.html)/[`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/RelationshipChannels/Item/RelationshipChannelsItemRequestBuilder.cs b/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/RelationshipChannels/Item/RelationshipChannelsItemRequestBuilder.cs index f25573ac6..b2bc1f32e 100644 --- a/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/RelationshipChannels/Item/RelationshipChannelsItemRequestBuilder.cs +++ b/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/RelationshipChannels/Item/RelationshipChannelsItemRequestBuilder.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions; @@ -20,6 +22,7 @@ public partial class RelationshipChannelsItemRequestBuilder : BaseRequestBuilder { get => new global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.RelationshipChannels.Item.Relationships.RelationshipsRequestBuilder(PathParameters, RequestAdapter); } + /// /// Instantiates a new and sets the default values. /// @@ -28,6 +31,7 @@ public partial class RelationshipChannelsItemRequestBuilder : BaseRequestBuilder public RelationshipChannelsItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/relationshipChannels/{id}", pathParameters) { } + /// /// Instantiates a new and sets the default values. /// @@ -39,3 +43,4 @@ public RelationshipChannelsItemRequestBuilder(string rawUrl, IRequestAdapter req } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/RelationshipChannels/Item/Relationships/AudioStreams/AudioStreamsRequestBuilder.cs b/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/RelationshipChannels/Item/Relationships/AudioStreams/AudioStreamsRequestBuilder.cs index c160f1dba..e216fe4c7 100644 --- a/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/RelationshipChannels/Item/Relationships/AudioStreams/AudioStreamsRequestBuilder.cs +++ b/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/RelationshipChannels/Item/Relationships/AudioStreams/AudioStreamsRequestBuilder.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -25,6 +27,7 @@ public partial class AudioStreamsRequestBuilder : BaseRequestBuilder public AudioStreamsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/relationshipChannels/{id}/relationships/audioStreams{?query*}", pathParameters) { } + /// /// Instantiates a new and sets the default values. /// @@ -33,6 +36,7 @@ public AudioStreamsRequestBuilder(Dictionary pathParameters, IRe public AudioStreamsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/relationshipChannels/{id}/relationships/audioStreams{?query*}", rawUrl) { } + /// /// Removes existing dataStreams from the audioStreams relationship of an individual relationshipChannel. /// @@ -42,15 +46,8 @@ public AudioStreamsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) /// When receiving a 400 status code /// When receiving a 404 status code /// When receiving a 409 status code -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public async Task DeleteAsync(global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.ToManyDataStreamInRequest body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { -#nullable restore -#else - public async Task DeleteAsync(global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.ToManyDataStreamInRequest body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) - { -#endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = ToDeleteRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> @@ -61,6 +58,7 @@ public async Task DeleteAsync(global::OpenApiKiotaEndToEndTests.RestrictedContro }; await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); } + /// /// Retrieves the related dataStream identities of an individual relationshipChannel's audioStreams relationship. /// @@ -69,15 +67,8 @@ public async Task DeleteAsync(global::OpenApiKiotaEndToEndTests.RestrictedContro /// Configuration for the request such as headers, query parameters, and middleware options. /// When receiving a 400 status code /// When receiving a 404 status code -#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> { @@ -86,23 +77,18 @@ public async Task DeleteAsync(global::OpenApiKiotaEndToEndTests.RestrictedContro }; return await RequestAdapter.SendAsync(requestInfo, global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.DataStreamIdentifierCollectionResponseDocument.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// /// 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 HeadAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { -#nullable restore -#else - public async Task HeadAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) - { -#endif var requestInfo = ToHeadRequestInformation(requestConfiguration); await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); } + /// /// Assigns existing dataStreams to the audioStreams relationship of an individual relationshipChannel. /// @@ -112,15 +98,8 @@ public async Task HeadAsync(ActionWhen receiving a 400 status code /// When receiving a 404 status code /// When receiving a 409 status code -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public async Task PatchAsync(global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.ToManyDataStreamInRequest body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { -#nullable restore -#else - public async Task PatchAsync(global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.ToManyDataStreamInRequest body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) - { -#endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> @@ -131,6 +110,7 @@ public async Task PatchAsync(global::OpenApiKiotaEndToEndTests.RestrictedControl }; await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); } + /// /// Adds existing dataStreams to the audioStreams relationship of an individual relationshipChannel. /// @@ -140,15 +120,8 @@ public async Task PatchAsync(global::OpenApiKiotaEndToEndTests.RestrictedControl /// When receiving a 400 status code /// When receiving a 404 status code /// When receiving a 409 status code -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public async Task PostAsync(global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.ToManyDataStreamInRequest body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { -#nullable restore -#else - public async Task PostAsync(global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.ToManyDataStreamInRequest body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) - { -#endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> @@ -159,21 +132,15 @@ public async Task PostAsync(global::OpenApiKiotaEndToEndTests.RestrictedControll }; await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); } + /// /// Removes existing dataStreams from the audioStreams relationship of an individual relationshipChannel. /// /// A /// 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 ToDeleteRequestInformation(global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.ToManyDataStreamInRequest body, Action>? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToDeleteRequestInformation(global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.ToManyDataStreamInRequest body, Action> requestConfiguration = default) - { -#endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); @@ -181,58 +148,40 @@ public RequestInformation ToDeleteRequestInformation(global::OpenApiKiotaEndToEn requestInfo.SetContentFromParsable(RequestAdapter, "application/vnd.api+json", body); return requestInfo; } + /// /// Retrieves the related dataStream identities of an individual relationshipChannel's audioStreams relationship. /// /// A /// 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(Method.GET, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/vnd.api+json"); return requestInfo; } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// /// A /// 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 ToHeadRequestInformation(Action>? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToHeadRequestInformation(Action> requestConfiguration = default) - { -#endif var requestInfo = new RequestInformation(Method.HEAD, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); return requestInfo; } + /// /// Assigns existing dataStreams to the audioStreams relationship of an individual relationshipChannel. /// /// A /// 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(global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.ToManyDataStreamInRequest body, Action>? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToPatchRequestInformation(global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.ToManyDataStreamInRequest body, Action> requestConfiguration = default) - { -#endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); @@ -240,21 +189,15 @@ public RequestInformation ToPatchRequestInformation(global::OpenApiKiotaEndToEnd requestInfo.SetContentFromParsable(RequestAdapter, "application/vnd.api+json", body); return requestInfo; } + /// /// Adds existing dataStreams to the audioStreams relationship of an individual relationshipChannel. /// /// A /// 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(global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.ToManyDataStreamInRequest body, Action>? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToPostRequestInformation(global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.ToManyDataStreamInRequest body, Action> requestConfiguration = default) - { -#endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); @@ -262,6 +205,7 @@ public RequestInformation ToPostRequestInformation(global::OpenApiKiotaEndToEndT requestInfo.SetContentFromParsable(RequestAdapter, "application/vnd.api+json", body); return requestInfo; } + /// /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. /// @@ -271,6 +215,7 @@ public RequestInformation ToPostRequestInformation(global::OpenApiKiotaEndToEndT { return new global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.RelationshipChannels.Item.Relationships.AudioStreams.AudioStreamsRequestBuilder(rawUrl, RequestAdapter); } + /// /// Retrieves the related dataStream identities of an individual relationshipChannel's audioStreams relationship. /// @@ -278,16 +223,10 @@ public RequestInformation ToPostRequestInformation(global::OpenApiKiotaEndToEndT public partial class AudioStreamsRequestBuilderGetQueryParameters { /// For syntax, see the documentation for the [`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// @@ -295,16 +234,10 @@ public partial class AudioStreamsRequestBuilderGetQueryParameters public partial class AudioStreamsRequestBuilderHeadQueryParameters { /// For syntax, see the documentation for the [`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/RelationshipChannels/Item/Relationships/RelationshipsRequestBuilder.cs b/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/RelationshipChannels/Item/Relationships/RelationshipsRequestBuilder.cs index 91e2dc312..690947977 100644 --- a/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/RelationshipChannels/Item/Relationships/RelationshipsRequestBuilder.cs +++ b/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/RelationshipChannels/Item/Relationships/RelationshipsRequestBuilder.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions; @@ -22,16 +24,19 @@ public partial class RelationshipsRequestBuilder : BaseRequestBuilder { get => new global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.RelationshipChannels.Item.Relationships.AudioStreams.AudioStreamsRequestBuilder(PathParameters, RequestAdapter); } + /// The ultraHighDefinitionVideoStream property public global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.RelationshipChannels.Item.Relationships.UltraHighDefinitionVideoStream.UltraHighDefinitionVideoStreamRequestBuilder UltraHighDefinitionVideoStream { get => new global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.RelationshipChannels.Item.Relationships.UltraHighDefinitionVideoStream.UltraHighDefinitionVideoStreamRequestBuilder(PathParameters, RequestAdapter); } + /// The videoStream property public global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.RelationshipChannels.Item.Relationships.VideoStream.VideoStreamRequestBuilder VideoStream { get => new global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.RelationshipChannels.Item.Relationships.VideoStream.VideoStreamRequestBuilder(PathParameters, RequestAdapter); } + /// /// Instantiates a new and sets the default values. /// @@ -40,6 +45,7 @@ public partial class RelationshipsRequestBuilder : BaseRequestBuilder public RelationshipsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/relationshipChannels/{id}/relationships", pathParameters) { } + /// /// Instantiates a new and sets the default values. /// @@ -51,3 +57,4 @@ public RelationshipsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/RelationshipChannels/Item/Relationships/UltraHighDefinitionVideoStream/UltraHighDefinitionVideoStreamRequestBuilder.cs b/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/RelationshipChannels/Item/Relationships/UltraHighDefinitionVideoStream/UltraHighDefinitionVideoStreamRequestBuilder.cs index ef48744cd..96dca4e42 100644 --- a/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/RelationshipChannels/Item/Relationships/UltraHighDefinitionVideoStream/UltraHighDefinitionVideoStreamRequestBuilder.cs +++ b/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/RelationshipChannels/Item/Relationships/UltraHighDefinitionVideoStream/UltraHighDefinitionVideoStreamRequestBuilder.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -25,6 +27,7 @@ public partial class UltraHighDefinitionVideoStreamRequestBuilder : BaseRequestB public UltraHighDefinitionVideoStreamRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/relationshipChannels/{id}/relationships/ultraHighDefinitionVideoStream{?query*}", pathParameters) { } + /// /// Instantiates a new and sets the default values. /// @@ -33,6 +36,7 @@ public UltraHighDefinitionVideoStreamRequestBuilder(Dictionary p public UltraHighDefinitionVideoStreamRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/relationshipChannels/{id}/relationships/ultraHighDefinitionVideoStream{?query*}", rawUrl) { } + /// /// Retrieves the related dataStream identity of an individual relationshipChannel's ultraHighDefinitionVideoStream relationship. /// @@ -41,15 +45,8 @@ public UltraHighDefinitionVideoStreamRequestBuilder(string rawUrl, IRequestAdapt /// Configuration for the request such as headers, query parameters, and middleware options. /// When receiving a 400 status code /// When receiving a 404 status code -#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> { @@ -58,23 +55,18 @@ public UltraHighDefinitionVideoStreamRequestBuilder(string rawUrl, IRequestAdapt }; return await RequestAdapter.SendAsync(requestInfo, global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.NullableDataStreamIdentifierResponseDocument.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// /// 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 HeadAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { -#nullable restore -#else - public async Task HeadAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) - { -#endif var requestInfo = ToHeadRequestInformation(requestConfiguration); await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); } + /// /// Clears or assigns an existing dataStream to the ultraHighDefinitionVideoStream relationship of an individual relationshipChannel. /// @@ -84,15 +76,8 @@ public async Task HeadAsync(ActionWhen receiving a 400 status code /// When receiving a 404 status code /// When receiving a 409 status code -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public async Task PatchAsync(global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.NullableToOneDataStreamInRequest body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { -#nullable restore -#else - public async Task PatchAsync(global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.NullableToOneDataStreamInRequest body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) - { -#endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> @@ -103,58 +88,40 @@ public async Task PatchAsync(global::OpenApiKiotaEndToEndTests.RestrictedControl }; await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); } + /// /// Retrieves the related dataStream identity of an individual relationshipChannel's ultraHighDefinitionVideoStream relationship. /// /// A /// 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(Method.GET, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/vnd.api+json"); return requestInfo; } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// /// A /// 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 ToHeadRequestInformation(Action>? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToHeadRequestInformation(Action> requestConfiguration = default) - { -#endif var requestInfo = new RequestInformation(Method.HEAD, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); return requestInfo; } + /// /// Clears or assigns an existing dataStream to the ultraHighDefinitionVideoStream relationship of an individual relationshipChannel. /// /// A /// 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(global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.NullableToOneDataStreamInRequest body, Action>? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToPatchRequestInformation(global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.NullableToOneDataStreamInRequest body, Action> requestConfiguration = default) - { -#endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); @@ -162,6 +129,7 @@ public RequestInformation ToPatchRequestInformation(global::OpenApiKiotaEndToEnd requestInfo.SetContentFromParsable(RequestAdapter, "application/vnd.api+json", body); return requestInfo; } + /// /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. /// @@ -171,6 +139,7 @@ public RequestInformation ToPatchRequestInformation(global::OpenApiKiotaEndToEnd { return new global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.RelationshipChannels.Item.Relationships.UltraHighDefinitionVideoStream.UltraHighDefinitionVideoStreamRequestBuilder(rawUrl, RequestAdapter); } + /// /// Retrieves the related dataStream identity of an individual relationshipChannel's ultraHighDefinitionVideoStream relationship. /// @@ -178,16 +147,10 @@ public RequestInformation ToPatchRequestInformation(global::OpenApiKiotaEndToEnd public partial class UltraHighDefinitionVideoStreamRequestBuilderGetQueryParameters { /// For syntax, see the documentation for the [`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// @@ -195,16 +158,10 @@ public partial class UltraHighDefinitionVideoStreamRequestBuilderGetQueryParamet public partial class UltraHighDefinitionVideoStreamRequestBuilderHeadQueryParameters { /// For syntax, see the documentation for the [`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/RelationshipChannels/Item/Relationships/VideoStream/VideoStreamRequestBuilder.cs b/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/RelationshipChannels/Item/Relationships/VideoStream/VideoStreamRequestBuilder.cs index d7dc5c441..a22bfb2ef 100644 --- a/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/RelationshipChannels/Item/Relationships/VideoStream/VideoStreamRequestBuilder.cs +++ b/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/RelationshipChannels/Item/Relationships/VideoStream/VideoStreamRequestBuilder.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -25,6 +27,7 @@ public partial class VideoStreamRequestBuilder : BaseRequestBuilder public VideoStreamRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/relationshipChannels/{id}/relationships/videoStream{?query*}", pathParameters) { } + /// /// Instantiates a new and sets the default values. /// @@ -33,6 +36,7 @@ public VideoStreamRequestBuilder(Dictionary pathParameters, IReq public VideoStreamRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/relationshipChannels/{id}/relationships/videoStream{?query*}", rawUrl) { } + /// /// Retrieves the related dataStream identity of an individual relationshipChannel's videoStream relationship. /// @@ -41,15 +45,8 @@ public VideoStreamRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) /// Configuration for the request such as headers, query parameters, and middleware options. /// When receiving a 400 status code /// When receiving a 404 status code -#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> { @@ -58,23 +55,18 @@ public VideoStreamRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) }; return await RequestAdapter.SendAsync(requestInfo, global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.DataStreamIdentifierResponseDocument.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// /// 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 HeadAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { -#nullable restore -#else - public async Task HeadAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) - { -#endif var requestInfo = ToHeadRequestInformation(requestConfiguration); await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); } + /// /// Assigns an existing dataStream to the videoStream relationship of an individual relationshipChannel. /// @@ -84,15 +76,8 @@ public async Task HeadAsync(ActionWhen receiving a 400 status code /// When receiving a 404 status code /// When receiving a 409 status code -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public async Task PatchAsync(global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.ToOneDataStreamInRequest body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { -#nullable restore -#else - public async Task PatchAsync(global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.ToOneDataStreamInRequest body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) - { -#endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> @@ -103,58 +88,40 @@ public async Task PatchAsync(global::OpenApiKiotaEndToEndTests.RestrictedControl }; await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); } + /// /// Retrieves the related dataStream identity of an individual relationshipChannel's videoStream relationship. /// /// A /// 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(Method.GET, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/vnd.api+json"); return requestInfo; } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// /// A /// 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 ToHeadRequestInformation(Action>? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToHeadRequestInformation(Action> requestConfiguration = default) - { -#endif var requestInfo = new RequestInformation(Method.HEAD, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); return requestInfo; } + /// /// Assigns an existing dataStream to the videoStream relationship of an individual relationshipChannel. /// /// A /// 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(global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.ToOneDataStreamInRequest body, Action>? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToPatchRequestInformation(global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.ToOneDataStreamInRequest body, Action> requestConfiguration = default) - { -#endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); @@ -162,6 +129,7 @@ public RequestInformation ToPatchRequestInformation(global::OpenApiKiotaEndToEnd requestInfo.SetContentFromParsable(RequestAdapter, "application/vnd.api+json", body); return requestInfo; } + /// /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. /// @@ -171,6 +139,7 @@ public RequestInformation ToPatchRequestInformation(global::OpenApiKiotaEndToEnd { return new global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.RelationshipChannels.Item.Relationships.VideoStream.VideoStreamRequestBuilder(rawUrl, RequestAdapter); } + /// /// Retrieves the related dataStream identity of an individual relationshipChannel's videoStream relationship. /// @@ -178,16 +147,10 @@ public RequestInformation ToPatchRequestInformation(global::OpenApiKiotaEndToEnd public partial class VideoStreamRequestBuilderGetQueryParameters { /// For syntax, see the documentation for the [`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } + /// /// Compare the returned ETag HTTP header with an earlier one to determine if the response has changed since it was fetched. /// @@ -195,16 +158,10 @@ public partial class VideoStreamRequestBuilderGetQueryParameters public partial class VideoStreamRequestBuilderHeadQueryParameters { /// For syntax, see the documentation for the [`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/RelationshipChannels/RelationshipChannelsRequestBuilder.cs b/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/RelationshipChannels/RelationshipChannelsRequestBuilder.cs index 8fbace048..47b5863af 100644 --- a/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/RelationshipChannels/RelationshipChannelsRequestBuilder.cs +++ b/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/RelationshipChannels/RelationshipChannelsRequestBuilder.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions; @@ -27,6 +29,7 @@ public partial class RelationshipChannelsRequestBuilder : BaseRequestBuilder return new global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.RelationshipChannels.Item.RelationshipChannelsItemRequestBuilder(urlTplParams, RequestAdapter); } } + /// /// Instantiates a new and sets the default values. /// @@ -35,6 +38,7 @@ public partial class RelationshipChannelsRequestBuilder : BaseRequestBuilder public RelationshipChannelsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/relationshipChannels", pathParameters) { } + /// /// Instantiates a new and sets the default values. /// @@ -46,3 +50,4 @@ public RelationshipChannelsRequestBuilder(string rawUrl, IRequestAdapter request } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/RestrictedControllersClient.cs b/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/RestrictedControllersClient.cs index 6cf4691e1..7fcf4ec86 100644 --- a/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/RestrictedControllersClient.cs +++ b/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/RestrictedControllersClient.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Store; @@ -29,26 +31,31 @@ public partial class RestrictedControllersClient : BaseRequestBuilder { get => new global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.DataStreams.DataStreamsRequestBuilder(PathParameters, RequestAdapter); } + /// The readOnlyChannels property public global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.ReadOnlyChannels.ReadOnlyChannelsRequestBuilder ReadOnlyChannels { get => new global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.ReadOnlyChannels.ReadOnlyChannelsRequestBuilder(PathParameters, RequestAdapter); } + /// The readOnlyResourceChannels property public global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.ReadOnlyResourceChannels.ReadOnlyResourceChannelsRequestBuilder ReadOnlyResourceChannels { get => new global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.ReadOnlyResourceChannels.ReadOnlyResourceChannelsRequestBuilder(PathParameters, RequestAdapter); } + /// The relationshipChannels property public global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.RelationshipChannels.RelationshipChannelsRequestBuilder RelationshipChannels { get => new global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.RelationshipChannels.RelationshipChannelsRequestBuilder(PathParameters, RequestAdapter); } + /// The writeOnlyChannels property public global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.WriteOnlyChannels.WriteOnlyChannelsRequestBuilder WriteOnlyChannels { get => new global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.WriteOnlyChannels.WriteOnlyChannelsRequestBuilder(PathParameters, RequestAdapter); } + /// /// Instantiates a new and sets the default values. /// @@ -73,3 +80,4 @@ public partial class RestrictedControllersClient : BaseRequestBuilder } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/WriteOnlyChannels/Item/Relationships/AudioStreams/AudioStreamsRequestBuilder.cs b/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/WriteOnlyChannels/Item/Relationships/AudioStreams/AudioStreamsRequestBuilder.cs index 60938cb39..7e71c0993 100644 --- a/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/WriteOnlyChannels/Item/Relationships/AudioStreams/AudioStreamsRequestBuilder.cs +++ b/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/WriteOnlyChannels/Item/Relationships/AudioStreams/AudioStreamsRequestBuilder.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -25,6 +27,7 @@ public partial class AudioStreamsRequestBuilder : BaseRequestBuilder public AudioStreamsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/writeOnlyChannels/{id}/relationships/audioStreams", pathParameters) { } + /// /// Instantiates a new and sets the default values. /// @@ -33,6 +36,7 @@ public AudioStreamsRequestBuilder(Dictionary pathParameters, IRe public AudioStreamsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/writeOnlyChannels/{id}/relationships/audioStreams", rawUrl) { } + /// /// Removes existing dataStreams from the audioStreams relationship of an individual writeOnlyChannel. /// @@ -42,15 +46,8 @@ public AudioStreamsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) /// When receiving a 400 status code /// When receiving a 404 status code /// When receiving a 409 status code -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public async Task DeleteAsync(global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.ToManyDataStreamInRequest body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { -#nullable restore -#else - public async Task DeleteAsync(global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.ToManyDataStreamInRequest body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) - { -#endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = ToDeleteRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> @@ -61,6 +58,7 @@ public async Task DeleteAsync(global::OpenApiKiotaEndToEndTests.RestrictedContro }; await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); } + /// /// Assigns existing dataStreams to the audioStreams relationship of an individual writeOnlyChannel. /// @@ -70,15 +68,8 @@ public async Task DeleteAsync(global::OpenApiKiotaEndToEndTests.RestrictedContro /// When receiving a 400 status code /// When receiving a 404 status code /// When receiving a 409 status code -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public async Task PatchAsync(global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.ToManyDataStreamInRequest body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { -#nullable restore -#else - public async Task PatchAsync(global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.ToManyDataStreamInRequest body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) - { -#endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> @@ -89,6 +80,7 @@ public async Task PatchAsync(global::OpenApiKiotaEndToEndTests.RestrictedControl }; await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); } + /// /// Adds existing dataStreams to the audioStreams relationship of an individual writeOnlyChannel. /// @@ -98,15 +90,8 @@ public async Task PatchAsync(global::OpenApiKiotaEndToEndTests.RestrictedControl /// When receiving a 400 status code /// When receiving a 404 status code /// When receiving a 409 status code -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public async Task PostAsync(global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.ToManyDataStreamInRequest body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { -#nullable restore -#else - public async Task PostAsync(global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.ToManyDataStreamInRequest body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) - { -#endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> @@ -117,21 +102,15 @@ public async Task PostAsync(global::OpenApiKiotaEndToEndTests.RestrictedControll }; await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); } + /// /// Removes existing dataStreams from the audioStreams relationship of an individual writeOnlyChannel. /// /// A /// 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 ToDeleteRequestInformation(global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.ToManyDataStreamInRequest body, Action>? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToDeleteRequestInformation(global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.ToManyDataStreamInRequest body, Action> requestConfiguration = default) - { -#endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); @@ -139,21 +118,15 @@ public RequestInformation ToDeleteRequestInformation(global::OpenApiKiotaEndToEn requestInfo.SetContentFromParsable(RequestAdapter, "application/vnd.api+json", body); return requestInfo; } + /// /// Assigns existing dataStreams to the audioStreams relationship of an individual writeOnlyChannel. /// /// A /// 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(global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.ToManyDataStreamInRequest body, Action>? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToPatchRequestInformation(global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.ToManyDataStreamInRequest body, Action> requestConfiguration = default) - { -#endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); @@ -161,21 +134,15 @@ public RequestInformation ToPatchRequestInformation(global::OpenApiKiotaEndToEnd requestInfo.SetContentFromParsable(RequestAdapter, "application/vnd.api+json", body); return requestInfo; } + /// /// Adds existing dataStreams to the audioStreams relationship of an individual writeOnlyChannel. /// /// A /// 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(global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.ToManyDataStreamInRequest body, Action>? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToPostRequestInformation(global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.ToManyDataStreamInRequest body, Action> requestConfiguration = default) - { -#endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); @@ -183,6 +150,7 @@ public RequestInformation ToPostRequestInformation(global::OpenApiKiotaEndToEndT requestInfo.SetContentFromParsable(RequestAdapter, "application/vnd.api+json", body); return requestInfo; } + /// /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. /// @@ -195,3 +163,4 @@ public RequestInformation ToPostRequestInformation(global::OpenApiKiotaEndToEndT } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/WriteOnlyChannels/Item/Relationships/RelationshipsRequestBuilder.cs b/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/WriteOnlyChannels/Item/Relationships/RelationshipsRequestBuilder.cs index 06d6b7ad7..0767963b1 100644 --- a/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/WriteOnlyChannels/Item/Relationships/RelationshipsRequestBuilder.cs +++ b/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/WriteOnlyChannels/Item/Relationships/RelationshipsRequestBuilder.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions; @@ -22,16 +24,19 @@ public partial class RelationshipsRequestBuilder : BaseRequestBuilder { get => new global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.WriteOnlyChannels.Item.Relationships.AudioStreams.AudioStreamsRequestBuilder(PathParameters, RequestAdapter); } + /// The ultraHighDefinitionVideoStream property public global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.WriteOnlyChannels.Item.Relationships.UltraHighDefinitionVideoStream.UltraHighDefinitionVideoStreamRequestBuilder UltraHighDefinitionVideoStream { get => new global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.WriteOnlyChannels.Item.Relationships.UltraHighDefinitionVideoStream.UltraHighDefinitionVideoStreamRequestBuilder(PathParameters, RequestAdapter); } + /// The videoStream property public global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.WriteOnlyChannels.Item.Relationships.VideoStream.VideoStreamRequestBuilder VideoStream { get => new global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.WriteOnlyChannels.Item.Relationships.VideoStream.VideoStreamRequestBuilder(PathParameters, RequestAdapter); } + /// /// Instantiates a new and sets the default values. /// @@ -40,6 +45,7 @@ public partial class RelationshipsRequestBuilder : BaseRequestBuilder public RelationshipsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/writeOnlyChannels/{id}/relationships", pathParameters) { } + /// /// Instantiates a new and sets the default values. /// @@ -51,3 +57,4 @@ public RelationshipsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/WriteOnlyChannels/Item/Relationships/UltraHighDefinitionVideoStream/UltraHighDefinitionVideoStreamRequestBuilder.cs b/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/WriteOnlyChannels/Item/Relationships/UltraHighDefinitionVideoStream/UltraHighDefinitionVideoStreamRequestBuilder.cs index 766476d26..a1b118df5 100644 --- a/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/WriteOnlyChannels/Item/Relationships/UltraHighDefinitionVideoStream/UltraHighDefinitionVideoStreamRequestBuilder.cs +++ b/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/WriteOnlyChannels/Item/Relationships/UltraHighDefinitionVideoStream/UltraHighDefinitionVideoStreamRequestBuilder.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -25,6 +27,7 @@ public partial class UltraHighDefinitionVideoStreamRequestBuilder : BaseRequestB public UltraHighDefinitionVideoStreamRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/writeOnlyChannels/{id}/relationships/ultraHighDefinitionVideoStream", pathParameters) { } + /// /// Instantiates a new and sets the default values. /// @@ -33,6 +36,7 @@ public UltraHighDefinitionVideoStreamRequestBuilder(Dictionary p public UltraHighDefinitionVideoStreamRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/writeOnlyChannels/{id}/relationships/ultraHighDefinitionVideoStream", rawUrl) { } + /// /// Clears or assigns an existing dataStream to the ultraHighDefinitionVideoStream relationship of an individual writeOnlyChannel. /// @@ -42,15 +46,8 @@ public UltraHighDefinitionVideoStreamRequestBuilder(string rawUrl, IRequestAdapt /// When receiving a 400 status code /// When receiving a 404 status code /// When receiving a 409 status code -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public async Task PatchAsync(global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.NullableToOneDataStreamInRequest body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { -#nullable restore -#else - public async Task PatchAsync(global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.NullableToOneDataStreamInRequest body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) - { -#endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> @@ -61,21 +58,15 @@ public async Task PatchAsync(global::OpenApiKiotaEndToEndTests.RestrictedControl }; await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); } + /// /// Clears or assigns an existing dataStream to the ultraHighDefinitionVideoStream relationship of an individual writeOnlyChannel. /// /// A /// 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(global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.NullableToOneDataStreamInRequest body, Action>? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToPatchRequestInformation(global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.NullableToOneDataStreamInRequest body, Action> requestConfiguration = default) - { -#endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); @@ -83,6 +74,7 @@ public RequestInformation ToPatchRequestInformation(global::OpenApiKiotaEndToEnd requestInfo.SetContentFromParsable(RequestAdapter, "application/vnd.api+json", body); return requestInfo; } + /// /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. /// @@ -95,3 +87,4 @@ public RequestInformation ToPatchRequestInformation(global::OpenApiKiotaEndToEnd } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/WriteOnlyChannels/Item/Relationships/VideoStream/VideoStreamRequestBuilder.cs b/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/WriteOnlyChannels/Item/Relationships/VideoStream/VideoStreamRequestBuilder.cs index 249d5000f..19cf9c151 100644 --- a/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/WriteOnlyChannels/Item/Relationships/VideoStream/VideoStreamRequestBuilder.cs +++ b/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/WriteOnlyChannels/Item/Relationships/VideoStream/VideoStreamRequestBuilder.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -25,6 +27,7 @@ public partial class VideoStreamRequestBuilder : BaseRequestBuilder public VideoStreamRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/writeOnlyChannels/{id}/relationships/videoStream", pathParameters) { } + /// /// Instantiates a new and sets the default values. /// @@ -33,6 +36,7 @@ public VideoStreamRequestBuilder(Dictionary pathParameters, IReq public VideoStreamRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/writeOnlyChannels/{id}/relationships/videoStream", rawUrl) { } + /// /// Assigns an existing dataStream to the videoStream relationship of an individual writeOnlyChannel. /// @@ -42,15 +46,8 @@ public VideoStreamRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) /// When receiving a 400 status code /// When receiving a 404 status code /// When receiving a 409 status code -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public async Task PatchAsync(global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.ToOneDataStreamInRequest body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { -#nullable restore -#else - public async Task PatchAsync(global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.ToOneDataStreamInRequest body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) - { -#endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> @@ -61,21 +58,15 @@ public async Task PatchAsync(global::OpenApiKiotaEndToEndTests.RestrictedControl }; await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); } + /// /// Assigns an existing dataStream to the videoStream relationship of an individual writeOnlyChannel. /// /// A /// 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(global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.ToOneDataStreamInRequest body, Action>? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToPatchRequestInformation(global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.ToOneDataStreamInRequest body, Action> requestConfiguration = default) - { -#endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); @@ -83,6 +74,7 @@ public RequestInformation ToPatchRequestInformation(global::OpenApiKiotaEndToEnd requestInfo.SetContentFromParsable(RequestAdapter, "application/vnd.api+json", body); return requestInfo; } + /// /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. /// @@ -95,3 +87,4 @@ public RequestInformation ToPatchRequestInformation(global::OpenApiKiotaEndToEnd } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/WriteOnlyChannels/Item/WriteOnlyChannelsItemRequestBuilder.cs b/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/WriteOnlyChannels/Item/WriteOnlyChannelsItemRequestBuilder.cs index 866209a86..93046a832 100644 --- a/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/WriteOnlyChannels/Item/WriteOnlyChannelsItemRequestBuilder.cs +++ b/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/WriteOnlyChannels/Item/WriteOnlyChannelsItemRequestBuilder.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -23,6 +25,7 @@ public partial class WriteOnlyChannelsItemRequestBuilder : BaseRequestBuilder { get => new global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.WriteOnlyChannels.Item.Relationships.RelationshipsRequestBuilder(PathParameters, RequestAdapter); } + /// /// Instantiates a new and sets the default values. /// @@ -31,6 +34,7 @@ public partial class WriteOnlyChannelsItemRequestBuilder : BaseRequestBuilder public WriteOnlyChannelsItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/writeOnlyChannels/{id}{?query*}", pathParameters) { } + /// /// Instantiates a new and sets the default values. /// @@ -39,21 +43,15 @@ public WriteOnlyChannelsItemRequestBuilder(Dictionary pathParame public WriteOnlyChannelsItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/writeOnlyChannels/{id}{?query*}", rawUrl) { } + /// /// Deletes an existing writeOnlyChannel by its identifier. /// /// Cancellation token to use when cancelling requests /// Configuration for the request such as headers, query parameters, and middleware options. /// When receiving a 404 status code -#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> { @@ -61,6 +59,7 @@ public async Task DeleteAsync(Action /// Updates an existing writeOnlyChannel. /// @@ -72,15 +71,8 @@ public async Task DeleteAsync(ActionWhen receiving a 404 status code /// When receiving a 409 status code /// When receiving a 422 status code -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public async Task PatchAsync(global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.UpdateWriteOnlyChannelRequestDocument body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { -#nullable restore -#else - public async Task PatchAsync(global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.UpdateWriteOnlyChannelRequestDocument body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) - { -#endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = ToPatchRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> @@ -92,40 +84,28 @@ public async Task DeleteAsync(Action(requestInfo, global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.WriteOnlyChannelPrimaryResponseDocument.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } + /// /// Deletes an existing writeOnlyChannel by its identifier. /// /// A /// 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(Method.DELETE, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); requestInfo.Headers.TryAdd("Accept", "application/vnd.api+json"); return requestInfo; } + /// /// Updates an existing writeOnlyChannel. /// /// A /// 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(global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.UpdateWriteOnlyChannelRequestDocument body, Action>? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToPatchRequestInformation(global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.UpdateWriteOnlyChannelRequestDocument body, Action> requestConfiguration = default) - { -#endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); @@ -133,6 +113,7 @@ public RequestInformation ToPatchRequestInformation(global::OpenApiKiotaEndToEnd requestInfo.SetContentFromParsable(RequestAdapter, "application/vnd.api+json", body); return requestInfo; } + /// /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. /// @@ -142,6 +123,7 @@ public RequestInformation ToPatchRequestInformation(global::OpenApiKiotaEndToEnd { return new global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.WriteOnlyChannels.Item.WriteOnlyChannelsItemRequestBuilder(rawUrl, RequestAdapter); } + /// /// Updates an existing writeOnlyChannel. /// @@ -149,16 +131,10 @@ public RequestInformation ToPatchRequestInformation(global::OpenApiKiotaEndToEnd public partial class WriteOnlyChannelsItemRequestBuilderPatchQueryParameters { /// For syntax, see the documentation for the [`include`](https://www.jsonapi.net/usage/reading/including-relationships.html)/[`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/WriteOnlyChannels/WriteOnlyChannelsRequestBuilder.cs b/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/WriteOnlyChannels/WriteOnlyChannelsRequestBuilder.cs index 859d25fb5..db5a38821 100644 --- a/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/WriteOnlyChannels/WriteOnlyChannelsRequestBuilder.cs +++ b/test/OpenApiKiotaEndToEndTests/RestrictedControllers/GeneratedCode/WriteOnlyChannels/WriteOnlyChannelsRequestBuilder.cs @@ -1,4 +1,6 @@ // +#nullable enable +#pragma warning disable CS8625 #pragma warning disable CS0618 using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -30,6 +32,7 @@ public partial class WriteOnlyChannelsRequestBuilder : BaseRequestBuilder return new global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.WriteOnlyChannels.Item.WriteOnlyChannelsItemRequestBuilder(urlTplParams, RequestAdapter); } } + /// /// Instantiates a new and sets the default values. /// @@ -38,6 +41,7 @@ public partial class WriteOnlyChannelsRequestBuilder : BaseRequestBuilder public WriteOnlyChannelsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/writeOnlyChannels{?query*}", pathParameters) { } + /// /// Instantiates a new and sets the default values. /// @@ -46,6 +50,7 @@ public WriteOnlyChannelsRequestBuilder(Dictionary pathParameters public WriteOnlyChannelsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/writeOnlyChannels{?query*}", rawUrl) { } + /// /// Creates a new writeOnlyChannel. /// @@ -58,15 +63,8 @@ public WriteOnlyChannelsRequestBuilder(string rawUrl, IRequestAdapter requestAda /// When receiving a 404 status code /// When receiving a 409 status code /// When receiving a 422 status code -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable public async Task PostAsync(global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.CreateWriteOnlyChannelRequestDocument body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { -#nullable restore -#else - public async Task PostAsync(global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.CreateWriteOnlyChannelRequestDocument body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) - { -#endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = ToPostRequestInformation(body, requestConfiguration); var errorMapping = new Dictionary> @@ -79,21 +77,15 @@ public WriteOnlyChannelsRequestBuilder(string rawUrl, IRequestAdapter requestAda }; return await RequestAdapter.SendAsync(requestInfo, global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.WriteOnlyChannelPrimaryResponseDocument.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } + /// /// Creates a new writeOnlyChannel. /// /// A /// 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(global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.CreateWriteOnlyChannelRequestDocument body, Action>? requestConfiguration = default) { -#nullable restore -#else - public RequestInformation ToPostRequestInformation(global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.Models.CreateWriteOnlyChannelRequestDocument body, Action> requestConfiguration = default) - { -#endif _ = body ?? throw new ArgumentNullException(nameof(body)); var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); requestInfo.Configure(requestConfiguration); @@ -101,6 +93,7 @@ public RequestInformation ToPostRequestInformation(global::OpenApiKiotaEndToEndT requestInfo.SetContentFromParsable(RequestAdapter, "application/vnd.api+json", body); return requestInfo; } + /// /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. /// @@ -110,6 +103,7 @@ public RequestInformation ToPostRequestInformation(global::OpenApiKiotaEndToEndT { return new global::OpenApiKiotaEndToEndTests.RestrictedControllers.GeneratedCode.WriteOnlyChannels.WriteOnlyChannelsRequestBuilder(rawUrl, RequestAdapter); } + /// /// Creates a new writeOnlyChannel. /// @@ -117,16 +111,10 @@ public RequestInformation ToPostRequestInformation(global::OpenApiKiotaEndToEndT public partial class WriteOnlyChannelsRequestBuilderPostQueryParameters { /// For syntax, see the documentation for the [`include`](https://www.jsonapi.net/usage/reading/including-relationships.html)/[`filter`](https://www.jsonapi.net/usage/reading/filtering.html)/[`sort`](https://www.jsonapi.net/usage/reading/sorting.html)/[`page`](https://www.jsonapi.net/usage/reading/pagination.html)/[`fields`](https://www.jsonapi.net/usage/reading/sparse-fieldset-selection.html) query string parameters. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable [QueryParameter("query")] public string? Query { get; set; } -#nullable restore -#else - [QueryParameter("query")] - public string Query { get; set; } -#endif } } } #pragma warning restore CS0618 + diff --git a/test/OpenApiKiotaEndToEndTests/RestrictedControllers/UpdateRelationshipTests.cs b/test/OpenApiKiotaEndToEndTests/RestrictedControllers/UpdateRelationshipTests.cs index c653d8ad7..df9ce1e9d 100644 --- a/test/OpenApiKiotaEndToEndTests/RestrictedControllers/UpdateRelationshipTests.cs +++ b/test/OpenApiKiotaEndToEndTests/RestrictedControllers/UpdateRelationshipTests.cs @@ -57,7 +57,7 @@ await _testContext.RunOnDatabaseAsync(async dbContext => }; // Act - await apiClient.WriteOnlyChannels[existingChannel.StringId].Relationships.UltraHighDefinitionVideoStream.PatchAsync(requestBody); + await apiClient.WriteOnlyChannels[existingChannel.StringId!].Relationships.UltraHighDefinitionVideoStream.PatchAsync(requestBody); await _testContext.RunOnDatabaseAsync(async dbContext => { @@ -99,7 +99,7 @@ await _testContext.RunOnDatabaseAsync(async dbContext => }; // Act - await apiClient.WriteOnlyChannels[existingChannel.StringId].Relationships.UltraHighDefinitionVideoStream.PatchAsync(requestBody); + await apiClient.WriteOnlyChannels[existingChannel.StringId!].Relationships.UltraHighDefinitionVideoStream.PatchAsync(requestBody); await _testContext.RunOnDatabaseAsync(async dbContext => { @@ -150,7 +150,7 @@ await _testContext.RunOnDatabaseAsync(async dbContext => }; // Act - await apiClient.WriteOnlyChannels[existingChannel.StringId].Relationships.AudioStreams.PatchAsync(requestBody); + await apiClient.WriteOnlyChannels[existingChannel.StringId!].Relationships.AudioStreams.PatchAsync(requestBody); await _testContext.RunOnDatabaseAsync(async dbContext => { @@ -192,7 +192,7 @@ await _testContext.RunOnDatabaseAsync(async dbContext => }; // Act - await apiClient.WriteOnlyChannels[existingChannel.StringId].Relationships.AudioStreams.PatchAsync(requestBody); + await apiClient.WriteOnlyChannels[existingChannel.StringId!].Relationships.AudioStreams.PatchAsync(requestBody); await _testContext.RunOnDatabaseAsync(async dbContext => { @@ -243,7 +243,7 @@ await _testContext.RunOnDatabaseAsync(async dbContext => }; // Act - await apiClient.WriteOnlyChannels[existingChannel.StringId].Relationships.AudioStreams.PostAsync(requestBody); + await apiClient.WriteOnlyChannels[existingChannel.StringId!].Relationships.AudioStreams.PostAsync(requestBody); await _testContext.RunOnDatabaseAsync(async dbContext => { @@ -298,7 +298,7 @@ await _testContext.RunOnDatabaseAsync(async dbContext => }; // Act - await apiClient.WriteOnlyChannels[existingChannel.StringId].Relationships.AudioStreams.DeleteAsync(requestBody); + await apiClient.WriteOnlyChannels[existingChannel.StringId!].Relationships.AudioStreams.DeleteAsync(requestBody); await _testContext.RunOnDatabaseAsync(async dbContext => { @@ -337,7 +337,7 @@ await _testContext.RunOnDatabaseAsync(async dbContext => // Act Func action = async () => - await apiClient.WriteOnlyChannels[existingChannel.StringId].Relationships.UltraHighDefinitionVideoStream.PatchAsync(requestBody); + await apiClient.WriteOnlyChannels[existingChannel.StringId!].Relationships.UltraHighDefinitionVideoStream.PatchAsync(requestBody); // Assert await action.Should().ThrowExactlyAsync().WithParameterName("body"); @@ -380,7 +380,7 @@ await _testContext.RunOnDatabaseAsync(async dbContext => }; // Act - Func action = async () => await apiClient.WriteOnlyChannels[existingChannel.StringId].Relationships.AudioStreams.PatchAsync(requestBody); + Func action = async () => await apiClient.WriteOnlyChannels[existingChannel.StringId!].Relationships.AudioStreams.PatchAsync(requestBody); // Assert ErrorResponseDocument exception = (await action.Should().ThrowExactlyAsync()).Which; diff --git a/test/OpenApiKiotaEndToEndTests/RestrictedControllers/UpdateResourceTests.cs b/test/OpenApiKiotaEndToEndTests/RestrictedControllers/UpdateResourceTests.cs index 762f07678..9f2bfd31f 100644 --- a/test/OpenApiKiotaEndToEndTests/RestrictedControllers/UpdateResourceTests.cs +++ b/test/OpenApiKiotaEndToEndTests/RestrictedControllers/UpdateResourceTests.cs @@ -95,7 +95,7 @@ await _testContext.RunOnDatabaseAsync(async dbContext => using (_requestAdapterFactory.WithQueryString(queryString)) { // Act - WriteOnlyChannelPrimaryResponseDocument? response = await apiClient.WriteOnlyChannels[existingChannel.StringId].PatchAsync(requestBody); + WriteOnlyChannelPrimaryResponseDocument? response = await apiClient.WriteOnlyChannels[existingChannel.StringId!].PatchAsync(requestBody); response.ShouldNotBeNull(); @@ -174,7 +174,7 @@ await _testContext.RunOnDatabaseAsync(async dbContext => }; // Act - WriteOnlyChannelPrimaryResponseDocument? response = await apiClient.WriteOnlyChannels[existingChannel.StringId].PatchAsync(requestBody); + WriteOnlyChannelPrimaryResponseDocument? response = await apiClient.WriteOnlyChannels[existingChannel.StringId!].PatchAsync(requestBody); response.ShouldNotBeNull(); @@ -239,7 +239,7 @@ await _testContext.RunOnDatabaseAsync(async dbContext => UpdateWriteOnlyChannelRequestDocument requestBody = null!; // Act - Func action = async () => _ = await apiClient.WriteOnlyChannels[existingChannel.StringId].PatchAsync(requestBody); + Func action = async () => _ = await apiClient.WriteOnlyChannels[existingChannel.StringId!].PatchAsync(requestBody); // Assert await action.Should().ThrowExactlyAsync().WithParameterName("body"); @@ -295,7 +295,7 @@ await _testContext.RunOnDatabaseAsync(async dbContext => }; // Act - Func action = async () => _ = await apiClient.WriteOnlyChannels[existingChannel.StringId].PatchAsync(requestBody); + Func action = async () => _ = await apiClient.WriteOnlyChannels[existingChannel.StringId!].PatchAsync(requestBody); // Assert ErrorResponseDocument exception = (await action.Should().ThrowExactlyAsync()).Which; diff --git a/test/TestBuildingBlocks/NullabilityAssertionExtensions.cs b/test/TestBuildingBlocks/NullabilityAssertionExtensions.cs index 90d4eaba7..50723b0d1 100644 --- a/test/TestBuildingBlocks/NullabilityAssertionExtensions.cs +++ b/test/TestBuildingBlocks/NullabilityAssertionExtensions.cs @@ -40,7 +40,7 @@ public static void ShouldHaveCount([SysNotNull] this IEnumerable? subject, } [CustomAssertion] - public static TValue? ShouldContainKey([SysNotNull] this IDictionary? subject, TKey expected) + public static TValue ShouldContainKey([SysNotNull] this IDictionary? subject, TKey expected) { subject.Should().ContainKey(expected);