Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generated models and request builders #94

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
// <auto-generated/>
#pragma warning disable CS0618
using ApiSdk.AccessReviewDecisions.Count;
using ApiSdk.AccessReviewDecisions.Item;
using ApiSdk.Models.ODataErrors;
using ApiSdk.Models;
using Microsoft.Kiota.Abstractions.Extensions;
using Microsoft.Kiota.Abstractions.Serialization;
using Microsoft.Kiota.Abstractions;
using Microsoft.Kiota.Cli.Commons.Extensions;
Expand All @@ -21,7 +23,8 @@ namespace ApiSdk.AccessReviewDecisions
/// <summary>
/// Provides operations to manage the collection of accessReviewDecision entities.
/// </summary>
public class AccessReviewDecisionsRequestBuilder : BaseCliRequestBuilder
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
public partial class AccessReviewDecisionsRequestBuilder : BaseCliRequestBuilder
{
/// <summary>
/// Provides operations to manage the collection of accessReviewDecision entities.
Expand All @@ -30,7 +33,7 @@ public class AccessReviewDecisionsRequestBuilder : BaseCliRequestBuilder
public Tuple<List<Command>, List<Command>> BuildCommand()
{
var executables = new List<Command>();
var builder = new AccessReviewDecisionItemRequestBuilder(PathParameters);
var builder = new global::ApiSdk.AccessReviewDecisions.Item.AccessReviewDecisionItemRequestBuilder(PathParameters);
executables.Add(builder.BuildDeleteCommand());
executables.Add(builder.BuildGetCommand());
executables.Add(builder.BuildPatchCommand());
Expand All @@ -44,7 +47,7 @@ public Command BuildCountNavCommand()
{
var command = new Command("count");
command.Description = "Provides operations to count the resources in the collection.";
var builder = new CountRequestBuilder(PathParameters);
var builder = new global::ApiSdk.AccessReviewDecisions.Count.CountRequestBuilder(PathParameters);
var execCommands = new List<Command>();
execCommands.Add(builder.BuildGetCommand());
foreach (var cmd in execCommands)
Expand Down Expand Up @@ -78,8 +81,8 @@ public Command BuildCreateCommand()
var cancellationToken = invocationContext.GetCancellationToken();
var reqAdapter = invocationContext.GetRequestAdapter();
using var stream = new MemoryStream(Encoding.UTF8.GetBytes(body));
var parseNode = ParseNodeFactoryRegistry.DefaultInstance.GetRootParseNode("application/json", stream);
var model = parseNode.GetObjectValue<AccessReviewDecision>(AccessReviewDecision.CreateFromDiscriminatorValue);
var parseNode = await ParseNodeFactoryRegistry.DefaultInstance.GetRootParseNodeAsync("application/json", stream, cancellationToken);
var model = parseNode.GetObjectValue<global::ApiSdk.Models.AccessReviewDecision>(global::ApiSdk.Models.AccessReviewDecision.CreateFromDiscriminatorValue);
if (model is null) {
Console.Error.WriteLine("No model data to send.");
return;
Expand Down Expand Up @@ -195,14 +198,14 @@ public Command BuildListCommand()
return command;
}
/// <summary>
/// Instantiates a new <see cref="AccessReviewDecisionsRequestBuilder"/> and sets the default values.
/// Instantiates a new <see cref="global::ApiSdk.AccessReviewDecisions.AccessReviewDecisionsRequestBuilder"/> and sets the default values.
/// </summary>
/// <param name="pathParameters">Path parameters for the request</param>
public AccessReviewDecisionsRequestBuilder(Dictionary<string, object> pathParameters) : base("{+baseurl}/accessReviewDecisions{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", pathParameters)
{
}
/// <summary>
/// Instantiates a new <see cref="AccessReviewDecisionsRequestBuilder"/> and sets the default values.
/// Instantiates a new <see cref="global::ApiSdk.AccessReviewDecisions.AccessReviewDecisionsRequestBuilder"/> and sets the default values.
/// </summary>
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
public AccessReviewDecisionsRequestBuilder(string rawUrl) : base("{+baseurl}/accessReviewDecisions{?%24count,%24expand,%24filter,%24orderby,%24search,%24select,%24skip,%24top}", rawUrl)
Expand All @@ -215,11 +218,11 @@ public AccessReviewDecisionsRequestBuilder(string rawUrl) : base("{+baseurl}/acc
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<AccessReviewDecisionsRequestBuilderGetQueryParameters>>? requestConfiguration = default)
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<global::ApiSdk.AccessReviewDecisions.AccessReviewDecisionsRequestBuilder.AccessReviewDecisionsRequestBuilderGetQueryParameters>>? requestConfiguration = default)
{
#nullable restore
#else
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<AccessReviewDecisionsRequestBuilderGetQueryParameters>> requestConfiguration = default)
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<global::ApiSdk.AccessReviewDecisions.AccessReviewDecisionsRequestBuilder.AccessReviewDecisionsRequestBuilderGetQueryParameters>> requestConfiguration = default)
{
#endif
var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters);
Expand All @@ -235,11 +238,11 @@ public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<Ac
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
public RequestInformation ToPostRequestInformation(AccessReviewDecision body, Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default)
public RequestInformation ToPostRequestInformation(global::ApiSdk.Models.AccessReviewDecision body, Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default)
{
#nullable restore
#else
public RequestInformation ToPostRequestInformation(AccessReviewDecision body, Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default)
public RequestInformation ToPostRequestInformation(global::ApiSdk.Models.AccessReviewDecision body, Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default)
{
#endif
_ = body ?? throw new ArgumentNullException(nameof(body));
Expand All @@ -251,7 +254,8 @@ public RequestInformation ToPostRequestInformation(AccessReviewDecision body, Ac
/// <summary>
/// Get entities from accessReviewDecisions
/// </summary>
public class AccessReviewDecisionsRequestBuilderGetQueryParameters
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
public partial class AccessReviewDecisionsRequestBuilderGetQueryParameters
{
/// <summary>Include count of items</summary>
[QueryParameter("%24count")]
Expand Down Expand Up @@ -315,3 +319,4 @@ public class AccessReviewDecisionsRequestBuilderGetQueryParameters
}
}
}
#pragma warning restore CS0618
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
// <auto-generated/>
#pragma warning disable CS0618
using ApiSdk.Models.ODataErrors;
using Microsoft.Kiota.Abstractions.Extensions;
using Microsoft.Kiota.Abstractions.Serialization;
using Microsoft.Kiota.Abstractions;
using Microsoft.Kiota.Cli.Commons.Extensions;
Expand All @@ -18,7 +20,8 @@ namespace ApiSdk.AccessReviewDecisions.Count
/// <summary>
/// Provides operations to count the resources in the collection.
/// </summary>
public class CountRequestBuilder : BaseCliRequestBuilder
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
public partial class CountRequestBuilder : BaseCliRequestBuilder
{
/// <summary>
/// Get the number of the resource
Expand Down Expand Up @@ -57,14 +60,14 @@ public Command BuildGetCommand()
return command;
}
/// <summary>
/// Instantiates a new <see cref="CountRequestBuilder"/> and sets the default values.
/// Instantiates a new <see cref="global::ApiSdk.AccessReviewDecisions.Count.CountRequestBuilder"/> and sets the default values.
/// </summary>
/// <param name="pathParameters">Path parameters for the request</param>
public CountRequestBuilder(Dictionary<string, object> pathParameters) : base("{+baseurl}/accessReviewDecisions/$count{?%24filter,%24search}", pathParameters)
{
}
/// <summary>
/// Instantiates a new <see cref="CountRequestBuilder"/> and sets the default values.
/// Instantiates a new <see cref="global::ApiSdk.AccessReviewDecisions.Count.CountRequestBuilder"/> and sets the default values.
/// </summary>
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
public CountRequestBuilder(string rawUrl) : base("{+baseurl}/accessReviewDecisions/$count{?%24filter,%24search}", rawUrl)
Expand All @@ -77,11 +80,11 @@ public CountRequestBuilder(string rawUrl) : base("{+baseurl}/accessReviewDecisio
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<CountRequestBuilderGetQueryParameters>>? requestConfiguration = default)
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<global::ApiSdk.AccessReviewDecisions.Count.CountRequestBuilder.CountRequestBuilderGetQueryParameters>>? requestConfiguration = default)
{
#nullable restore
#else
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<CountRequestBuilderGetQueryParameters>> requestConfiguration = default)
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<global::ApiSdk.AccessReviewDecisions.Count.CountRequestBuilder.CountRequestBuilderGetQueryParameters>> requestConfiguration = default)
{
#endif
var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters);
Expand All @@ -92,7 +95,8 @@ public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<Co
/// <summary>
/// Get the number of the resource
/// </summary>
public class CountRequestBuilderGetQueryParameters
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
public partial class CountRequestBuilderGetQueryParameters
{
/// <summary>Filter items by property values</summary>
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
Expand All @@ -117,3 +121,4 @@ public class CountRequestBuilderGetQueryParameters
}
}
}
#pragma warning restore CS0618
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
// <auto-generated/>
#pragma warning disable CS0618
using ApiSdk.Models.ODataErrors;
using ApiSdk.Models;
using Microsoft.Kiota.Abstractions.Extensions;
using Microsoft.Kiota.Abstractions.Serialization;
using Microsoft.Kiota.Abstractions;
using Microsoft.Kiota.Cli.Commons.Extensions;
Expand All @@ -19,7 +21,8 @@ namespace ApiSdk.AccessReviewDecisions.Item
/// <summary>
/// Provides operations to manage the collection of accessReviewDecision entities.
/// </summary>
public class AccessReviewDecisionItemRequestBuilder : BaseCliRequestBuilder
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
public partial class AccessReviewDecisionItemRequestBuilder : BaseCliRequestBuilder
{
/// <summary>
/// Delete entity from accessReviewDecisions
Expand Down Expand Up @@ -138,8 +141,8 @@ public Command BuildPatchCommand()
var cancellationToken = invocationContext.GetCancellationToken();
var reqAdapter = invocationContext.GetRequestAdapter();
using var stream = new MemoryStream(Encoding.UTF8.GetBytes(body));
var parseNode = ParseNodeFactoryRegistry.DefaultInstance.GetRootParseNode("application/json", stream);
var model = parseNode.GetObjectValue<AccessReviewDecision>(AccessReviewDecision.CreateFromDiscriminatorValue);
var parseNode = await ParseNodeFactoryRegistry.DefaultInstance.GetRootParseNodeAsync("application/json", stream, cancellationToken);
var model = parseNode.GetObjectValue<global::ApiSdk.Models.AccessReviewDecision>(global::ApiSdk.Models.AccessReviewDecision.CreateFromDiscriminatorValue);
if (model is null) {
Console.Error.WriteLine("No model data to send.");
return;
Expand All @@ -160,14 +163,14 @@ public Command BuildPatchCommand()
return command;
}
/// <summary>
/// Instantiates a new <see cref="AccessReviewDecisionItemRequestBuilder"/> and sets the default values.
/// Instantiates a new <see cref="global::ApiSdk.AccessReviewDecisions.Item.AccessReviewDecisionItemRequestBuilder"/> and sets the default values.
/// </summary>
/// <param name="pathParameters">Path parameters for the request</param>
public AccessReviewDecisionItemRequestBuilder(Dictionary<string, object> pathParameters) : base("{+baseurl}/accessReviewDecisions/{accessReviewDecision%2Did}{?%24expand,%24select}", pathParameters)
{
}
/// <summary>
/// Instantiates a new <see cref="AccessReviewDecisionItemRequestBuilder"/> and sets the default values.
/// Instantiates a new <see cref="global::ApiSdk.AccessReviewDecisions.Item.AccessReviewDecisionItemRequestBuilder"/> and sets the default values.
/// </summary>
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
public AccessReviewDecisionItemRequestBuilder(string rawUrl) : base("{+baseurl}/accessReviewDecisions/{accessReviewDecision%2Did}{?%24expand,%24select}", rawUrl)
Expand Down Expand Up @@ -199,11 +202,11 @@ public RequestInformation ToDeleteRequestInformation(Action<RequestConfiguration
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<AccessReviewDecisionItemRequestBuilderGetQueryParameters>>? requestConfiguration = default)
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<global::ApiSdk.AccessReviewDecisions.Item.AccessReviewDecisionItemRequestBuilder.AccessReviewDecisionItemRequestBuilderGetQueryParameters>>? requestConfiguration = default)
{
#nullable restore
#else
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<AccessReviewDecisionItemRequestBuilderGetQueryParameters>> requestConfiguration = default)
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<global::ApiSdk.AccessReviewDecisions.Item.AccessReviewDecisionItemRequestBuilder.AccessReviewDecisionItemRequestBuilderGetQueryParameters>> requestConfiguration = default)
{
#endif
var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters);
Expand All @@ -219,11 +222,11 @@ public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<Ac
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
public RequestInformation ToPatchRequestInformation(AccessReviewDecision body, Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default)
public RequestInformation ToPatchRequestInformation(global::ApiSdk.Models.AccessReviewDecision body, Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default)
{
#nullable restore
#else
public RequestInformation ToPatchRequestInformation(AccessReviewDecision body, Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default)
public RequestInformation ToPatchRequestInformation(global::ApiSdk.Models.AccessReviewDecision body, Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default)
{
#endif
_ = body ?? throw new ArgumentNullException(nameof(body));
Expand All @@ -235,7 +238,8 @@ public RequestInformation ToPatchRequestInformation(AccessReviewDecision body, A
/// <summary>
/// Get entity from accessReviewDecisions by key
/// </summary>
public class AccessReviewDecisionItemRequestBuilderGetQueryParameters
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
public partial class AccessReviewDecisionItemRequestBuilderGetQueryParameters
{
/// <summary>Expand related entities</summary>
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
Expand All @@ -260,3 +264,4 @@ public class AccessReviewDecisionItemRequestBuilderGetQueryParameters
}
}
}
#pragma warning restore CS0618
Loading
Loading