mirror of
https://github.com/claunia/marechai.git
synced 2025-12-16 19:14:25 +00:00
Compare commits
8 Commits
9847c987b5
...
955c2f9654
| Author | SHA1 | Date | |
|---|---|---|---|
|
955c2f9654
|
|||
|
4a5708b910
|
|||
|
5bffbc342e
|
|||
|
392c69350f
|
|||
|
2bb07845e1
|
|||
|
1053617622
|
|||
|
30b60c0e96
|
|||
|
14596c5499
|
@@ -1,7 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework Condition="'$(MSBuildProjectName)' != 'Marechai.App'">net10.0</TargetFramework>
|
|
||||||
<Company>Canary Islands Computer Museum</Company>
|
<Company>Canary Islands Computer Museum</Company>
|
||||||
<Copyright>Copyright © 2003-2026 Natalia Portillo</Copyright>
|
<Copyright>Copyright © 2003-2026 Natalia Portillo</Copyright>
|
||||||
<Product>Canary Islands Computer Museum Website</Product>
|
<Product>Canary Islands Computer Museum Website</Product>
|
||||||
|
|||||||
@@ -1,11 +1,12 @@
|
|||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
|
using Marechai.App.Services;
|
||||||
using Microsoft.UI.Xaml;
|
using Microsoft.UI.Xaml;
|
||||||
using Uno.Extensions;
|
using Uno.Extensions;
|
||||||
using Uno.Extensions.Configuration;
|
using Uno.Extensions.Configuration;
|
||||||
using Uno.Extensions.Hosting;
|
using Uno.Extensions.Hosting;
|
||||||
|
using Uno.Extensions.Http;
|
||||||
using Uno.Extensions.Localization;
|
using Uno.Extensions.Localization;
|
||||||
using Uno.Extensions.Navigation;
|
using Uno.Extensions.Navigation;
|
||||||
using Uno.Resizetizer;
|
|
||||||
using Uno.UI;
|
using Uno.UI;
|
||||||
|
|
||||||
namespace Marechai.App;
|
namespace Marechai.App;
|
||||||
@@ -13,76 +14,95 @@ namespace Marechai.App;
|
|||||||
public partial class App : Application
|
public partial class App : Application
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Initializes the singleton application object. This is the first line of authored code
|
/// Initializes the singleton application object. This is the first line of authored code
|
||||||
/// executed, and as such is the logical equivalent of main() or WinMain().
|
/// executed, and as such is the logical equivalent of main() or WinMain().
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public App()
|
public App()
|
||||||
{
|
{
|
||||||
this.InitializeComponent();
|
InitializeComponent();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected Window? MainWindow { get; private set; }
|
protected Window? MainWindow { get; private set; }
|
||||||
protected IHost? Host { get; private set; }
|
protected IHost? Host { get; private set; }
|
||||||
|
|
||||||
protected async override void OnLaunched(LaunchActivatedEventArgs args)
|
protected override async void OnLaunched(LaunchActivatedEventArgs args)
|
||||||
{
|
{
|
||||||
var builder = this.CreateBuilder(args)
|
IApplicationBuilder builder = this.CreateBuilder(args)
|
||||||
// Add navigation support for toolkit controls such as TabBar and NavigationView
|
|
||||||
.UseToolkitNavigation()
|
|
||||||
.Configure(host => host
|
|
||||||
#if DEBUG
|
|
||||||
// Switch to Development environment when running in DEBUG
|
|
||||||
.UseEnvironment(Environments.Development)
|
|
||||||
#endif
|
|
||||||
.UseLogging(configure: (context, logBuilder) =>
|
|
||||||
{
|
|
||||||
// Configure log levels for different categories of logging
|
|
||||||
logBuilder
|
|
||||||
.SetMinimumLevel(
|
|
||||||
context.HostingEnvironment.IsDevelopment() ? LogLevel.Information : LogLevel.Warning)
|
|
||||||
|
|
||||||
// Default filters for core Uno Platform namespaces
|
// Add navigation support for toolkit controls such as TabBar and NavigationView
|
||||||
.CoreLogLevel(LogLevel.Warning);
|
.UseToolkitNavigation()
|
||||||
|
.Configure(host => host
|
||||||
// Uno Platform namespace filter groups
|
|
||||||
// Uncomment individual methods to see more detailed logging
|
|
||||||
//// Generic Xaml events
|
|
||||||
//logBuilder.XamlLogLevel(LogLevel.Debug);
|
|
||||||
//// Layout specific messages
|
|
||||||
//logBuilder.XamlLayoutLogLevel(LogLevel.Debug);
|
|
||||||
//// Storage messages
|
|
||||||
//logBuilder.StorageLogLevel(LogLevel.Debug);
|
|
||||||
//// Binding related messages
|
|
||||||
//logBuilder.XamlBindingLogLevel(LogLevel.Debug);
|
|
||||||
//// Binder memory references tracking
|
|
||||||
//logBuilder.BinderMemoryReferenceLogLevel(LogLevel.Debug);
|
|
||||||
//// DevServer and HotReload related
|
|
||||||
//logBuilder.HotReloadCoreLogLevel(LogLevel.Information);
|
|
||||||
//// Debug JS interop
|
|
||||||
//logBuilder.WebAssemblyLogLevel(LogLevel.Debug);
|
|
||||||
}, enableUnoLogging: true)
|
|
||||||
.UseSerilog(consoleLoggingEnabled: true, fileLoggingEnabled: true)
|
|
||||||
.UseConfiguration(configure: configBuilder =>
|
|
||||||
configBuilder
|
|
||||||
.EmbeddedSource<App>()
|
|
||||||
.Section<AppConfig>()
|
|
||||||
)
|
|
||||||
// Enable localization (see appsettings.json for supported languages)
|
|
||||||
.UseLocalization()
|
|
||||||
.UseHttp((context, services) =>
|
|
||||||
{
|
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
// DelegatingHandler will be automatically injected
|
|
||||||
services.AddTransient<DelegatingHandler, DebugHttpHandler>();
|
// Switch to Development environment when running in DEBUG
|
||||||
|
.UseEnvironment(Environments.Development)
|
||||||
#endif
|
#endif
|
||||||
})
|
.UseLogging((context, logBuilder) =>
|
||||||
.ConfigureServices((context, services) =>
|
{
|
||||||
{
|
// Configure log levels for different categories of logging
|
||||||
// TODO: Register your services
|
logBuilder
|
||||||
//services.AddSingleton<IMyService, MyService>();
|
.SetMinimumLevel(context
|
||||||
})
|
.HostingEnvironment
|
||||||
.UseNavigation(RegisterRoutes)
|
.IsDevelopment()
|
||||||
);
|
? LogLevel.Information
|
||||||
|
: LogLevel.Warning)
|
||||||
|
|
||||||
|
// Default filters for core Uno Platform namespaces
|
||||||
|
.CoreLogLevel(LogLevel.Warning);
|
||||||
|
|
||||||
|
// Uno Platform namespace filter groups
|
||||||
|
// Uncomment individual methods to see more detailed logging
|
||||||
|
//// Generic Xaml events
|
||||||
|
//logBuilder.XamlLogLevel(LogLevel.Debug);
|
||||||
|
//// Layout specific messages
|
||||||
|
//logBuilder.XamlLayoutLogLevel(LogLevel.Debug);
|
||||||
|
//// Storage messages
|
||||||
|
//logBuilder.StorageLogLevel(LogLevel.Debug);
|
||||||
|
//// Binding related messages
|
||||||
|
//logBuilder.XamlBindingLogLevel(LogLevel.Debug);
|
||||||
|
//// Binder memory references tracking
|
||||||
|
//logBuilder.BinderMemoryReferenceLogLevel(LogLevel.Debug);
|
||||||
|
//// DevServer and HotReload related
|
||||||
|
//logBuilder.HotReloadCoreLogLevel(LogLevel.Information);
|
||||||
|
//// Debug JS interop
|
||||||
|
//logBuilder.WebAssemblyLogLevel(LogLevel.Debug);
|
||||||
|
},
|
||||||
|
true)
|
||||||
|
.UseSerilog(true, true)
|
||||||
|
.UseConfiguration(configure: configBuilder =>
|
||||||
|
configBuilder.EmbeddedSource<App>()
|
||||||
|
.Section<AppConfig>())
|
||||||
|
|
||||||
|
// Enable localization (see appsettings.json for supported languages)
|
||||||
|
.UseLocalization()
|
||||||
|
.UseHttp((context, services) =>
|
||||||
|
{
|
||||||
|
#if DEBUG
|
||||||
|
|
||||||
|
// DelegatingHandler will be automatically injected
|
||||||
|
services
|
||||||
|
.AddTransient<DelegatingHandler,
|
||||||
|
DebugHttpHandler>();
|
||||||
|
#endif
|
||||||
|
services.AddKiotaClientV2<ApiClient>(context,
|
||||||
|
new EndpointOptions
|
||||||
|
{
|
||||||
|
Url = context.Configuration
|
||||||
|
.GetSection("ApiClient:Url")
|
||||||
|
.Value ??
|
||||||
|
|
||||||
|
// Fallback to a default URL if not configured
|
||||||
|
"https://localhost:5023"
|
||||||
|
});
|
||||||
|
})
|
||||||
|
.ConfigureServices((context, services) =>
|
||||||
|
{
|
||||||
|
// Register application services
|
||||||
|
services.AddSingleton<NewsService>();
|
||||||
|
services.AddSingleton<NewsViewModel>();
|
||||||
|
})
|
||||||
|
.UseNavigation(RegisterRoutes));
|
||||||
|
|
||||||
MainWindow = builder.Window;
|
MainWindow = builder.Window;
|
||||||
|
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
@@ -95,20 +115,16 @@ public partial class App : Application
|
|||||||
|
|
||||||
private static void RegisterRoutes(IViewRegistry views, IRouteRegistry routes)
|
private static void RegisterRoutes(IViewRegistry views, IRouteRegistry routes)
|
||||||
{
|
{
|
||||||
views.Register(
|
views.Register(new ViewMap(ViewModel: typeof(ShellViewModel)),
|
||||||
new ViewMap(ViewModel: typeof(ShellViewModel)),
|
new ViewMap<MainPage, MainViewModel>(),
|
||||||
new ViewMap<MainPage, MainViewModel>(),
|
new DataViewMap<SecondPage, SecondViewModel, Entity>());
|
||||||
new DataViewMap<SecondPage, SecondViewModel, Entity>()
|
|
||||||
);
|
|
||||||
|
|
||||||
routes.Register(
|
routes.Register(new RouteMap("",
|
||||||
new RouteMap("", View: views.FindByViewModel<ShellViewModel>(),
|
views.FindByViewModel<ShellViewModel>(),
|
||||||
Nested:
|
Nested:
|
||||||
[
|
[
|
||||||
new("Main", View: views.FindByViewModel<MainViewModel>(), IsDefault: true),
|
new RouteMap("Main", views.FindByViewModel<MainViewModel>(), true),
|
||||||
new("Second", View: views.FindByViewModel<SecondViewModel>()),
|
new RouteMap("Second", views.FindByViewModel<SecondViewModel>())
|
||||||
]
|
]));
|
||||||
)
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,42 +1,45 @@
|
|||||||
<Project Sdk="Uno.Sdk">
|
<Project Sdk="Uno.Sdk">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFrameworks>net10.0-android;net10.0-browserwasm;net10.0-desktop</TargetFrameworks>
|
<TargetFrameworks>net10.0-android;net10.0-browserwasm;net10.0-desktop</TargetFrameworks>
|
||||||
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows')) Or $([MSBuild]::IsOSPlatform('macos'))">$(TargetFrameworks);net10.0-ios</TargetFrameworks>
|
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows')) Or $([MSBuild]::IsOSPlatform('macos'))">$(TargetFrameworks);net10.0-ios</TargetFrameworks>
|
||||||
|
|
||||||
<OutputType>Exe</OutputType>
|
<OutputType>Exe</OutputType>
|
||||||
<UnoSingleProject>true</UnoSingleProject>
|
<UnoSingleProject>true</UnoSingleProject>
|
||||||
|
|
||||||
<!-- Display name -->
|
<!-- Display name -->
|
||||||
<ApplicationTitle>Marechai.App</ApplicationTitle>
|
<ApplicationTitle>Marechai.App</ApplicationTitle>
|
||||||
<!-- App Identifier -->
|
<!-- App Identifier -->
|
||||||
<ApplicationId>net.marechai.app</ApplicationId>
|
<ApplicationId>net.marechai.app</ApplicationId>
|
||||||
<!-- Versions -->
|
<!-- Versions -->
|
||||||
<ApplicationDisplayVersion>1.0</ApplicationDisplayVersion>
|
<ApplicationDisplayVersion>1.0</ApplicationDisplayVersion>
|
||||||
<ApplicationVersion>1</ApplicationVersion>
|
<ApplicationVersion>1</ApplicationVersion>
|
||||||
<!-- Package Publisher -->
|
<!-- Package Publisher -->
|
||||||
<ApplicationPublisher>O=Marechai.App</ApplicationPublisher>
|
<ApplicationPublisher>O=Marechai.App</ApplicationPublisher>
|
||||||
<!-- Package Description -->
|
<!-- Package Description -->
|
||||||
<Description>Marechai.App powered by Uno Platform.</Description>
|
<Description>Marechai.App powered by Uno Platform.</Description>
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
UnoFeatures let's you quickly add and manage implicit package references based on the features you want to use.
|
UnoFeatures let's you quickly add and manage implicit package references based on the features you want to use.
|
||||||
https://aka.platform.uno/singleproject-features
|
https://aka.platform.uno/singleproject-features
|
||||||
-->
|
-->
|
||||||
<UnoFeatures>
|
<UnoFeatures>
|
||||||
Lottie;
|
Lottie;
|
||||||
Hosting;
|
Hosting;
|
||||||
Toolkit;
|
Toolkit;
|
||||||
Logging;
|
Logging;
|
||||||
LoggingSerilog;
|
LoggingSerilog;
|
||||||
Mvvm;
|
Mvvm;
|
||||||
Configuration;
|
Configuration;
|
||||||
HttpKiota;
|
HttpKiota;
|
||||||
Serialization;
|
Serialization;
|
||||||
Localization;
|
Localization;
|
||||||
Navigation;
|
Navigation;
|
||||||
ThemeService;
|
ThemeService;
|
||||||
SkiaRenderer;
|
SkiaRenderer;
|
||||||
</UnoFeatures>
|
</UnoFeatures>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<ProjectReference Include="..\Marechai.Data\Marechai.Data.csproj"/>
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
|||||||
@@ -1,29 +1,132 @@
|
|||||||
<Page x:Class="Marechai.App.Presentation.MainPage"
|
<?xml version="1.0"
|
||||||
|
encoding="utf-8"?>
|
||||||
|
|
||||||
|
<Page x:Class="Marechai.App.Presentation.MainPage"
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:local="using:Marechai.App.Presentation"
|
|
||||||
xmlns:uen="using:Uno.Extensions.Navigation.UI"
|
|
||||||
xmlns:utu="using:Uno.Toolkit.UI"
|
xmlns:utu="using:Uno.Toolkit.UI"
|
||||||
NavigationCacheMode="Required"
|
NavigationCacheMode="Required"
|
||||||
Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
|
Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
|
||||||
<ScrollViewer IsTabStop="True">
|
|
||||||
<Grid utu:SafeArea.Insets="VisibleBounds">
|
|
||||||
<Grid.RowDefinitions>
|
|
||||||
<RowDefinition Height="Auto" />
|
|
||||||
<RowDefinition />
|
|
||||||
</Grid.RowDefinitions>
|
|
||||||
<utu:NavigationBar Content="{Binding Title}" />
|
|
||||||
|
|
||||||
<StackPanel Grid.Row="1"
|
<Grid utu:SafeArea.Insets="VisibleBounds">
|
||||||
HorizontalAlignment="Center"
|
<Grid.RowDefinitions>
|
||||||
VerticalAlignment="Center"
|
<RowDefinition Height="Auto" /> <RowDefinition Height="*" />
|
||||||
Spacing="16">
|
</Grid.RowDefinitions>
|
||||||
<TextBox Text="{Binding Name, Mode=TwoWay}"
|
|
||||||
PlaceholderText="Enter your name:" />
|
<!-- Header -->
|
||||||
<Button Content="Go to Second Page"
|
<utu:NavigationBar Content="{Binding Title}" />
|
||||||
AutomationProperties.AutomationId="SecondPageButton"
|
|
||||||
Command="{Binding GoToSecond}" />
|
<!-- Refresh Container with Pull-to-Refresh -->
|
||||||
</StackPanel>
|
<RefreshContainer Grid.Row="1"
|
||||||
|
x:Name="RefreshContainer"
|
||||||
|
RefreshRequested="RefreshContainer_RefreshRequested">
|
||||||
|
<ScrollViewer>
|
||||||
|
<Grid Padding="16">
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="Auto" /> <RowDefinition Height="Auto" /> <RowDefinition Height="*" />
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
|
<!-- News Title Section -->
|
||||||
|
<StackPanel Grid.Row="0"
|
||||||
|
Margin="0,0,0,16">
|
||||||
|
<TextBlock Text="Latest News"
|
||||||
|
FontSize="32"
|
||||||
|
FontWeight="Bold"
|
||||||
|
Foreground="{ThemeResource SystemAccentColor}"
|
||||||
|
Margin="0,0,0,8" />
|
||||||
|
<TextBlock Text="Stay updated with the latest additions to the database"
|
||||||
|
FontSize="14"
|
||||||
|
Foreground="{ThemeResource SystemBaseMediumColor}"
|
||||||
|
TextWrapping="Wrap" />
|
||||||
|
</StackPanel>
|
||||||
|
|
||||||
|
<!-- Loading State -->
|
||||||
|
<StackPanel Grid.Row="2"
|
||||||
|
Visibility="{Binding NewsViewModel.IsLoading}"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
HorizontalAlignment="Center"
|
||||||
|
Padding="32"
|
||||||
|
Spacing="16">
|
||||||
|
<ProgressRing IsActive="True"
|
||||||
|
IsIndeterminate="True"
|
||||||
|
Height="48"
|
||||||
|
Width="48"
|
||||||
|
Foreground="{ThemeResource SystemAccentColor}" />
|
||||||
|
<TextBlock Text="Loading latest news..."
|
||||||
|
FontSize="16"
|
||||||
|
TextAlignment="Center"
|
||||||
|
Foreground="{ThemeResource SystemBaseMediumColor}" />
|
||||||
|
</StackPanel>
|
||||||
|
|
||||||
|
<!-- Error State -->
|
||||||
|
<StackPanel Grid.Row="2"
|
||||||
|
Visibility="{Binding NewsViewModel.HasError}"
|
||||||
|
VerticalAlignment="Center"
|
||||||
|
Spacing="16"
|
||||||
|
Padding="32">
|
||||||
|
<InfoBar IsOpen="True"
|
||||||
|
Severity="Error"
|
||||||
|
Title="Unable to Load News"
|
||||||
|
Message="{Binding NewsViewModel.ErrorMessage}"
|
||||||
|
IsClosable="False" />
|
||||||
|
<Button Content="Retry"
|
||||||
|
Command="{Binding NewsViewModel.LoadNews}"
|
||||||
|
HorizontalAlignment="Center"
|
||||||
|
Style="{ThemeResource AccentButtonStyle}" />
|
||||||
|
</StackPanel>
|
||||||
|
|
||||||
|
<!-- News Feed -->
|
||||||
|
<ItemsControl Grid.Row="2"
|
||||||
|
ItemsSource="{Binding NewsViewModel.NewsList}">
|
||||||
|
<ItemsControl.ItemTemplate>
|
||||||
|
<DataTemplate>
|
||||||
|
<Border Margin="0,0,0,12"
|
||||||
|
CornerRadius="8"
|
||||||
|
Background="{ThemeResource CardBackgroundFillColorDefaultBrush}"
|
||||||
|
BorderBrush="{ThemeResource CardStrokeColorDefaultBrush}"
|
||||||
|
BorderThickness="1"
|
||||||
|
Padding="16">
|
||||||
|
<Grid>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="Auto" /> <RowDefinition Height="Auto" />
|
||||||
|
<RowDefinition Height="Auto" />
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
|
||||||
|
<!-- Date -->
|
||||||
|
<TextBlock Grid.Row="0"
|
||||||
|
Text="{Binding News.Timestamp}"
|
||||||
|
FontSize="12"
|
||||||
|
Foreground="{ThemeResource SystemBaseMediumColor}"
|
||||||
|
Margin="0,0,0,12" />
|
||||||
|
|
||||||
|
<!-- News Title/Text (Localized) -->
|
||||||
|
<TextBlock Grid.Row="1"
|
||||||
|
Text="{Binding DisplayText}"
|
||||||
|
FontSize="16"
|
||||||
|
FontWeight="SemiBold"
|
||||||
|
Foreground="{ThemeResource SystemBaseHighColor}"
|
||||||
|
TextWrapping="Wrap"
|
||||||
|
Margin="0,0,0,12" />
|
||||||
|
|
||||||
|
<!-- Item Name Link -->
|
||||||
|
<HyperlinkButton Grid.Row="2"
|
||||||
|
Content="{Binding News.ItemName}"
|
||||||
|
FontSize="14"
|
||||||
|
Padding="0,4,0,4"
|
||||||
|
Foreground="{ThemeResource SystemAccentColor}" />
|
||||||
|
</Grid>
|
||||||
|
</Border>
|
||||||
|
</DataTemplate>
|
||||||
|
</ItemsControl.ItemTemplate>
|
||||||
|
<ItemsControl.ItemsPanel>
|
||||||
|
<ItemsPanelTemplate>
|
||||||
|
<StackPanel Orientation="Vertical"
|
||||||
|
Spacing="0" />
|
||||||
|
</ItemsPanelTemplate>
|
||||||
|
</ItemsControl.ItemsPanel>
|
||||||
|
</ItemsControl>
|
||||||
|
</Grid>
|
||||||
|
</ScrollViewer>
|
||||||
|
</RefreshContainer>
|
||||||
</Grid>
|
</Grid>
|
||||||
</ScrollViewer>
|
</Page>
|
||||||
</Page>
|
|
||||||
@@ -1,11 +1,60 @@
|
|||||||
using Microsoft.UI.Xaml.Controls;
|
using System;
|
||||||
|
using Windows.Foundation;
|
||||||
|
using Microsoft.UI.Xaml;
|
||||||
|
using Microsoft.UI.Xaml.Controls;
|
||||||
|
using Microsoft.UI.Xaml.Navigation;
|
||||||
|
|
||||||
namespace Marechai.App.Presentation;
|
namespace Marechai.App.Presentation;
|
||||||
|
|
||||||
public sealed partial class MainPage : Page
|
public sealed partial class MainPage : Page
|
||||||
{
|
{
|
||||||
|
private bool _initialNewsLoaded;
|
||||||
|
|
||||||
public MainPage()
|
public MainPage()
|
||||||
{
|
{
|
||||||
this.InitializeComponent();
|
InitializeComponent();
|
||||||
|
DataContextChanged += MainPage_DataContextChanged;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
private void MainPage_DataContextChanged(FrameworkElement sender, DataContextChangedEventArgs args)
|
||||||
|
{
|
||||||
|
if(_initialNewsLoaded) return;
|
||||||
|
|
||||||
|
if(args.NewValue is MainViewModel viewModel && viewModel.NewsViewModel is not null)
|
||||||
|
{
|
||||||
|
_initialNewsLoaded = true;
|
||||||
|
_ = viewModel.NewsViewModel.LoadNews.ExecuteAsync(null);
|
||||||
|
DataContextChanged -= MainPage_DataContextChanged;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void OnNavigatedTo(NavigationEventArgs e)
|
||||||
|
{
|
||||||
|
base.OnNavigatedTo(e);
|
||||||
|
|
||||||
|
if(_initialNewsLoaded) return;
|
||||||
|
|
||||||
|
if(DataContext is MainViewModel viewModel && viewModel.NewsViewModel is not null)
|
||||||
|
{
|
||||||
|
_initialNewsLoaded = true;
|
||||||
|
_ = viewModel.NewsViewModel.LoadNews.ExecuteAsync(null);
|
||||||
|
DataContextChanged -= MainPage_DataContextChanged;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private async void RefreshContainer_RefreshRequested(RefreshContainer sender, RefreshRequestedEventArgs args)
|
||||||
|
{
|
||||||
|
// Handle pull-to-refresh
|
||||||
|
using Deferral deferral = args.GetDeferral();
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
if(DataContext is MainViewModel viewModel && viewModel.NewsViewModel is not null)
|
||||||
|
await viewModel.NewsViewModel.LoadNews.ExecuteAsync(null);
|
||||||
|
}
|
||||||
|
catch(Exception)
|
||||||
|
{
|
||||||
|
// Swallow to avoid process crash; NewsViewModel already logs errors.
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -6,20 +6,22 @@ namespace Marechai.App.Presentation;
|
|||||||
|
|
||||||
public partial class MainViewModel : ObservableObject
|
public partial class MainViewModel : ObservableObject
|
||||||
{
|
{
|
||||||
private INavigator _navigator;
|
private readonly INavigator _navigator;
|
||||||
|
|
||||||
[ObservableProperty] private string? name;
|
[ObservableProperty]
|
||||||
|
private string? name;
|
||||||
|
[ObservableProperty]
|
||||||
|
private NewsViewModel? newsViewModel;
|
||||||
|
|
||||||
public MainViewModel(
|
public MainViewModel(IStringLocalizer localizer, IOptions<AppConfig> appInfo, INavigator navigator,
|
||||||
IStringLocalizer localizer,
|
NewsViewModel newsViewModel)
|
||||||
IOptions<AppConfig> appInfo,
|
|
||||||
INavigator navigator)
|
|
||||||
{
|
{
|
||||||
_navigator = navigator;
|
_navigator = navigator;
|
||||||
Title = "Main";
|
NewsViewModel = newsViewModel;
|
||||||
Title += $" - {localizer["ApplicationName"]}";
|
Title = "Marechai";
|
||||||
Title += $" - {appInfo?.Value?.Environment}";
|
Title += $" - {localizer["ApplicationName"]}";
|
||||||
GoToSecond = new AsyncRelayCommand(GoToSecondView);
|
Title += $" - {appInfo?.Value?.Environment}";
|
||||||
|
GoToSecond = new AsyncRelayCommand(GoToSecondView);
|
||||||
}
|
}
|
||||||
|
|
||||||
public string? Title { get; }
|
public string? Title { get; }
|
||||||
@@ -30,4 +32,4 @@ public partial class MainViewModel : ObservableObject
|
|||||||
{
|
{
|
||||||
await _navigator.NavigateViewModelAsync<SecondViewModel>(this, data: new Entity(Name!));
|
await _navigator.NavigateViewModelAsync<SecondViewModel>(this, data: new Entity(Name!));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
108
Marechai.App/Presentation/NewsViewModel.cs
Normal file
108
Marechai.App/Presentation/NewsViewModel.cs
Normal file
@@ -0,0 +1,108 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Collections.ObjectModel;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using Marechai.App.Services;
|
||||||
|
using Marechai.Data;
|
||||||
|
|
||||||
|
namespace Marechai.App.Presentation;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Wrapper for NewsDto with generated display text
|
||||||
|
/// </summary>
|
||||||
|
public class NewsItemViewModel
|
||||||
|
{
|
||||||
|
public required NewsDto News { get; init; }
|
||||||
|
public required string DisplayText { get; init; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public partial class NewsViewModel : ObservableObject
|
||||||
|
{
|
||||||
|
private readonly IStringLocalizer _localizer;
|
||||||
|
private readonly ILogger<NewsViewModel> _logger;
|
||||||
|
private readonly NewsService _newsService;
|
||||||
|
|
||||||
|
[ObservableProperty]
|
||||||
|
private string errorMessage = string.Empty;
|
||||||
|
|
||||||
|
[ObservableProperty]
|
||||||
|
private bool hasError;
|
||||||
|
|
||||||
|
[ObservableProperty]
|
||||||
|
private bool isLoading;
|
||||||
|
|
||||||
|
[ObservableProperty]
|
||||||
|
private ObservableCollection<NewsItemViewModel> newsList = new();
|
||||||
|
|
||||||
|
public NewsViewModel(NewsService newsService, IStringLocalizer localizer, ILogger<NewsViewModel> logger)
|
||||||
|
{
|
||||||
|
_newsService = newsService;
|
||||||
|
_localizer = localizer;
|
||||||
|
_logger = logger;
|
||||||
|
LoadNews = new AsyncRelayCommand(LoadNewsAsync);
|
||||||
|
}
|
||||||
|
|
||||||
|
public IAsyncRelayCommand LoadNews { get; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Generates localized text based on NewsType
|
||||||
|
/// </summary>
|
||||||
|
private string GetLocalizedTextForNewsType(NewsType type)
|
||||||
|
{
|
||||||
|
return type switch
|
||||||
|
{
|
||||||
|
NewsType.NewComputerInDb => _localizer["New computer in database"].Value,
|
||||||
|
NewsType.NewConsoleInDb => _localizer["New console in database"].Value,
|
||||||
|
NewsType.NewComputerInCollection => _localizer["New computer in collection"].Value,
|
||||||
|
NewsType.NewConsoleInCollection => _localizer["New console in collection"].Value,
|
||||||
|
NewsType.UpdatedComputerInDb => _localizer["Updated computer in database"].Value,
|
||||||
|
NewsType.UpdatedConsoleInDb => _localizer["Updated console in database"].Value,
|
||||||
|
NewsType.UpdatedComputerInCollection => _localizer["Updated computer in collection"].Value,
|
||||||
|
NewsType.UpdatedConsoleInCollection => _localizer["Updated console in collection"].Value,
|
||||||
|
_ => string.Empty
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Loads the latest news from the API
|
||||||
|
/// </summary>
|
||||||
|
private async Task LoadNewsAsync()
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
IsLoading = true;
|
||||||
|
ErrorMessage = string.Empty;
|
||||||
|
HasError = false;
|
||||||
|
NewsList.Clear();
|
||||||
|
|
||||||
|
List<NewsDto> news = await _newsService.GetLatestNewsAsync();
|
||||||
|
|
||||||
|
if(news.Count == 0)
|
||||||
|
{
|
||||||
|
ErrorMessage = _localizer["No news available"].Value;
|
||||||
|
HasError = true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
foreach(NewsDto item in news)
|
||||||
|
{
|
||||||
|
NewsList.Add(new NewsItemViewModel
|
||||||
|
{
|
||||||
|
News = item,
|
||||||
|
DisplayText = GetLocalizedTextForNewsType((NewsType)(item.Type ?? 0))
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch(Exception ex)
|
||||||
|
{
|
||||||
|
_logger.LogError("Error loading news: {Exception}", ex.Message);
|
||||||
|
ErrorMessage = _localizer["Failed to load news. Please try again later."].Value;
|
||||||
|
HasError = true;
|
||||||
|
}
|
||||||
|
finally
|
||||||
|
{
|
||||||
|
IsLoading = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
318
Marechai.App/Services/Client/ApiClient.cs
Normal file
318
Marechai.App/Services/Client/ApiClient.cs
Normal file
@@ -0,0 +1,318 @@
|
|||||||
|
// <auto-generated/>
|
||||||
|
#pragma warning disable CS0618
|
||||||
|
using Marechai.App.Auth;
|
||||||
|
using Marechai.App.Books;
|
||||||
|
using Marechai.App.BrowserTests;
|
||||||
|
using Marechai.App.ByLetter;
|
||||||
|
using Marechai.App.ByYear;
|
||||||
|
using Marechai.App.Companies;
|
||||||
|
using Marechai.App.Computers;
|
||||||
|
using Marechai.App.Consoles;
|
||||||
|
using Marechai.App.Count;
|
||||||
|
using Marechai.App.Countries;
|
||||||
|
using Marechai.App.Currencies;
|
||||||
|
using Marechai.App.Documents;
|
||||||
|
using Marechai.App.Dumps;
|
||||||
|
using Marechai.App.Gpus;
|
||||||
|
using Marechai.App.InstructionSetExtensions;
|
||||||
|
using Marechai.App.InstructionSetExtensionsByProcessor;
|
||||||
|
using Marechai.App.InstructionSets;
|
||||||
|
using Marechai.App.Iso31661Numeric;
|
||||||
|
using Marechai.App.Iso4217;
|
||||||
|
using Marechai.App.Licenses;
|
||||||
|
using Marechai.App.MachineFamilies;
|
||||||
|
using Marechai.App.Machines;
|
||||||
|
using Marechai.App.Magazines;
|
||||||
|
using Marechai.App.MagazinesByMachine;
|
||||||
|
using Marechai.App.MagazinesByMachineFamily;
|
||||||
|
using Marechai.App.MaximumYear;
|
||||||
|
using Marechai.App.Medias;
|
||||||
|
using Marechai.App.MemoriesByMachine;
|
||||||
|
using Marechai.App.MinimumYear;
|
||||||
|
using Marechai.App.News;
|
||||||
|
using Marechai.App.People;
|
||||||
|
using Marechai.App.PeopleByBook;
|
||||||
|
using Marechai.App.PeopleByDocument;
|
||||||
|
using Marechai.App.PeopleByMagazine;
|
||||||
|
using Marechai.App.Processor;
|
||||||
|
using Marechai.App.Processors;
|
||||||
|
using Marechai.App.ProcessorsByMachine;
|
||||||
|
using Marechai.App.Resolutions;
|
||||||
|
using Marechai.App.ResolutionsByGpu;
|
||||||
|
using Marechai.App.ResolutionsByScreen;
|
||||||
|
using Marechai.App.Screens;
|
||||||
|
using Marechai.App.ScreensByMachine;
|
||||||
|
using Marechai.App.Software;
|
||||||
|
using Marechai.App.SoundSynths;
|
||||||
|
using Marechai.App.SoundSynthsByMachine;
|
||||||
|
using Marechai.App.StorageByMachine;
|
||||||
|
using Microsoft.Kiota.Abstractions.Extensions;
|
||||||
|
using Microsoft.Kiota.Abstractions;
|
||||||
|
using Microsoft.Kiota.Serialization.Form;
|
||||||
|
using Microsoft.Kiota.Serialization.Json;
|
||||||
|
using Microsoft.Kiota.Serialization.Multipart;
|
||||||
|
using Microsoft.Kiota.Serialization.Text;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.IO;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System;
|
||||||
|
namespace Marechai.App
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// The main entry point of the SDK, exposes the configuration and the fluent API.
|
||||||
|
/// </summary>
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class ApiClient : BaseRequestBuilder
|
||||||
|
{
|
||||||
|
/// <summary>The auth property</summary>
|
||||||
|
public global::Marechai.App.Auth.AuthRequestBuilder Auth
|
||||||
|
{
|
||||||
|
get => new global::Marechai.App.Auth.AuthRequestBuilder(PathParameters, RequestAdapter);
|
||||||
|
}
|
||||||
|
/// <summary>The books property</summary>
|
||||||
|
public global::Marechai.App.Books.BooksRequestBuilder Books
|
||||||
|
{
|
||||||
|
get => new global::Marechai.App.Books.BooksRequestBuilder(PathParameters, RequestAdapter);
|
||||||
|
}
|
||||||
|
/// <summary>The browserTests property</summary>
|
||||||
|
public global::Marechai.App.BrowserTests.BrowserTestsRequestBuilder BrowserTests
|
||||||
|
{
|
||||||
|
get => new global::Marechai.App.BrowserTests.BrowserTestsRequestBuilder(PathParameters, RequestAdapter);
|
||||||
|
}
|
||||||
|
/// <summary>The byLetter property</summary>
|
||||||
|
public global::Marechai.App.ByLetter.ByLetterRequestBuilder ByLetter
|
||||||
|
{
|
||||||
|
get => new global::Marechai.App.ByLetter.ByLetterRequestBuilder(PathParameters, RequestAdapter);
|
||||||
|
}
|
||||||
|
/// <summary>The byYear property</summary>
|
||||||
|
public global::Marechai.App.ByYear.ByYearRequestBuilder ByYear
|
||||||
|
{
|
||||||
|
get => new global::Marechai.App.ByYear.ByYearRequestBuilder(PathParameters, RequestAdapter);
|
||||||
|
}
|
||||||
|
/// <summary>The companies property</summary>
|
||||||
|
public global::Marechai.App.Companies.CompaniesRequestBuilder Companies
|
||||||
|
{
|
||||||
|
get => new global::Marechai.App.Companies.CompaniesRequestBuilder(PathParameters, RequestAdapter);
|
||||||
|
}
|
||||||
|
/// <summary>The computers property</summary>
|
||||||
|
public global::Marechai.App.Computers.ComputersRequestBuilder Computers
|
||||||
|
{
|
||||||
|
get => new global::Marechai.App.Computers.ComputersRequestBuilder(PathParameters, RequestAdapter);
|
||||||
|
}
|
||||||
|
/// <summary>The consoles property</summary>
|
||||||
|
public global::Marechai.App.Consoles.ConsolesRequestBuilder Consoles
|
||||||
|
{
|
||||||
|
get => new global::Marechai.App.Consoles.ConsolesRequestBuilder(PathParameters, RequestAdapter);
|
||||||
|
}
|
||||||
|
/// <summary>The count property</summary>
|
||||||
|
public global::Marechai.App.Count.CountRequestBuilder Count
|
||||||
|
{
|
||||||
|
get => new global::Marechai.App.Count.CountRequestBuilder(PathParameters, RequestAdapter);
|
||||||
|
}
|
||||||
|
/// <summary>The countries property</summary>
|
||||||
|
public global::Marechai.App.Countries.CountriesRequestBuilder Countries
|
||||||
|
{
|
||||||
|
get => new global::Marechai.App.Countries.CountriesRequestBuilder(PathParameters, RequestAdapter);
|
||||||
|
}
|
||||||
|
/// <summary>The currencies property</summary>
|
||||||
|
public global::Marechai.App.Currencies.CurrenciesRequestBuilder Currencies
|
||||||
|
{
|
||||||
|
get => new global::Marechai.App.Currencies.CurrenciesRequestBuilder(PathParameters, RequestAdapter);
|
||||||
|
}
|
||||||
|
/// <summary>The documents property</summary>
|
||||||
|
public global::Marechai.App.Documents.DocumentsRequestBuilder Documents
|
||||||
|
{
|
||||||
|
get => new global::Marechai.App.Documents.DocumentsRequestBuilder(PathParameters, RequestAdapter);
|
||||||
|
}
|
||||||
|
/// <summary>The dumps property</summary>
|
||||||
|
public global::Marechai.App.Dumps.DumpsRequestBuilder Dumps
|
||||||
|
{
|
||||||
|
get => new global::Marechai.App.Dumps.DumpsRequestBuilder(PathParameters, RequestAdapter);
|
||||||
|
}
|
||||||
|
/// <summary>The gpus property</summary>
|
||||||
|
public global::Marechai.App.Gpus.GpusRequestBuilder Gpus
|
||||||
|
{
|
||||||
|
get => new global::Marechai.App.Gpus.GpusRequestBuilder(PathParameters, RequestAdapter);
|
||||||
|
}
|
||||||
|
/// <summary>The instructionSetExtensions property</summary>
|
||||||
|
public global::Marechai.App.InstructionSetExtensions.InstructionSetExtensionsRequestBuilder InstructionSetExtensions
|
||||||
|
{
|
||||||
|
get => new global::Marechai.App.InstructionSetExtensions.InstructionSetExtensionsRequestBuilder(PathParameters, RequestAdapter);
|
||||||
|
}
|
||||||
|
/// <summary>The instructionSetExtensionsByProcessor property</summary>
|
||||||
|
public global::Marechai.App.InstructionSetExtensionsByProcessor.InstructionSetExtensionsByProcessorRequestBuilder InstructionSetExtensionsByProcessor
|
||||||
|
{
|
||||||
|
get => new global::Marechai.App.InstructionSetExtensionsByProcessor.InstructionSetExtensionsByProcessorRequestBuilder(PathParameters, RequestAdapter);
|
||||||
|
}
|
||||||
|
/// <summary>The instructionSets property</summary>
|
||||||
|
public global::Marechai.App.InstructionSets.InstructionSetsRequestBuilder InstructionSets
|
||||||
|
{
|
||||||
|
get => new global::Marechai.App.InstructionSets.InstructionSetsRequestBuilder(PathParameters, RequestAdapter);
|
||||||
|
}
|
||||||
|
/// <summary>The iso31661Numeric property</summary>
|
||||||
|
public global::Marechai.App.Iso31661Numeric.Iso31661NumericRequestBuilder Iso31661Numeric
|
||||||
|
{
|
||||||
|
get => new global::Marechai.App.Iso31661Numeric.Iso31661NumericRequestBuilder(PathParameters, RequestAdapter);
|
||||||
|
}
|
||||||
|
/// <summary>The iso4217 property</summary>
|
||||||
|
public global::Marechai.App.Iso4217.Iso4217RequestBuilder Iso4217
|
||||||
|
{
|
||||||
|
get => new global::Marechai.App.Iso4217.Iso4217RequestBuilder(PathParameters, RequestAdapter);
|
||||||
|
}
|
||||||
|
/// <summary>The licenses property</summary>
|
||||||
|
public global::Marechai.App.Licenses.LicensesRequestBuilder Licenses
|
||||||
|
{
|
||||||
|
get => new global::Marechai.App.Licenses.LicensesRequestBuilder(PathParameters, RequestAdapter);
|
||||||
|
}
|
||||||
|
/// <summary>The machineFamilies property</summary>
|
||||||
|
public global::Marechai.App.MachineFamilies.MachineFamiliesRequestBuilder MachineFamilies
|
||||||
|
{
|
||||||
|
get => new global::Marechai.App.MachineFamilies.MachineFamiliesRequestBuilder(PathParameters, RequestAdapter);
|
||||||
|
}
|
||||||
|
/// <summary>The machines property</summary>
|
||||||
|
public global::Marechai.App.Machines.MachinesRequestBuilder Machines
|
||||||
|
{
|
||||||
|
get => new global::Marechai.App.Machines.MachinesRequestBuilder(PathParameters, RequestAdapter);
|
||||||
|
}
|
||||||
|
/// <summary>The magazines property</summary>
|
||||||
|
public global::Marechai.App.Magazines.MagazinesRequestBuilder Magazines
|
||||||
|
{
|
||||||
|
get => new global::Marechai.App.Magazines.MagazinesRequestBuilder(PathParameters, RequestAdapter);
|
||||||
|
}
|
||||||
|
/// <summary>The magazinesByMachine property</summary>
|
||||||
|
public global::Marechai.App.MagazinesByMachine.MagazinesByMachineRequestBuilder MagazinesByMachine
|
||||||
|
{
|
||||||
|
get => new global::Marechai.App.MagazinesByMachine.MagazinesByMachineRequestBuilder(PathParameters, RequestAdapter);
|
||||||
|
}
|
||||||
|
/// <summary>The magazinesByMachineFamily property</summary>
|
||||||
|
public global::Marechai.App.MagazinesByMachineFamily.MagazinesByMachineFamilyRequestBuilder MagazinesByMachineFamily
|
||||||
|
{
|
||||||
|
get => new global::Marechai.App.MagazinesByMachineFamily.MagazinesByMachineFamilyRequestBuilder(PathParameters, RequestAdapter);
|
||||||
|
}
|
||||||
|
/// <summary>The maximumYear property</summary>
|
||||||
|
public global::Marechai.App.MaximumYear.MaximumYearRequestBuilder MaximumYear
|
||||||
|
{
|
||||||
|
get => new global::Marechai.App.MaximumYear.MaximumYearRequestBuilder(PathParameters, RequestAdapter);
|
||||||
|
}
|
||||||
|
/// <summary>The medias property</summary>
|
||||||
|
public global::Marechai.App.Medias.MediasRequestBuilder Medias
|
||||||
|
{
|
||||||
|
get => new global::Marechai.App.Medias.MediasRequestBuilder(PathParameters, RequestAdapter);
|
||||||
|
}
|
||||||
|
/// <summary>The memoriesByMachine property</summary>
|
||||||
|
public global::Marechai.App.MemoriesByMachine.MemoriesByMachineRequestBuilder MemoriesByMachine
|
||||||
|
{
|
||||||
|
get => new global::Marechai.App.MemoriesByMachine.MemoriesByMachineRequestBuilder(PathParameters, RequestAdapter);
|
||||||
|
}
|
||||||
|
/// <summary>The minimumYear property</summary>
|
||||||
|
public global::Marechai.App.MinimumYear.MinimumYearRequestBuilder MinimumYear
|
||||||
|
{
|
||||||
|
get => new global::Marechai.App.MinimumYear.MinimumYearRequestBuilder(PathParameters, RequestAdapter);
|
||||||
|
}
|
||||||
|
/// <summary>The news property</summary>
|
||||||
|
public global::Marechai.App.News.NewsRequestBuilder News
|
||||||
|
{
|
||||||
|
get => new global::Marechai.App.News.NewsRequestBuilder(PathParameters, RequestAdapter);
|
||||||
|
}
|
||||||
|
/// <summary>The people property</summary>
|
||||||
|
public global::Marechai.App.People.PeopleRequestBuilder People
|
||||||
|
{
|
||||||
|
get => new global::Marechai.App.People.PeopleRequestBuilder(PathParameters, RequestAdapter);
|
||||||
|
}
|
||||||
|
/// <summary>The peopleByBook property</summary>
|
||||||
|
public global::Marechai.App.PeopleByBook.PeopleByBookRequestBuilder PeopleByBook
|
||||||
|
{
|
||||||
|
get => new global::Marechai.App.PeopleByBook.PeopleByBookRequestBuilder(PathParameters, RequestAdapter);
|
||||||
|
}
|
||||||
|
/// <summary>The peopleByDocument property</summary>
|
||||||
|
public global::Marechai.App.PeopleByDocument.PeopleByDocumentRequestBuilder PeopleByDocument
|
||||||
|
{
|
||||||
|
get => new global::Marechai.App.PeopleByDocument.PeopleByDocumentRequestBuilder(PathParameters, RequestAdapter);
|
||||||
|
}
|
||||||
|
/// <summary>The peopleByMagazine property</summary>
|
||||||
|
public global::Marechai.App.PeopleByMagazine.PeopleByMagazineRequestBuilder PeopleByMagazine
|
||||||
|
{
|
||||||
|
get => new global::Marechai.App.PeopleByMagazine.PeopleByMagazineRequestBuilder(PathParameters, RequestAdapter);
|
||||||
|
}
|
||||||
|
/// <summary>The processor property</summary>
|
||||||
|
public global::Marechai.App.Processor.ProcessorRequestBuilder Processor
|
||||||
|
{
|
||||||
|
get => new global::Marechai.App.Processor.ProcessorRequestBuilder(PathParameters, RequestAdapter);
|
||||||
|
}
|
||||||
|
/// <summary>The processors property</summary>
|
||||||
|
public global::Marechai.App.Processors.ProcessorsRequestBuilder Processors
|
||||||
|
{
|
||||||
|
get => new global::Marechai.App.Processors.ProcessorsRequestBuilder(PathParameters, RequestAdapter);
|
||||||
|
}
|
||||||
|
/// <summary>The processorsByMachine property</summary>
|
||||||
|
public global::Marechai.App.ProcessorsByMachine.ProcessorsByMachineRequestBuilder ProcessorsByMachine
|
||||||
|
{
|
||||||
|
get => new global::Marechai.App.ProcessorsByMachine.ProcessorsByMachineRequestBuilder(PathParameters, RequestAdapter);
|
||||||
|
}
|
||||||
|
/// <summary>The resolutions property</summary>
|
||||||
|
public global::Marechai.App.Resolutions.ResolutionsRequestBuilder Resolutions
|
||||||
|
{
|
||||||
|
get => new global::Marechai.App.Resolutions.ResolutionsRequestBuilder(PathParameters, RequestAdapter);
|
||||||
|
}
|
||||||
|
/// <summary>The resolutionsByGpu property</summary>
|
||||||
|
public global::Marechai.App.ResolutionsByGpu.ResolutionsByGpuRequestBuilder ResolutionsByGpu
|
||||||
|
{
|
||||||
|
get => new global::Marechai.App.ResolutionsByGpu.ResolutionsByGpuRequestBuilder(PathParameters, RequestAdapter);
|
||||||
|
}
|
||||||
|
/// <summary>The resolutionsByScreen property</summary>
|
||||||
|
public global::Marechai.App.ResolutionsByScreen.ResolutionsByScreenRequestBuilder ResolutionsByScreen
|
||||||
|
{
|
||||||
|
get => new global::Marechai.App.ResolutionsByScreen.ResolutionsByScreenRequestBuilder(PathParameters, RequestAdapter);
|
||||||
|
}
|
||||||
|
/// <summary>The screens property</summary>
|
||||||
|
public global::Marechai.App.Screens.ScreensRequestBuilder Screens
|
||||||
|
{
|
||||||
|
get => new global::Marechai.App.Screens.ScreensRequestBuilder(PathParameters, RequestAdapter);
|
||||||
|
}
|
||||||
|
/// <summary>The screensByMachine property</summary>
|
||||||
|
public global::Marechai.App.ScreensByMachine.ScreensByMachineRequestBuilder ScreensByMachine
|
||||||
|
{
|
||||||
|
get => new global::Marechai.App.ScreensByMachine.ScreensByMachineRequestBuilder(PathParameters, RequestAdapter);
|
||||||
|
}
|
||||||
|
/// <summary>The software property</summary>
|
||||||
|
public global::Marechai.App.Software.SoftwareRequestBuilder Software
|
||||||
|
{
|
||||||
|
get => new global::Marechai.App.Software.SoftwareRequestBuilder(PathParameters, RequestAdapter);
|
||||||
|
}
|
||||||
|
/// <summary>The soundSynths property</summary>
|
||||||
|
public global::Marechai.App.SoundSynths.SoundSynthsRequestBuilder SoundSynths
|
||||||
|
{
|
||||||
|
get => new global::Marechai.App.SoundSynths.SoundSynthsRequestBuilder(PathParameters, RequestAdapter);
|
||||||
|
}
|
||||||
|
/// <summary>The soundSynthsByMachine property</summary>
|
||||||
|
public global::Marechai.App.SoundSynthsByMachine.SoundSynthsByMachineRequestBuilder SoundSynthsByMachine
|
||||||
|
{
|
||||||
|
get => new global::Marechai.App.SoundSynthsByMachine.SoundSynthsByMachineRequestBuilder(PathParameters, RequestAdapter);
|
||||||
|
}
|
||||||
|
/// <summary>The storageByMachine property</summary>
|
||||||
|
public global::Marechai.App.StorageByMachine.StorageByMachineRequestBuilder StorageByMachine
|
||||||
|
{
|
||||||
|
get => new global::Marechai.App.StorageByMachine.StorageByMachineRequestBuilder(PathParameters, RequestAdapter);
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Instantiates a new <see cref="global::Marechai.App.ApiClient"/> and sets the default values.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||||
|
public ApiClient(IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}", new Dictionary<string, object>())
|
||||||
|
{
|
||||||
|
ApiClientBuilder.RegisterDefaultSerializer<JsonSerializationWriterFactory>();
|
||||||
|
ApiClientBuilder.RegisterDefaultSerializer<TextSerializationWriterFactory>();
|
||||||
|
ApiClientBuilder.RegisterDefaultSerializer<FormSerializationWriterFactory>();
|
||||||
|
ApiClientBuilder.RegisterDefaultSerializer<MultipartSerializationWriterFactory>();
|
||||||
|
ApiClientBuilder.RegisterDefaultDeserializer<JsonParseNodeFactory>();
|
||||||
|
ApiClientBuilder.RegisterDefaultDeserializer<TextParseNodeFactory>();
|
||||||
|
ApiClientBuilder.RegisterDefaultDeserializer<FormParseNodeFactory>();
|
||||||
|
if (string.IsNullOrEmpty(RequestAdapter.BaseUrl))
|
||||||
|
{
|
||||||
|
RequestAdapter.BaseUrl = "http://localhost:5023";
|
||||||
|
}
|
||||||
|
PathParameters.TryAdd("baseurl", RequestAdapter.BaseUrl);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#pragma warning restore CS0618
|
||||||
41
Marechai.App/Services/Client/Auth/AuthRequestBuilder.cs
Normal file
41
Marechai.App/Services/Client/Auth/AuthRequestBuilder.cs
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
// <auto-generated/>
|
||||||
|
#pragma warning disable CS0618
|
||||||
|
using Marechai.App.Auth.Login;
|
||||||
|
using Microsoft.Kiota.Abstractions.Extensions;
|
||||||
|
using Microsoft.Kiota.Abstractions;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.IO;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System;
|
||||||
|
namespace Marechai.App.Auth
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Builds and executes requests for operations under \auth
|
||||||
|
/// </summary>
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class AuthRequestBuilder : BaseRequestBuilder
|
||||||
|
{
|
||||||
|
/// <summary>The login property</summary>
|
||||||
|
public global::Marechai.App.Auth.Login.LoginRequestBuilder Login
|
||||||
|
{
|
||||||
|
get => new global::Marechai.App.Auth.Login.LoginRequestBuilder(PathParameters, RequestAdapter);
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Instantiates a new <see cref="global::Marechai.App.Auth.AuthRequestBuilder"/> and sets the default values.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="pathParameters">Path parameters for the request</param>
|
||||||
|
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||||
|
public AuthRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/auth", pathParameters)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Instantiates a new <see cref="global::Marechai.App.Auth.AuthRequestBuilder"/> and sets the default values.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||||
|
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||||
|
public AuthRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/auth", rawUrl)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#pragma warning restore CS0618
|
||||||
@@ -0,0 +1,98 @@
|
|||||||
|
// <auto-generated/>
|
||||||
|
#pragma warning disable CS0618
|
||||||
|
using Marechai.App.Models;
|
||||||
|
using Microsoft.Kiota.Abstractions.Extensions;
|
||||||
|
using Microsoft.Kiota.Abstractions.Serialization;
|
||||||
|
using Microsoft.Kiota.Abstractions;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.IO;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Threading;
|
||||||
|
using System;
|
||||||
|
namespace Marechai.App.Auth.Login
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Builds and executes requests for operations under \auth\login
|
||||||
|
/// </summary>
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class LoginRequestBuilder : BaseRequestBuilder
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Instantiates a new <see cref="global::Marechai.App.Auth.Login.LoginRequestBuilder"/> and sets the default values.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="pathParameters">Path parameters for the request</param>
|
||||||
|
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||||
|
public LoginRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/auth/login", pathParameters)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Instantiates a new <see cref="global::Marechai.App.Auth.Login.LoginRequestBuilder"/> and sets the default values.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||||
|
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||||
|
public LoginRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/auth/login", rawUrl)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="global::Marechai.App.Models.AuthResponse"/></returns>
|
||||||
|
/// <param name="body">The request body</param>
|
||||||
|
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
|
||||||
|
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 400 status code</exception>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 401 status code</exception>
|
||||||
|
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||||
|
#nullable enable
|
||||||
|
public async Task<global::Marechai.App.Models.AuthResponse?> PostAsync(global::Marechai.App.Models.AuthRequest body, Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public async Task<global::Marechai.App.Models.AuthResponse> PostAsync(global::Marechai.App.Models.AuthRequest body, Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body));
|
||||||
|
var requestInfo = ToPostRequestInformation(body, requestConfiguration);
|
||||||
|
var errorMapping = new Dictionary<string, ParsableFactory<IParsable>>
|
||||||
|
{
|
||||||
|
{ "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
{ "401", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
};
|
||||||
|
return await RequestAdapter.SendAsync<global::Marechai.App.Models.AuthResponse>(requestInfo, global::Marechai.App.Models.AuthResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false);
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="RequestInformation"/></returns>
|
||||||
|
/// <param name="body">The request body</param>
|
||||||
|
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||||
|
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||||
|
#nullable enable
|
||||||
|
public RequestInformation ToPostRequestInformation(global::Marechai.App.Models.AuthRequest body, Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public RequestInformation ToPostRequestInformation(global::Marechai.App.Models.AuthRequest body, Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body));
|
||||||
|
var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters);
|
||||||
|
requestInfo.Configure(requestConfiguration);
|
||||||
|
requestInfo.Headers.TryAdd("Accept", "application/json");
|
||||||
|
requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body);
|
||||||
|
return requestInfo;
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>A <see cref="global::Marechai.App.Auth.Login.LoginRequestBuilder"/></returns>
|
||||||
|
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||||
|
public global::Marechai.App.Auth.Login.LoginRequestBuilder WithUrl(string rawUrl)
|
||||||
|
{
|
||||||
|
return new global::Marechai.App.Auth.Login.LoginRequestBuilder(rawUrl, RequestAdapter);
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Configuration for the request such as headers, query parameters, and middleware options.
|
||||||
|
/// </summary>
|
||||||
|
[Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")]
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class LoginRequestBuilderPostRequestConfiguration : RequestConfiguration<DefaultQueryParameters>
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#pragma warning restore CS0618
|
||||||
181
Marechai.App/Services/Client/Books/BooksRequestBuilder.cs
Normal file
181
Marechai.App/Services/Client/Books/BooksRequestBuilder.cs
Normal file
@@ -0,0 +1,181 @@
|
|||||||
|
// <auto-generated/>
|
||||||
|
#pragma warning disable CS0618
|
||||||
|
using Marechai.App.Books.Companies;
|
||||||
|
using Marechai.App.Books.Item;
|
||||||
|
using Marechai.App.Books.Scans;
|
||||||
|
using Marechai.App.Models;
|
||||||
|
using Microsoft.Kiota.Abstractions.Extensions;
|
||||||
|
using Microsoft.Kiota.Abstractions.Serialization;
|
||||||
|
using Microsoft.Kiota.Abstractions;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.IO;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Threading;
|
||||||
|
using System;
|
||||||
|
namespace Marechai.App.Books
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Builds and executes requests for operations under \books
|
||||||
|
/// </summary>
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class BooksRequestBuilder : BaseRequestBuilder
|
||||||
|
{
|
||||||
|
/// <summary>The companies property</summary>
|
||||||
|
public global::Marechai.App.Books.Companies.CompaniesRequestBuilder Companies
|
||||||
|
{
|
||||||
|
get => new global::Marechai.App.Books.Companies.CompaniesRequestBuilder(PathParameters, RequestAdapter);
|
||||||
|
}
|
||||||
|
/// <summary>The scans property</summary>
|
||||||
|
public global::Marechai.App.Books.Scans.ScansRequestBuilder Scans
|
||||||
|
{
|
||||||
|
get => new global::Marechai.App.Books.Scans.ScansRequestBuilder(PathParameters, RequestAdapter);
|
||||||
|
}
|
||||||
|
/// <summary>Gets an item from the Marechai.App.books.item collection</summary>
|
||||||
|
/// <param name="position">Unique identifier of the item</param>
|
||||||
|
/// <returns>A <see cref="global::Marechai.App.Books.Item.BookItemRequestBuilder"/></returns>
|
||||||
|
public global::Marechai.App.Books.Item.BookItemRequestBuilder this[long position]
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
var urlTplParams = new Dictionary<string, object>(PathParameters);
|
||||||
|
urlTplParams.Add("book%2Did", position);
|
||||||
|
return new global::Marechai.App.Books.Item.BookItemRequestBuilder(urlTplParams, RequestAdapter);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// <summary>Gets an item from the Marechai.App.books.item collection</summary>
|
||||||
|
/// <param name="position">Unique identifier of the item</param>
|
||||||
|
/// <returns>A <see cref="global::Marechai.App.Books.Item.BookItemRequestBuilder"/></returns>
|
||||||
|
[Obsolete("This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead.")]
|
||||||
|
public global::Marechai.App.Books.Item.BookItemRequestBuilder this[string position]
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
var urlTplParams = new Dictionary<string, object>(PathParameters);
|
||||||
|
if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("book%2Did", position);
|
||||||
|
return new global::Marechai.App.Books.Item.BookItemRequestBuilder(urlTplParams, RequestAdapter);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Instantiates a new <see cref="global::Marechai.App.Books.BooksRequestBuilder"/> and sets the default values.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="pathParameters">Path parameters for the request</param>
|
||||||
|
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||||
|
public BooksRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/books", pathParameters)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Instantiates a new <see cref="global::Marechai.App.Books.BooksRequestBuilder"/> and sets the default values.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||||
|
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||||
|
public BooksRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/books", rawUrl)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <returns>A List<global::Marechai.App.Models.BookDto></returns>
|
||||||
|
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
|
||||||
|
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 400 status code</exception>
|
||||||
|
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||||
|
#nullable enable
|
||||||
|
public async Task<List<global::Marechai.App.Models.BookDto>?> GetAsync(Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public async Task<List<global::Marechai.App.Models.BookDto>> GetAsync(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
var requestInfo = ToGetRequestInformation(requestConfiguration);
|
||||||
|
var errorMapping = new Dictionary<string, ParsableFactory<IParsable>>
|
||||||
|
{
|
||||||
|
{ "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
};
|
||||||
|
var collectionResult = await RequestAdapter.SendCollectionAsync<global::Marechai.App.Models.BookDto>(requestInfo, global::Marechai.App.Models.BookDto.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false);
|
||||||
|
return collectionResult?.AsList();
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="UntypedNode"/></returns>
|
||||||
|
/// <param name="body">The request body</param>
|
||||||
|
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
|
||||||
|
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 400 status code</exception>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 401 status code</exception>
|
||||||
|
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||||
|
#nullable enable
|
||||||
|
public async Task<UntypedNode?> PostAsync(global::Marechai.App.Models.BookDto body, Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public async Task<UntypedNode> PostAsync(global::Marechai.App.Models.BookDto body, Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body));
|
||||||
|
var requestInfo = ToPostRequestInformation(body, requestConfiguration);
|
||||||
|
var errorMapping = new Dictionary<string, ParsableFactory<IParsable>>
|
||||||
|
{
|
||||||
|
{ "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
{ "401", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
};
|
||||||
|
return await RequestAdapter.SendAsync<UntypedNode>(requestInfo, UntypedNode.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false);
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="RequestInformation"/></returns>
|
||||||
|
/// <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<DefaultQueryParameters>>? requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters);
|
||||||
|
requestInfo.Configure(requestConfiguration);
|
||||||
|
requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9");
|
||||||
|
return requestInfo;
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="RequestInformation"/></returns>
|
||||||
|
/// <param name="body">The request body</param>
|
||||||
|
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||||
|
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||||
|
#nullable enable
|
||||||
|
public RequestInformation ToPostRequestInformation(global::Marechai.App.Models.BookDto body, Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public RequestInformation ToPostRequestInformation(global::Marechai.App.Models.BookDto body, Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body));
|
||||||
|
var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters);
|
||||||
|
requestInfo.Configure(requestConfiguration);
|
||||||
|
requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9");
|
||||||
|
requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body);
|
||||||
|
return requestInfo;
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>A <see cref="global::Marechai.App.Books.BooksRequestBuilder"/></returns>
|
||||||
|
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||||
|
public global::Marechai.App.Books.BooksRequestBuilder WithUrl(string rawUrl)
|
||||||
|
{
|
||||||
|
return new global::Marechai.App.Books.BooksRequestBuilder(rawUrl, RequestAdapter);
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Configuration for the request such as headers, query parameters, and middleware options.
|
||||||
|
/// </summary>
|
||||||
|
[Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")]
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class BooksRequestBuilderGetRequestConfiguration : RequestConfiguration<DefaultQueryParameters>
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Configuration for the request such as headers, query parameters, and middleware options.
|
||||||
|
/// </summary>
|
||||||
|
[Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")]
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class BooksRequestBuilderPostRequestConfiguration : RequestConfiguration<DefaultQueryParameters>
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#pragma warning restore CS0618
|
||||||
@@ -0,0 +1,124 @@
|
|||||||
|
// <auto-generated/>
|
||||||
|
#pragma warning disable CS0618
|
||||||
|
using Marechai.App.Books.Companies.Item;
|
||||||
|
using Marechai.App.Models;
|
||||||
|
using Microsoft.Kiota.Abstractions.Extensions;
|
||||||
|
using Microsoft.Kiota.Abstractions.Serialization;
|
||||||
|
using Microsoft.Kiota.Abstractions;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.IO;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Threading;
|
||||||
|
using System;
|
||||||
|
namespace Marechai.App.Books.Companies
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Builds and executes requests for operations under \books\companies
|
||||||
|
/// </summary>
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class CompaniesRequestBuilder : BaseRequestBuilder
|
||||||
|
{
|
||||||
|
/// <summary>Gets an item from the Marechai.App.books.companies.item collection</summary>
|
||||||
|
/// <param name="position">Unique identifier of the item</param>
|
||||||
|
/// <returns>A <see cref="global::Marechai.App.Books.Companies.Item.CompaniesItemRequestBuilder"/></returns>
|
||||||
|
public global::Marechai.App.Books.Companies.Item.CompaniesItemRequestBuilder this[long position]
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
var urlTplParams = new Dictionary<string, object>(PathParameters);
|
||||||
|
urlTplParams.Add("id", position);
|
||||||
|
return new global::Marechai.App.Books.Companies.Item.CompaniesItemRequestBuilder(urlTplParams, RequestAdapter);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// <summary>Gets an item from the Marechai.App.books.companies.item collection</summary>
|
||||||
|
/// <param name="position">Unique identifier of the item</param>
|
||||||
|
/// <returns>A <see cref="global::Marechai.App.Books.Companies.Item.CompaniesItemRequestBuilder"/></returns>
|
||||||
|
[Obsolete("This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead.")]
|
||||||
|
public global::Marechai.App.Books.Companies.Item.CompaniesItemRequestBuilder this[string position]
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
var urlTplParams = new Dictionary<string, object>(PathParameters);
|
||||||
|
if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("id", position);
|
||||||
|
return new global::Marechai.App.Books.Companies.Item.CompaniesItemRequestBuilder(urlTplParams, RequestAdapter);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Instantiates a new <see cref="global::Marechai.App.Books.Companies.CompaniesRequestBuilder"/> and sets the default values.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="pathParameters">Path parameters for the request</param>
|
||||||
|
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||||
|
public CompaniesRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/books/companies", pathParameters)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Instantiates a new <see cref="global::Marechai.App.Books.Companies.CompaniesRequestBuilder"/> and sets the default values.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||||
|
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||||
|
public CompaniesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/books/companies", rawUrl)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="UntypedNode"/></returns>
|
||||||
|
/// <param name="body">The request body</param>
|
||||||
|
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
|
||||||
|
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 400 status code</exception>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 401 status code</exception>
|
||||||
|
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||||
|
#nullable enable
|
||||||
|
public async Task<UntypedNode?> PostAsync(global::Marechai.App.Models.CompanyByBookDto body, Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public async Task<UntypedNode> PostAsync(global::Marechai.App.Models.CompanyByBookDto body, Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body));
|
||||||
|
var requestInfo = ToPostRequestInformation(body, requestConfiguration);
|
||||||
|
var errorMapping = new Dictionary<string, ParsableFactory<IParsable>>
|
||||||
|
{
|
||||||
|
{ "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
{ "401", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
};
|
||||||
|
return await RequestAdapter.SendAsync<UntypedNode>(requestInfo, UntypedNode.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false);
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="RequestInformation"/></returns>
|
||||||
|
/// <param name="body">The request body</param>
|
||||||
|
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||||
|
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||||
|
#nullable enable
|
||||||
|
public RequestInformation ToPostRequestInformation(global::Marechai.App.Models.CompanyByBookDto body, Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public RequestInformation ToPostRequestInformation(global::Marechai.App.Models.CompanyByBookDto body, Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body));
|
||||||
|
var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters);
|
||||||
|
requestInfo.Configure(requestConfiguration);
|
||||||
|
requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9");
|
||||||
|
requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body);
|
||||||
|
return requestInfo;
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>A <see cref="global::Marechai.App.Books.Companies.CompaniesRequestBuilder"/></returns>
|
||||||
|
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||||
|
public global::Marechai.App.Books.Companies.CompaniesRequestBuilder WithUrl(string rawUrl)
|
||||||
|
{
|
||||||
|
return new global::Marechai.App.Books.Companies.CompaniesRequestBuilder(rawUrl, RequestAdapter);
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Configuration for the request such as headers, query parameters, and middleware options.
|
||||||
|
/// </summary>
|
||||||
|
[Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")]
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class CompaniesRequestBuilderPostRequestConfiguration : RequestConfiguration<DefaultQueryParameters>
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#pragma warning restore CS0618
|
||||||
@@ -0,0 +1,95 @@
|
|||||||
|
// <auto-generated/>
|
||||||
|
#pragma warning disable CS0618
|
||||||
|
using Marechai.App.Models;
|
||||||
|
using Microsoft.Kiota.Abstractions.Extensions;
|
||||||
|
using Microsoft.Kiota.Abstractions.Serialization;
|
||||||
|
using Microsoft.Kiota.Abstractions;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.IO;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Threading;
|
||||||
|
using System;
|
||||||
|
namespace Marechai.App.Books.Companies.Item
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Builds and executes requests for operations under \books\companies\{id}
|
||||||
|
/// </summary>
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class CompaniesItemRequestBuilder : BaseRequestBuilder
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Instantiates a new <see cref="global::Marechai.App.Books.Companies.Item.CompaniesItemRequestBuilder"/> and sets the default values.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="pathParameters">Path parameters for the request</param>
|
||||||
|
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||||
|
public CompaniesItemRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/books/companies/{id}", pathParameters)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Instantiates a new <see cref="global::Marechai.App.Books.Companies.Item.CompaniesItemRequestBuilder"/> and sets the default values.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||||
|
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||||
|
public CompaniesItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/books/companies/{id}", rawUrl)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="string"/></returns>
|
||||||
|
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
|
||||||
|
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 400 status code</exception>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 401 status code</exception>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 404 status code</exception>
|
||||||
|
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||||
|
#nullable enable
|
||||||
|
public async Task<string?> DeleteAsync(Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public async Task<string> DeleteAsync(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
var requestInfo = ToDeleteRequestInformation(requestConfiguration);
|
||||||
|
var errorMapping = new Dictionary<string, ParsableFactory<IParsable>>
|
||||||
|
{
|
||||||
|
{ "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
{ "401", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
{ "404", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
};
|
||||||
|
return await RequestAdapter.SendPrimitiveAsync<string>(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false);
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="RequestInformation"/></returns>
|
||||||
|
/// <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 ToDeleteRequestInformation(Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public RequestInformation ToDeleteRequestInformation(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters);
|
||||||
|
requestInfo.Configure(requestConfiguration);
|
||||||
|
requestInfo.Headers.TryAdd("Accept", "application/json, text/plain;q=0.9");
|
||||||
|
return requestInfo;
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>A <see cref="global::Marechai.App.Books.Companies.Item.CompaniesItemRequestBuilder"/></returns>
|
||||||
|
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||||
|
public global::Marechai.App.Books.Companies.Item.CompaniesItemRequestBuilder WithUrl(string rawUrl)
|
||||||
|
{
|
||||||
|
return new global::Marechai.App.Books.Companies.Item.CompaniesItemRequestBuilder(rawUrl, RequestAdapter);
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Configuration for the request such as headers, query parameters, and middleware options.
|
||||||
|
/// </summary>
|
||||||
|
[Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")]
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class CompaniesItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration<DefaultQueryParameters>
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#pragma warning restore CS0618
|
||||||
@@ -0,0 +1,228 @@
|
|||||||
|
// <auto-generated/>
|
||||||
|
#pragma warning disable CS0618
|
||||||
|
using Marechai.App.Books.Item.Companies;
|
||||||
|
using Marechai.App.Books.Item.MachineFamilies;
|
||||||
|
using Marechai.App.Books.Item.Machines;
|
||||||
|
using Marechai.App.Books.Item.People;
|
||||||
|
using Marechai.App.Books.Item.Scans;
|
||||||
|
using Marechai.App.Books.Item.Synopsis;
|
||||||
|
using Marechai.App.Models;
|
||||||
|
using Microsoft.Kiota.Abstractions.Extensions;
|
||||||
|
using Microsoft.Kiota.Abstractions.Serialization;
|
||||||
|
using Microsoft.Kiota.Abstractions;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.IO;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Threading;
|
||||||
|
using System;
|
||||||
|
namespace Marechai.App.Books.Item
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Builds and executes requests for operations under \books\{book-id}
|
||||||
|
/// </summary>
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class BookItemRequestBuilder : BaseRequestBuilder
|
||||||
|
{
|
||||||
|
/// <summary>The companies property</summary>
|
||||||
|
public global::Marechai.App.Books.Item.Companies.CompaniesRequestBuilder Companies
|
||||||
|
{
|
||||||
|
get => new global::Marechai.App.Books.Item.Companies.CompaniesRequestBuilder(PathParameters, RequestAdapter);
|
||||||
|
}
|
||||||
|
/// <summary>The machineFamilies property</summary>
|
||||||
|
public global::Marechai.App.Books.Item.MachineFamilies.MachineFamiliesRequestBuilder MachineFamilies
|
||||||
|
{
|
||||||
|
get => new global::Marechai.App.Books.Item.MachineFamilies.MachineFamiliesRequestBuilder(PathParameters, RequestAdapter);
|
||||||
|
}
|
||||||
|
/// <summary>The machines property</summary>
|
||||||
|
public global::Marechai.App.Books.Item.Machines.MachinesRequestBuilder Machines
|
||||||
|
{
|
||||||
|
get => new global::Marechai.App.Books.Item.Machines.MachinesRequestBuilder(PathParameters, RequestAdapter);
|
||||||
|
}
|
||||||
|
/// <summary>The people property</summary>
|
||||||
|
public global::Marechai.App.Books.Item.People.PeopleRequestBuilder People
|
||||||
|
{
|
||||||
|
get => new global::Marechai.App.Books.Item.People.PeopleRequestBuilder(PathParameters, RequestAdapter);
|
||||||
|
}
|
||||||
|
/// <summary>The scans property</summary>
|
||||||
|
public global::Marechai.App.Books.Item.Scans.ScansRequestBuilder Scans
|
||||||
|
{
|
||||||
|
get => new global::Marechai.App.Books.Item.Scans.ScansRequestBuilder(PathParameters, RequestAdapter);
|
||||||
|
}
|
||||||
|
/// <summary>The synopsis property</summary>
|
||||||
|
public global::Marechai.App.Books.Item.Synopsis.SynopsisRequestBuilder Synopsis
|
||||||
|
{
|
||||||
|
get => new global::Marechai.App.Books.Item.Synopsis.SynopsisRequestBuilder(PathParameters, RequestAdapter);
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Instantiates a new <see cref="global::Marechai.App.Books.Item.BookItemRequestBuilder"/> and sets the default values.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="pathParameters">Path parameters for the request</param>
|
||||||
|
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||||
|
public BookItemRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/books/{book%2Did}", pathParameters)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Instantiates a new <see cref="global::Marechai.App.Books.Item.BookItemRequestBuilder"/> and sets the default values.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||||
|
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||||
|
public BookItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/books/{book%2Did}", rawUrl)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="string"/></returns>
|
||||||
|
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
|
||||||
|
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 400 status code</exception>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 401 status code</exception>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 404 status code</exception>
|
||||||
|
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||||
|
#nullable enable
|
||||||
|
public async Task<string?> DeleteAsync(Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public async Task<string> DeleteAsync(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
var requestInfo = ToDeleteRequestInformation(requestConfiguration);
|
||||||
|
var errorMapping = new Dictionary<string, ParsableFactory<IParsable>>
|
||||||
|
{
|
||||||
|
{ "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
{ "401", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
{ "404", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
};
|
||||||
|
return await RequestAdapter.SendPrimitiveAsync<string>(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false);
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="global::Marechai.App.Models.BookDto"/></returns>
|
||||||
|
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
|
||||||
|
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 400 status code</exception>
|
||||||
|
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||||
|
#nullable enable
|
||||||
|
public async Task<global::Marechai.App.Models.BookDto?> GetAsync(Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public async Task<global::Marechai.App.Models.BookDto> GetAsync(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
var requestInfo = ToGetRequestInformation(requestConfiguration);
|
||||||
|
var errorMapping = new Dictionary<string, ParsableFactory<IParsable>>
|
||||||
|
{
|
||||||
|
{ "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
};
|
||||||
|
return await RequestAdapter.SendAsync<global::Marechai.App.Models.BookDto>(requestInfo, global::Marechai.App.Models.BookDto.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false);
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="string"/></returns>
|
||||||
|
/// <param name="body">The request body</param>
|
||||||
|
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
|
||||||
|
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 400 status code</exception>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 401 status code</exception>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 404 status code</exception>
|
||||||
|
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||||
|
#nullable enable
|
||||||
|
public async Task<string?> PutAsync(global::Marechai.App.Models.BookDto body, Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public async Task<string> PutAsync(global::Marechai.App.Models.BookDto body, Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body));
|
||||||
|
var requestInfo = ToPutRequestInformation(body, requestConfiguration);
|
||||||
|
var errorMapping = new Dictionary<string, ParsableFactory<IParsable>>
|
||||||
|
{
|
||||||
|
{ "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
{ "401", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
{ "404", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
};
|
||||||
|
return await RequestAdapter.SendPrimitiveAsync<string>(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false);
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="RequestInformation"/></returns>
|
||||||
|
/// <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 ToDeleteRequestInformation(Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public RequestInformation ToDeleteRequestInformation(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters);
|
||||||
|
requestInfo.Configure(requestConfiguration);
|
||||||
|
requestInfo.Headers.TryAdd("Accept", "application/json, text/plain;q=0.9");
|
||||||
|
return requestInfo;
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="RequestInformation"/></returns>
|
||||||
|
/// <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<DefaultQueryParameters>>? requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters);
|
||||||
|
requestInfo.Configure(requestConfiguration);
|
||||||
|
requestInfo.Headers.TryAdd("Accept", "application/json, text/plain;q=0.9");
|
||||||
|
return requestInfo;
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="RequestInformation"/></returns>
|
||||||
|
/// <param name="body">The request body</param>
|
||||||
|
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||||
|
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||||
|
#nullable enable
|
||||||
|
public RequestInformation ToPutRequestInformation(global::Marechai.App.Models.BookDto body, Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public RequestInformation ToPutRequestInformation(global::Marechai.App.Models.BookDto body, Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body));
|
||||||
|
var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters);
|
||||||
|
requestInfo.Configure(requestConfiguration);
|
||||||
|
requestInfo.Headers.TryAdd("Accept", "application/json, text/plain;q=0.9");
|
||||||
|
requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body);
|
||||||
|
return requestInfo;
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>A <see cref="global::Marechai.App.Books.Item.BookItemRequestBuilder"/></returns>
|
||||||
|
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||||
|
public global::Marechai.App.Books.Item.BookItemRequestBuilder WithUrl(string rawUrl)
|
||||||
|
{
|
||||||
|
return new global::Marechai.App.Books.Item.BookItemRequestBuilder(rawUrl, RequestAdapter);
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Configuration for the request such as headers, query parameters, and middleware options.
|
||||||
|
/// </summary>
|
||||||
|
[Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")]
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class BookItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration<DefaultQueryParameters>
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Configuration for the request such as headers, query parameters, and middleware options.
|
||||||
|
/// </summary>
|
||||||
|
[Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")]
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class BookItemRequestBuilderGetRequestConfiguration : RequestConfiguration<DefaultQueryParameters>
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Configuration for the request such as headers, query parameters, and middleware options.
|
||||||
|
/// </summary>
|
||||||
|
[Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")]
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class BookItemRequestBuilderPutRequestConfiguration : RequestConfiguration<DefaultQueryParameters>
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#pragma warning restore CS0618
|
||||||
@@ -0,0 +1,92 @@
|
|||||||
|
// <auto-generated/>
|
||||||
|
#pragma warning disable CS0618
|
||||||
|
using Marechai.App.Models;
|
||||||
|
using Microsoft.Kiota.Abstractions.Extensions;
|
||||||
|
using Microsoft.Kiota.Abstractions.Serialization;
|
||||||
|
using Microsoft.Kiota.Abstractions;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.IO;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Threading;
|
||||||
|
using System;
|
||||||
|
namespace Marechai.App.Books.Item.Companies
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Builds and executes requests for operations under \books\{book-id}\companies
|
||||||
|
/// </summary>
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class CompaniesRequestBuilder : BaseRequestBuilder
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Instantiates a new <see cref="global::Marechai.App.Books.Item.Companies.CompaniesRequestBuilder"/> and sets the default values.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="pathParameters">Path parameters for the request</param>
|
||||||
|
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||||
|
public CompaniesRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/books/{book%2Did}/companies", pathParameters)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Instantiates a new <see cref="global::Marechai.App.Books.Item.Companies.CompaniesRequestBuilder"/> and sets the default values.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||||
|
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||||
|
public CompaniesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/books/{book%2Did}/companies", rawUrl)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <returns>A List<global::Marechai.App.Models.CompanyByBookDto></returns>
|
||||||
|
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
|
||||||
|
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 400 status code</exception>
|
||||||
|
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||||
|
#nullable enable
|
||||||
|
public async Task<List<global::Marechai.App.Models.CompanyByBookDto>?> GetAsync(Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public async Task<List<global::Marechai.App.Models.CompanyByBookDto>> GetAsync(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
var requestInfo = ToGetRequestInformation(requestConfiguration);
|
||||||
|
var errorMapping = new Dictionary<string, ParsableFactory<IParsable>>
|
||||||
|
{
|
||||||
|
{ "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
};
|
||||||
|
var collectionResult = await RequestAdapter.SendCollectionAsync<global::Marechai.App.Models.CompanyByBookDto>(requestInfo, global::Marechai.App.Models.CompanyByBookDto.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false);
|
||||||
|
return collectionResult?.AsList();
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="RequestInformation"/></returns>
|
||||||
|
/// <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<DefaultQueryParameters>>? requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters);
|
||||||
|
requestInfo.Configure(requestConfiguration);
|
||||||
|
requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9");
|
||||||
|
return requestInfo;
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>A <see cref="global::Marechai.App.Books.Item.Companies.CompaniesRequestBuilder"/></returns>
|
||||||
|
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||||
|
public global::Marechai.App.Books.Item.Companies.CompaniesRequestBuilder WithUrl(string rawUrl)
|
||||||
|
{
|
||||||
|
return new global::Marechai.App.Books.Item.Companies.CompaniesRequestBuilder(rawUrl, RequestAdapter);
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Configuration for the request such as headers, query parameters, and middleware options.
|
||||||
|
/// </summary>
|
||||||
|
[Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")]
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class CompaniesRequestBuilderGetRequestConfiguration : RequestConfiguration<DefaultQueryParameters>
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#pragma warning restore CS0618
|
||||||
@@ -0,0 +1,92 @@
|
|||||||
|
// <auto-generated/>
|
||||||
|
#pragma warning disable CS0618
|
||||||
|
using Marechai.App.Models;
|
||||||
|
using Microsoft.Kiota.Abstractions.Extensions;
|
||||||
|
using Microsoft.Kiota.Abstractions.Serialization;
|
||||||
|
using Microsoft.Kiota.Abstractions;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.IO;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Threading;
|
||||||
|
using System;
|
||||||
|
namespace Marechai.App.Books.Item.MachineFamilies
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Builds and executes requests for operations under \books\{book-id}\machine-families
|
||||||
|
/// </summary>
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class MachineFamiliesRequestBuilder : BaseRequestBuilder
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Instantiates a new <see cref="global::Marechai.App.Books.Item.MachineFamilies.MachineFamiliesRequestBuilder"/> and sets the default values.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="pathParameters">Path parameters for the request</param>
|
||||||
|
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||||
|
public MachineFamiliesRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/books/{book%2Did}/machine-families", pathParameters)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Instantiates a new <see cref="global::Marechai.App.Books.Item.MachineFamilies.MachineFamiliesRequestBuilder"/> and sets the default values.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||||
|
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||||
|
public MachineFamiliesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/books/{book%2Did}/machine-families", rawUrl)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <returns>A List<global::Marechai.App.Models.BookByMachineFamilyDto></returns>
|
||||||
|
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
|
||||||
|
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 400 status code</exception>
|
||||||
|
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||||
|
#nullable enable
|
||||||
|
public async Task<List<global::Marechai.App.Models.BookByMachineFamilyDto>?> GetAsync(Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public async Task<List<global::Marechai.App.Models.BookByMachineFamilyDto>> GetAsync(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
var requestInfo = ToGetRequestInformation(requestConfiguration);
|
||||||
|
var errorMapping = new Dictionary<string, ParsableFactory<IParsable>>
|
||||||
|
{
|
||||||
|
{ "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
};
|
||||||
|
var collectionResult = await RequestAdapter.SendCollectionAsync<global::Marechai.App.Models.BookByMachineFamilyDto>(requestInfo, global::Marechai.App.Models.BookByMachineFamilyDto.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false);
|
||||||
|
return collectionResult?.AsList();
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="RequestInformation"/></returns>
|
||||||
|
/// <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<DefaultQueryParameters>>? requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters);
|
||||||
|
requestInfo.Configure(requestConfiguration);
|
||||||
|
requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9");
|
||||||
|
return requestInfo;
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>A <see cref="global::Marechai.App.Books.Item.MachineFamilies.MachineFamiliesRequestBuilder"/></returns>
|
||||||
|
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||||
|
public global::Marechai.App.Books.Item.MachineFamilies.MachineFamiliesRequestBuilder WithUrl(string rawUrl)
|
||||||
|
{
|
||||||
|
return new global::Marechai.App.Books.Item.MachineFamilies.MachineFamiliesRequestBuilder(rawUrl, RequestAdapter);
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Configuration for the request such as headers, query parameters, and middleware options.
|
||||||
|
/// </summary>
|
||||||
|
[Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")]
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class MachineFamiliesRequestBuilderGetRequestConfiguration : RequestConfiguration<DefaultQueryParameters>
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#pragma warning restore CS0618
|
||||||
@@ -0,0 +1,92 @@
|
|||||||
|
// <auto-generated/>
|
||||||
|
#pragma warning disable CS0618
|
||||||
|
using Marechai.App.Models;
|
||||||
|
using Microsoft.Kiota.Abstractions.Extensions;
|
||||||
|
using Microsoft.Kiota.Abstractions.Serialization;
|
||||||
|
using Microsoft.Kiota.Abstractions;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.IO;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Threading;
|
||||||
|
using System;
|
||||||
|
namespace Marechai.App.Books.Item.Machines
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Builds and executes requests for operations under \books\{book-id}\machines
|
||||||
|
/// </summary>
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class MachinesRequestBuilder : BaseRequestBuilder
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Instantiates a new <see cref="global::Marechai.App.Books.Item.Machines.MachinesRequestBuilder"/> and sets the default values.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="pathParameters">Path parameters for the request</param>
|
||||||
|
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||||
|
public MachinesRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/books/{book%2Did}/machines", pathParameters)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Instantiates a new <see cref="global::Marechai.App.Books.Item.Machines.MachinesRequestBuilder"/> and sets the default values.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||||
|
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||||
|
public MachinesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/books/{book%2Did}/machines", rawUrl)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <returns>A List<global::Marechai.App.Models.BookByMachineDto></returns>
|
||||||
|
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
|
||||||
|
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 400 status code</exception>
|
||||||
|
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||||
|
#nullable enable
|
||||||
|
public async Task<List<global::Marechai.App.Models.BookByMachineDto>?> GetAsync(Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public async Task<List<global::Marechai.App.Models.BookByMachineDto>> GetAsync(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
var requestInfo = ToGetRequestInformation(requestConfiguration);
|
||||||
|
var errorMapping = new Dictionary<string, ParsableFactory<IParsable>>
|
||||||
|
{
|
||||||
|
{ "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
};
|
||||||
|
var collectionResult = await RequestAdapter.SendCollectionAsync<global::Marechai.App.Models.BookByMachineDto>(requestInfo, global::Marechai.App.Models.BookByMachineDto.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false);
|
||||||
|
return collectionResult?.AsList();
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="RequestInformation"/></returns>
|
||||||
|
/// <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<DefaultQueryParameters>>? requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters);
|
||||||
|
requestInfo.Configure(requestConfiguration);
|
||||||
|
requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9");
|
||||||
|
return requestInfo;
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>A <see cref="global::Marechai.App.Books.Item.Machines.MachinesRequestBuilder"/></returns>
|
||||||
|
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||||
|
public global::Marechai.App.Books.Item.Machines.MachinesRequestBuilder WithUrl(string rawUrl)
|
||||||
|
{
|
||||||
|
return new global::Marechai.App.Books.Item.Machines.MachinesRequestBuilder(rawUrl, RequestAdapter);
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Configuration for the request such as headers, query parameters, and middleware options.
|
||||||
|
/// </summary>
|
||||||
|
[Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")]
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class MachinesRequestBuilderGetRequestConfiguration : RequestConfiguration<DefaultQueryParameters>
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#pragma warning restore CS0618
|
||||||
@@ -0,0 +1,92 @@
|
|||||||
|
// <auto-generated/>
|
||||||
|
#pragma warning disable CS0618
|
||||||
|
using Marechai.App.Models;
|
||||||
|
using Microsoft.Kiota.Abstractions.Extensions;
|
||||||
|
using Microsoft.Kiota.Abstractions.Serialization;
|
||||||
|
using Microsoft.Kiota.Abstractions;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.IO;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Threading;
|
||||||
|
using System;
|
||||||
|
namespace Marechai.App.Books.Item.People
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Builds and executes requests for operations under \books\{book-id}\people
|
||||||
|
/// </summary>
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class PeopleRequestBuilder : BaseRequestBuilder
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Instantiates a new <see cref="global::Marechai.App.Books.Item.People.PeopleRequestBuilder"/> and sets the default values.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="pathParameters">Path parameters for the request</param>
|
||||||
|
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||||
|
public PeopleRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/books/{book%2Did}/people", pathParameters)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Instantiates a new <see cref="global::Marechai.App.Books.Item.People.PeopleRequestBuilder"/> and sets the default values.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||||
|
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||||
|
public PeopleRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/books/{book%2Did}/people", rawUrl)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <returns>A List<global::Marechai.App.Models.PersonByBookDto></returns>
|
||||||
|
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
|
||||||
|
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 400 status code</exception>
|
||||||
|
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||||
|
#nullable enable
|
||||||
|
public async Task<List<global::Marechai.App.Models.PersonByBookDto>?> GetAsync(Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public async Task<List<global::Marechai.App.Models.PersonByBookDto>> GetAsync(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
var requestInfo = ToGetRequestInformation(requestConfiguration);
|
||||||
|
var errorMapping = new Dictionary<string, ParsableFactory<IParsable>>
|
||||||
|
{
|
||||||
|
{ "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
};
|
||||||
|
var collectionResult = await RequestAdapter.SendCollectionAsync<global::Marechai.App.Models.PersonByBookDto>(requestInfo, global::Marechai.App.Models.PersonByBookDto.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false);
|
||||||
|
return collectionResult?.AsList();
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="RequestInformation"/></returns>
|
||||||
|
/// <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<DefaultQueryParameters>>? requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters);
|
||||||
|
requestInfo.Configure(requestConfiguration);
|
||||||
|
requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9");
|
||||||
|
return requestInfo;
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>A <see cref="global::Marechai.App.Books.Item.People.PeopleRequestBuilder"/></returns>
|
||||||
|
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||||
|
public global::Marechai.App.Books.Item.People.PeopleRequestBuilder WithUrl(string rawUrl)
|
||||||
|
{
|
||||||
|
return new global::Marechai.App.Books.Item.People.PeopleRequestBuilder(rawUrl, RequestAdapter);
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Configuration for the request such as headers, query parameters, and middleware options.
|
||||||
|
/// </summary>
|
||||||
|
[Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")]
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class PeopleRequestBuilderGetRequestConfiguration : RequestConfiguration<DefaultQueryParameters>
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#pragma warning restore CS0618
|
||||||
@@ -0,0 +1,92 @@
|
|||||||
|
// <auto-generated/>
|
||||||
|
#pragma warning disable CS0618
|
||||||
|
using Marechai.App.Models;
|
||||||
|
using Microsoft.Kiota.Abstractions.Extensions;
|
||||||
|
using Microsoft.Kiota.Abstractions.Serialization;
|
||||||
|
using Microsoft.Kiota.Abstractions;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.IO;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Threading;
|
||||||
|
using System;
|
||||||
|
namespace Marechai.App.Books.Item.Scans
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Builds and executes requests for operations under \books\{book-id}\scans
|
||||||
|
/// </summary>
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class ScansRequestBuilder : BaseRequestBuilder
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Instantiates a new <see cref="global::Marechai.App.Books.Item.Scans.ScansRequestBuilder"/> and sets the default values.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="pathParameters">Path parameters for the request</param>
|
||||||
|
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||||
|
public ScansRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/books/{book%2Did}/scans", pathParameters)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Instantiates a new <see cref="global::Marechai.App.Books.Item.Scans.ScansRequestBuilder"/> and sets the default values.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||||
|
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||||
|
public ScansRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/books/{book%2Did}/scans", rawUrl)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <returns>A List<Guid></returns>
|
||||||
|
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
|
||||||
|
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 400 status code</exception>
|
||||||
|
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||||
|
#nullable enable
|
||||||
|
public async Task<List<Guid?>?> GetAsync(Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public async Task<List<Guid?>> GetAsync(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
var requestInfo = ToGetRequestInformation(requestConfiguration);
|
||||||
|
var errorMapping = new Dictionary<string, ParsableFactory<IParsable>>
|
||||||
|
{
|
||||||
|
{ "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
};
|
||||||
|
var collectionResult = await RequestAdapter.SendPrimitiveCollectionAsync<Guid?>(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false);
|
||||||
|
return collectionResult?.AsList();
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="RequestInformation"/></returns>
|
||||||
|
/// <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<DefaultQueryParameters>>? requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters);
|
||||||
|
requestInfo.Configure(requestConfiguration);
|
||||||
|
requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9");
|
||||||
|
return requestInfo;
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>A <see cref="global::Marechai.App.Books.Item.Scans.ScansRequestBuilder"/></returns>
|
||||||
|
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||||
|
public global::Marechai.App.Books.Item.Scans.ScansRequestBuilder WithUrl(string rawUrl)
|
||||||
|
{
|
||||||
|
return new global::Marechai.App.Books.Item.Scans.ScansRequestBuilder(rawUrl, RequestAdapter);
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Configuration for the request such as headers, query parameters, and middleware options.
|
||||||
|
/// </summary>
|
||||||
|
[Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")]
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class ScansRequestBuilderGetRequestConfiguration : RequestConfiguration<DefaultQueryParameters>
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#pragma warning restore CS0618
|
||||||
@@ -0,0 +1,91 @@
|
|||||||
|
// <auto-generated/>
|
||||||
|
#pragma warning disable CS0618
|
||||||
|
using Marechai.App.Models;
|
||||||
|
using Microsoft.Kiota.Abstractions.Extensions;
|
||||||
|
using Microsoft.Kiota.Abstractions.Serialization;
|
||||||
|
using Microsoft.Kiota.Abstractions;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.IO;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Threading;
|
||||||
|
using System;
|
||||||
|
namespace Marechai.App.Books.Item.Synopsis
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Builds and executes requests for operations under \books\{book-id}\synopsis
|
||||||
|
/// </summary>
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class SynopsisRequestBuilder : BaseRequestBuilder
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Instantiates a new <see cref="global::Marechai.App.Books.Item.Synopsis.SynopsisRequestBuilder"/> and sets the default values.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="pathParameters">Path parameters for the request</param>
|
||||||
|
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||||
|
public SynopsisRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/books/{book%2Did}/synopsis", pathParameters)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Instantiates a new <see cref="global::Marechai.App.Books.Item.Synopsis.SynopsisRequestBuilder"/> and sets the default values.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||||
|
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||||
|
public SynopsisRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/books/{book%2Did}/synopsis", rawUrl)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="string"/></returns>
|
||||||
|
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
|
||||||
|
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 400 status code</exception>
|
||||||
|
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||||
|
#nullable enable
|
||||||
|
public async Task<string?> GetAsync(Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public async Task<string> GetAsync(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
var requestInfo = ToGetRequestInformation(requestConfiguration);
|
||||||
|
var errorMapping = new Dictionary<string, ParsableFactory<IParsable>>
|
||||||
|
{
|
||||||
|
{ "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
};
|
||||||
|
return await RequestAdapter.SendPrimitiveAsync<string>(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false);
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="RequestInformation"/></returns>
|
||||||
|
/// <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<DefaultQueryParameters>>? requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters);
|
||||||
|
requestInfo.Configure(requestConfiguration);
|
||||||
|
requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9");
|
||||||
|
return requestInfo;
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>A <see cref="global::Marechai.App.Books.Item.Synopsis.SynopsisRequestBuilder"/></returns>
|
||||||
|
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||||
|
public global::Marechai.App.Books.Item.Synopsis.SynopsisRequestBuilder WithUrl(string rawUrl)
|
||||||
|
{
|
||||||
|
return new global::Marechai.App.Books.Item.Synopsis.SynopsisRequestBuilder(rawUrl, RequestAdapter);
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Configuration for the request such as headers, query parameters, and middleware options.
|
||||||
|
/// </summary>
|
||||||
|
[Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")]
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class SynopsisRequestBuilderGetRequestConfiguration : RequestConfiguration<DefaultQueryParameters>
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#pragma warning restore CS0618
|
||||||
@@ -0,0 +1,192 @@
|
|||||||
|
// <auto-generated/>
|
||||||
|
#pragma warning disable CS0618
|
||||||
|
using Marechai.App.Models;
|
||||||
|
using Microsoft.Kiota.Abstractions.Extensions;
|
||||||
|
using Microsoft.Kiota.Abstractions.Serialization;
|
||||||
|
using Microsoft.Kiota.Abstractions;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.IO;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Threading;
|
||||||
|
using System;
|
||||||
|
namespace Marechai.App.Books.Scans.Item
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Builds and executes requests for operations under \books\scans\{id}
|
||||||
|
/// </summary>
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class ScansItemRequestBuilder : BaseRequestBuilder
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Instantiates a new <see cref="global::Marechai.App.Books.Scans.Item.ScansItemRequestBuilder"/> and sets the default values.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="pathParameters">Path parameters for the request</param>
|
||||||
|
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||||
|
public ScansItemRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/books/scans/{id}", pathParameters)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Instantiates a new <see cref="global::Marechai.App.Books.Scans.Item.ScansItemRequestBuilder"/> and sets the default values.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||||
|
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||||
|
public ScansItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/books/scans/{id}", rawUrl)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="string"/></returns>
|
||||||
|
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
|
||||||
|
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 400 status code</exception>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 401 status code</exception>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 404 status code</exception>
|
||||||
|
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||||
|
#nullable enable
|
||||||
|
public async Task<string?> DeleteAsync(Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public async Task<string> DeleteAsync(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
var requestInfo = ToDeleteRequestInformation(requestConfiguration);
|
||||||
|
var errorMapping = new Dictionary<string, ParsableFactory<IParsable>>
|
||||||
|
{
|
||||||
|
{ "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
{ "401", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
{ "404", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
};
|
||||||
|
return await RequestAdapter.SendPrimitiveAsync<string>(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false);
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="global::Marechai.App.Models.BookScanDto"/></returns>
|
||||||
|
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
|
||||||
|
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 400 status code</exception>
|
||||||
|
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||||
|
#nullable enable
|
||||||
|
public async Task<global::Marechai.App.Models.BookScanDto?> GetAsync(Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public async Task<global::Marechai.App.Models.BookScanDto> GetAsync(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
var requestInfo = ToGetRequestInformation(requestConfiguration);
|
||||||
|
var errorMapping = new Dictionary<string, ParsableFactory<IParsable>>
|
||||||
|
{
|
||||||
|
{ "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
};
|
||||||
|
return await RequestAdapter.SendAsync<global::Marechai.App.Models.BookScanDto>(requestInfo, global::Marechai.App.Models.BookScanDto.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false);
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="string"/></returns>
|
||||||
|
/// <param name="body">The request body</param>
|
||||||
|
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
|
||||||
|
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 400 status code</exception>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 401 status code</exception>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 404 status code</exception>
|
||||||
|
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||||
|
#nullable enable
|
||||||
|
public async Task<string?> PutAsync(global::Marechai.App.Models.BookScanDto body, Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public async Task<string> PutAsync(global::Marechai.App.Models.BookScanDto body, Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body));
|
||||||
|
var requestInfo = ToPutRequestInformation(body, requestConfiguration);
|
||||||
|
var errorMapping = new Dictionary<string, ParsableFactory<IParsable>>
|
||||||
|
{
|
||||||
|
{ "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
{ "401", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
{ "404", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
};
|
||||||
|
return await RequestAdapter.SendPrimitiveAsync<string>(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false);
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="RequestInformation"/></returns>
|
||||||
|
/// <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 ToDeleteRequestInformation(Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public RequestInformation ToDeleteRequestInformation(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters);
|
||||||
|
requestInfo.Configure(requestConfiguration);
|
||||||
|
requestInfo.Headers.TryAdd("Accept", "application/json, text/plain;q=0.9");
|
||||||
|
return requestInfo;
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="RequestInformation"/></returns>
|
||||||
|
/// <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<DefaultQueryParameters>>? requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters);
|
||||||
|
requestInfo.Configure(requestConfiguration);
|
||||||
|
requestInfo.Headers.TryAdd("Accept", "application/json, text/plain;q=0.9");
|
||||||
|
return requestInfo;
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="RequestInformation"/></returns>
|
||||||
|
/// <param name="body">The request body</param>
|
||||||
|
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||||
|
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||||
|
#nullable enable
|
||||||
|
public RequestInformation ToPutRequestInformation(global::Marechai.App.Models.BookScanDto body, Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public RequestInformation ToPutRequestInformation(global::Marechai.App.Models.BookScanDto body, Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body));
|
||||||
|
var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters);
|
||||||
|
requestInfo.Configure(requestConfiguration);
|
||||||
|
requestInfo.Headers.TryAdd("Accept", "application/json, text/plain;q=0.9");
|
||||||
|
requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body);
|
||||||
|
return requestInfo;
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>A <see cref="global::Marechai.App.Books.Scans.Item.ScansItemRequestBuilder"/></returns>
|
||||||
|
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||||
|
public global::Marechai.App.Books.Scans.Item.ScansItemRequestBuilder WithUrl(string rawUrl)
|
||||||
|
{
|
||||||
|
return new global::Marechai.App.Books.Scans.Item.ScansItemRequestBuilder(rawUrl, RequestAdapter);
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Configuration for the request such as headers, query parameters, and middleware options.
|
||||||
|
/// </summary>
|
||||||
|
[Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")]
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class ScansItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration<DefaultQueryParameters>
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Configuration for the request such as headers, query parameters, and middleware options.
|
||||||
|
/// </summary>
|
||||||
|
[Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")]
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class ScansItemRequestBuilderGetRequestConfiguration : RequestConfiguration<DefaultQueryParameters>
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Configuration for the request such as headers, query parameters, and middleware options.
|
||||||
|
/// </summary>
|
||||||
|
[Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")]
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class ScansItemRequestBuilderPutRequestConfiguration : RequestConfiguration<DefaultQueryParameters>
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#pragma warning restore CS0618
|
||||||
124
Marechai.App/Services/Client/Books/Scans/ScansRequestBuilder.cs
Normal file
124
Marechai.App/Services/Client/Books/Scans/ScansRequestBuilder.cs
Normal file
@@ -0,0 +1,124 @@
|
|||||||
|
// <auto-generated/>
|
||||||
|
#pragma warning disable CS0618
|
||||||
|
using Marechai.App.Books.Scans.Item;
|
||||||
|
using Marechai.App.Models;
|
||||||
|
using Microsoft.Kiota.Abstractions.Extensions;
|
||||||
|
using Microsoft.Kiota.Abstractions.Serialization;
|
||||||
|
using Microsoft.Kiota.Abstractions;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.IO;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Threading;
|
||||||
|
using System;
|
||||||
|
namespace Marechai.App.Books.Scans
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Builds and executes requests for operations under \books\scans
|
||||||
|
/// </summary>
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class ScansRequestBuilder : BaseRequestBuilder
|
||||||
|
{
|
||||||
|
/// <summary>Gets an item from the Marechai.App.books.scans.item collection</summary>
|
||||||
|
/// <param name="position">Unique identifier of the item</param>
|
||||||
|
/// <returns>A <see cref="global::Marechai.App.Books.Scans.Item.ScansItemRequestBuilder"/></returns>
|
||||||
|
public global::Marechai.App.Books.Scans.Item.ScansItemRequestBuilder this[Guid position]
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
var urlTplParams = new Dictionary<string, object>(PathParameters);
|
||||||
|
urlTplParams.Add("id", position);
|
||||||
|
return new global::Marechai.App.Books.Scans.Item.ScansItemRequestBuilder(urlTplParams, RequestAdapter);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// <summary>Gets an item from the Marechai.App.books.scans.item collection</summary>
|
||||||
|
/// <param name="position">Unique identifier of the item</param>
|
||||||
|
/// <returns>A <see cref="global::Marechai.App.Books.Scans.Item.ScansItemRequestBuilder"/></returns>
|
||||||
|
[Obsolete("This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead.")]
|
||||||
|
public global::Marechai.App.Books.Scans.Item.ScansItemRequestBuilder this[string position]
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
var urlTplParams = new Dictionary<string, object>(PathParameters);
|
||||||
|
if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("id", position);
|
||||||
|
return new global::Marechai.App.Books.Scans.Item.ScansItemRequestBuilder(urlTplParams, RequestAdapter);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Instantiates a new <see cref="global::Marechai.App.Books.Scans.ScansRequestBuilder"/> and sets the default values.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="pathParameters">Path parameters for the request</param>
|
||||||
|
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||||
|
public ScansRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/books/scans", pathParameters)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Instantiates a new <see cref="global::Marechai.App.Books.Scans.ScansRequestBuilder"/> and sets the default values.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||||
|
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||||
|
public ScansRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/books/scans", rawUrl)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="Guid"/></returns>
|
||||||
|
/// <param name="body">The request body</param>
|
||||||
|
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
|
||||||
|
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 400 status code</exception>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 401 status code</exception>
|
||||||
|
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||||
|
#nullable enable
|
||||||
|
public async Task<Guid?> PostAsync(global::Marechai.App.Models.BookScanDto body, Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public async Task<Guid?> PostAsync(global::Marechai.App.Models.BookScanDto body, Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body));
|
||||||
|
var requestInfo = ToPostRequestInformation(body, requestConfiguration);
|
||||||
|
var errorMapping = new Dictionary<string, ParsableFactory<IParsable>>
|
||||||
|
{
|
||||||
|
{ "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
{ "401", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
};
|
||||||
|
return await RequestAdapter.SendPrimitiveAsync<Guid?>(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false);
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="RequestInformation"/></returns>
|
||||||
|
/// <param name="body">The request body</param>
|
||||||
|
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||||
|
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||||
|
#nullable enable
|
||||||
|
public RequestInformation ToPostRequestInformation(global::Marechai.App.Models.BookScanDto body, Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public RequestInformation ToPostRequestInformation(global::Marechai.App.Models.BookScanDto body, Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body));
|
||||||
|
var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters);
|
||||||
|
requestInfo.Configure(requestConfiguration);
|
||||||
|
requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9");
|
||||||
|
requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body);
|
||||||
|
return requestInfo;
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>A <see cref="global::Marechai.App.Books.Scans.ScansRequestBuilder"/></returns>
|
||||||
|
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||||
|
public global::Marechai.App.Books.Scans.ScansRequestBuilder WithUrl(string rawUrl)
|
||||||
|
{
|
||||||
|
return new global::Marechai.App.Books.Scans.ScansRequestBuilder(rawUrl, RequestAdapter);
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Configuration for the request such as headers, query parameters, and middleware options.
|
||||||
|
/// </summary>
|
||||||
|
[Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")]
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class ScansRequestBuilderPostRequestConfiguration : RequestConfiguration<DefaultQueryParameters>
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#pragma warning restore CS0618
|
||||||
@@ -0,0 +1,92 @@
|
|||||||
|
// <auto-generated/>
|
||||||
|
#pragma warning disable CS0618
|
||||||
|
using Marechai.App.Models;
|
||||||
|
using Microsoft.Kiota.Abstractions.Extensions;
|
||||||
|
using Microsoft.Kiota.Abstractions.Serialization;
|
||||||
|
using Microsoft.Kiota.Abstractions;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.IO;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Threading;
|
||||||
|
using System;
|
||||||
|
namespace Marechai.App.BrowserTests
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Builds and executes requests for operations under \browser-tests
|
||||||
|
/// </summary>
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class BrowserTestsRequestBuilder : BaseRequestBuilder
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Instantiates a new <see cref="global::Marechai.App.BrowserTests.BrowserTestsRequestBuilder"/> and sets the default values.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="pathParameters">Path parameters for the request</param>
|
||||||
|
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||||
|
public BrowserTestsRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/browser-tests", pathParameters)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Instantiates a new <see cref="global::Marechai.App.BrowserTests.BrowserTestsRequestBuilder"/> and sets the default values.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||||
|
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||||
|
public BrowserTestsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/browser-tests", rawUrl)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <returns>A List<global::Marechai.App.Models.BrowserTest></returns>
|
||||||
|
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
|
||||||
|
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 400 status code</exception>
|
||||||
|
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||||
|
#nullable enable
|
||||||
|
public async Task<List<global::Marechai.App.Models.BrowserTest>?> GetAsync(Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public async Task<List<global::Marechai.App.Models.BrowserTest>> GetAsync(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
var requestInfo = ToGetRequestInformation(requestConfiguration);
|
||||||
|
var errorMapping = new Dictionary<string, ParsableFactory<IParsable>>
|
||||||
|
{
|
||||||
|
{ "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
};
|
||||||
|
var collectionResult = await RequestAdapter.SendCollectionAsync<global::Marechai.App.Models.BrowserTest>(requestInfo, global::Marechai.App.Models.BrowserTest.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false);
|
||||||
|
return collectionResult?.AsList();
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="RequestInformation"/></returns>
|
||||||
|
/// <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<DefaultQueryParameters>>? requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters);
|
||||||
|
requestInfo.Configure(requestConfiguration);
|
||||||
|
requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9");
|
||||||
|
return requestInfo;
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>A <see cref="global::Marechai.App.BrowserTests.BrowserTestsRequestBuilder"/></returns>
|
||||||
|
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||||
|
public global::Marechai.App.BrowserTests.BrowserTestsRequestBuilder WithUrl(string rawUrl)
|
||||||
|
{
|
||||||
|
return new global::Marechai.App.BrowserTests.BrowserTestsRequestBuilder(rawUrl, RequestAdapter);
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Configuration for the request such as headers, query parameters, and middleware options.
|
||||||
|
/// </summary>
|
||||||
|
[Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")]
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class BrowserTestsRequestBuilderGetRequestConfiguration : RequestConfiguration<DefaultQueryParameters>
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#pragma warning restore CS0618
|
||||||
@@ -0,0 +1,48 @@
|
|||||||
|
// <auto-generated/>
|
||||||
|
#pragma warning disable CS0618
|
||||||
|
using Marechai.App.ByLetter.Item;
|
||||||
|
using Microsoft.Kiota.Abstractions.Extensions;
|
||||||
|
using Microsoft.Kiota.Abstractions;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.IO;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System;
|
||||||
|
namespace Marechai.App.ByLetter
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Builds and executes requests for operations under \by-letter
|
||||||
|
/// </summary>
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class ByLetterRequestBuilder : BaseRequestBuilder
|
||||||
|
{
|
||||||
|
/// <summary>Gets an item from the Marechai.App.byLetter.item collection</summary>
|
||||||
|
/// <param name="position">Unique identifier of the item</param>
|
||||||
|
/// <returns>A <see cref="global::Marechai.App.ByLetter.Item.WithCItemRequestBuilder"/></returns>
|
||||||
|
public global::Marechai.App.ByLetter.Item.WithCItemRequestBuilder this[string position]
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
var urlTplParams = new Dictionary<string, object>(PathParameters);
|
||||||
|
urlTplParams.Add("c", position);
|
||||||
|
return new global::Marechai.App.ByLetter.Item.WithCItemRequestBuilder(urlTplParams, RequestAdapter);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Instantiates a new <see cref="global::Marechai.App.ByLetter.ByLetterRequestBuilder"/> and sets the default values.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="pathParameters">Path parameters for the request</param>
|
||||||
|
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||||
|
public ByLetterRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/by-letter", pathParameters)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Instantiates a new <see cref="global::Marechai.App.ByLetter.ByLetterRequestBuilder"/> and sets the default values.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||||
|
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||||
|
public ByLetterRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/by-letter", rawUrl)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#pragma warning restore CS0618
|
||||||
@@ -0,0 +1,92 @@
|
|||||||
|
// <auto-generated/>
|
||||||
|
#pragma warning disable CS0618
|
||||||
|
using Marechai.App.Models;
|
||||||
|
using Microsoft.Kiota.Abstractions.Extensions;
|
||||||
|
using Microsoft.Kiota.Abstractions.Serialization;
|
||||||
|
using Microsoft.Kiota.Abstractions;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.IO;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Threading;
|
||||||
|
using System;
|
||||||
|
namespace Marechai.App.ByLetter.Item
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Builds and executes requests for operations under \by-letter\{c}
|
||||||
|
/// </summary>
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class WithCItemRequestBuilder : BaseRequestBuilder
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Instantiates a new <see cref="global::Marechai.App.ByLetter.Item.WithCItemRequestBuilder"/> and sets the default values.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="pathParameters">Path parameters for the request</param>
|
||||||
|
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||||
|
public WithCItemRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/by-letter/{c}", pathParameters)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Instantiates a new <see cref="global::Marechai.App.ByLetter.Item.WithCItemRequestBuilder"/> and sets the default values.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||||
|
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||||
|
public WithCItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/by-letter/{c}", rawUrl)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <returns>A List<global::Marechai.App.Models.MachineDto></returns>
|
||||||
|
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
|
||||||
|
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 400 status code</exception>
|
||||||
|
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||||
|
#nullable enable
|
||||||
|
public async Task<List<global::Marechai.App.Models.MachineDto>?> GetAsync(Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public async Task<List<global::Marechai.App.Models.MachineDto>> GetAsync(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
var requestInfo = ToGetRequestInformation(requestConfiguration);
|
||||||
|
var errorMapping = new Dictionary<string, ParsableFactory<IParsable>>
|
||||||
|
{
|
||||||
|
{ "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
};
|
||||||
|
var collectionResult = await RequestAdapter.SendCollectionAsync<global::Marechai.App.Models.MachineDto>(requestInfo, global::Marechai.App.Models.MachineDto.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false);
|
||||||
|
return collectionResult?.AsList();
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="RequestInformation"/></returns>
|
||||||
|
/// <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<DefaultQueryParameters>>? requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters);
|
||||||
|
requestInfo.Configure(requestConfiguration);
|
||||||
|
requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9");
|
||||||
|
return requestInfo;
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>A <see cref="global::Marechai.App.ByLetter.Item.WithCItemRequestBuilder"/></returns>
|
||||||
|
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||||
|
public global::Marechai.App.ByLetter.Item.WithCItemRequestBuilder WithUrl(string rawUrl)
|
||||||
|
{
|
||||||
|
return new global::Marechai.App.ByLetter.Item.WithCItemRequestBuilder(rawUrl, RequestAdapter);
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Configuration for the request such as headers, query parameters, and middleware options.
|
||||||
|
/// </summary>
|
||||||
|
[Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")]
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class WithCItemRequestBuilderGetRequestConfiguration : RequestConfiguration<DefaultQueryParameters>
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#pragma warning restore CS0618
|
||||||
61
Marechai.App/Services/Client/ByYear/ByYearRequestBuilder.cs
Normal file
61
Marechai.App/Services/Client/ByYear/ByYearRequestBuilder.cs
Normal file
@@ -0,0 +1,61 @@
|
|||||||
|
// <auto-generated/>
|
||||||
|
#pragma warning disable CS0618
|
||||||
|
using Marechai.App.ByYear.Item;
|
||||||
|
using Microsoft.Kiota.Abstractions.Extensions;
|
||||||
|
using Microsoft.Kiota.Abstractions;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.IO;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System;
|
||||||
|
namespace Marechai.App.ByYear
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Builds and executes requests for operations under \by-year
|
||||||
|
/// </summary>
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class ByYearRequestBuilder : BaseRequestBuilder
|
||||||
|
{
|
||||||
|
/// <summary>Gets an item from the Marechai.App.byYear.item collection</summary>
|
||||||
|
/// <param name="position">Unique identifier of the item</param>
|
||||||
|
/// <returns>A <see cref="global::Marechai.App.ByYear.Item.WithYearItemRequestBuilder"/></returns>
|
||||||
|
public global::Marechai.App.ByYear.Item.WithYearItemRequestBuilder this[int position]
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
var urlTplParams = new Dictionary<string, object>(PathParameters);
|
||||||
|
urlTplParams.Add("year", position);
|
||||||
|
return new global::Marechai.App.ByYear.Item.WithYearItemRequestBuilder(urlTplParams, RequestAdapter);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// <summary>Gets an item from the Marechai.App.byYear.item collection</summary>
|
||||||
|
/// <param name="position">Unique identifier of the item</param>
|
||||||
|
/// <returns>A <see cref="global::Marechai.App.ByYear.Item.WithYearItemRequestBuilder"/></returns>
|
||||||
|
[Obsolete("This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead.")]
|
||||||
|
public global::Marechai.App.ByYear.Item.WithYearItemRequestBuilder this[string position]
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
var urlTplParams = new Dictionary<string, object>(PathParameters);
|
||||||
|
if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("year", position);
|
||||||
|
return new global::Marechai.App.ByYear.Item.WithYearItemRequestBuilder(urlTplParams, RequestAdapter);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Instantiates a new <see cref="global::Marechai.App.ByYear.ByYearRequestBuilder"/> and sets the default values.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="pathParameters">Path parameters for the request</param>
|
||||||
|
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||||
|
public ByYearRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/by-year", pathParameters)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Instantiates a new <see cref="global::Marechai.App.ByYear.ByYearRequestBuilder"/> and sets the default values.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||||
|
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||||
|
public ByYearRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/by-year", rawUrl)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#pragma warning restore CS0618
|
||||||
@@ -0,0 +1,92 @@
|
|||||||
|
// <auto-generated/>
|
||||||
|
#pragma warning disable CS0618
|
||||||
|
using Marechai.App.Models;
|
||||||
|
using Microsoft.Kiota.Abstractions.Extensions;
|
||||||
|
using Microsoft.Kiota.Abstractions.Serialization;
|
||||||
|
using Microsoft.Kiota.Abstractions;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.IO;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Threading;
|
||||||
|
using System;
|
||||||
|
namespace Marechai.App.ByYear.Item
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Builds and executes requests for operations under \by-year\{year}
|
||||||
|
/// </summary>
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class WithYearItemRequestBuilder : BaseRequestBuilder
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Instantiates a new <see cref="global::Marechai.App.ByYear.Item.WithYearItemRequestBuilder"/> and sets the default values.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="pathParameters">Path parameters for the request</param>
|
||||||
|
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||||
|
public WithYearItemRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/by-year/{year}", pathParameters)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Instantiates a new <see cref="global::Marechai.App.ByYear.Item.WithYearItemRequestBuilder"/> and sets the default values.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||||
|
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||||
|
public WithYearItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/by-year/{year}", rawUrl)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <returns>A List<global::Marechai.App.Models.MachineDto></returns>
|
||||||
|
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
|
||||||
|
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 400 status code</exception>
|
||||||
|
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||||
|
#nullable enable
|
||||||
|
public async Task<List<global::Marechai.App.Models.MachineDto>?> GetAsync(Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public async Task<List<global::Marechai.App.Models.MachineDto>> GetAsync(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
var requestInfo = ToGetRequestInformation(requestConfiguration);
|
||||||
|
var errorMapping = new Dictionary<string, ParsableFactory<IParsable>>
|
||||||
|
{
|
||||||
|
{ "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
};
|
||||||
|
var collectionResult = await RequestAdapter.SendCollectionAsync<global::Marechai.App.Models.MachineDto>(requestInfo, global::Marechai.App.Models.MachineDto.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false);
|
||||||
|
return collectionResult?.AsList();
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="RequestInformation"/></returns>
|
||||||
|
/// <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<DefaultQueryParameters>>? requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters);
|
||||||
|
requestInfo.Configure(requestConfiguration);
|
||||||
|
requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9");
|
||||||
|
return requestInfo;
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>A <see cref="global::Marechai.App.ByYear.Item.WithYearItemRequestBuilder"/></returns>
|
||||||
|
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||||
|
public global::Marechai.App.ByYear.Item.WithYearItemRequestBuilder WithUrl(string rawUrl)
|
||||||
|
{
|
||||||
|
return new global::Marechai.App.ByYear.Item.WithYearItemRequestBuilder(rawUrl, RequestAdapter);
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Configuration for the request such as headers, query parameters, and middleware options.
|
||||||
|
/// </summary>
|
||||||
|
[Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")]
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class WithYearItemRequestBuilderGetRequestConfiguration : RequestConfiguration<DefaultQueryParameters>
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#pragma warning restore CS0618
|
||||||
@@ -0,0 +1,181 @@
|
|||||||
|
// <auto-generated/>
|
||||||
|
#pragma warning disable CS0618
|
||||||
|
using Marechai.App.Companies.Item;
|
||||||
|
using Marechai.App.Companies.Letter;
|
||||||
|
using Marechai.App.Companies.Logos;
|
||||||
|
using Marechai.App.Models;
|
||||||
|
using Microsoft.Kiota.Abstractions.Extensions;
|
||||||
|
using Microsoft.Kiota.Abstractions.Serialization;
|
||||||
|
using Microsoft.Kiota.Abstractions;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.IO;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Threading;
|
||||||
|
using System;
|
||||||
|
namespace Marechai.App.Companies
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Builds and executes requests for operations under \companies
|
||||||
|
/// </summary>
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class CompaniesRequestBuilder : BaseRequestBuilder
|
||||||
|
{
|
||||||
|
/// <summary>The letter property</summary>
|
||||||
|
public global::Marechai.App.Companies.Letter.LetterRequestBuilder Letter
|
||||||
|
{
|
||||||
|
get => new global::Marechai.App.Companies.Letter.LetterRequestBuilder(PathParameters, RequestAdapter);
|
||||||
|
}
|
||||||
|
/// <summary>The logos property</summary>
|
||||||
|
public global::Marechai.App.Companies.Logos.LogosRequestBuilder Logos
|
||||||
|
{
|
||||||
|
get => new global::Marechai.App.Companies.Logos.LogosRequestBuilder(PathParameters, RequestAdapter);
|
||||||
|
}
|
||||||
|
/// <summary>Gets an item from the Marechai.App.companies.item collection</summary>
|
||||||
|
/// <param name="position">Unique identifier of the item</param>
|
||||||
|
/// <returns>A <see cref="global::Marechai.App.Companies.Item.CompanyItemRequestBuilder"/></returns>
|
||||||
|
public global::Marechai.App.Companies.Item.CompanyItemRequestBuilder this[int position]
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
var urlTplParams = new Dictionary<string, object>(PathParameters);
|
||||||
|
urlTplParams.Add("company%2Did", position);
|
||||||
|
return new global::Marechai.App.Companies.Item.CompanyItemRequestBuilder(urlTplParams, RequestAdapter);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// <summary>Gets an item from the Marechai.App.companies.item collection</summary>
|
||||||
|
/// <param name="position">Unique identifier of the item</param>
|
||||||
|
/// <returns>A <see cref="global::Marechai.App.Companies.Item.CompanyItemRequestBuilder"/></returns>
|
||||||
|
[Obsolete("This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead.")]
|
||||||
|
public global::Marechai.App.Companies.Item.CompanyItemRequestBuilder this[string position]
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
var urlTplParams = new Dictionary<string, object>(PathParameters);
|
||||||
|
if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("company%2Did", position);
|
||||||
|
return new global::Marechai.App.Companies.Item.CompanyItemRequestBuilder(urlTplParams, RequestAdapter);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Instantiates a new <see cref="global::Marechai.App.Companies.CompaniesRequestBuilder"/> and sets the default values.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="pathParameters">Path parameters for the request</param>
|
||||||
|
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||||
|
public CompaniesRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/companies", pathParameters)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Instantiates a new <see cref="global::Marechai.App.Companies.CompaniesRequestBuilder"/> and sets the default values.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||||
|
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||||
|
public CompaniesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/companies", rawUrl)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <returns>A List<global::Marechai.App.Models.CompanyDto></returns>
|
||||||
|
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
|
||||||
|
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 400 status code</exception>
|
||||||
|
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||||
|
#nullable enable
|
||||||
|
public async Task<List<global::Marechai.App.Models.CompanyDto>?> GetAsync(Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public async Task<List<global::Marechai.App.Models.CompanyDto>> GetAsync(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
var requestInfo = ToGetRequestInformation(requestConfiguration);
|
||||||
|
var errorMapping = new Dictionary<string, ParsableFactory<IParsable>>
|
||||||
|
{
|
||||||
|
{ "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
};
|
||||||
|
var collectionResult = await RequestAdapter.SendCollectionAsync<global::Marechai.App.Models.CompanyDto>(requestInfo, global::Marechai.App.Models.CompanyDto.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false);
|
||||||
|
return collectionResult?.AsList();
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="UntypedNode"/></returns>
|
||||||
|
/// <param name="body">The request body</param>
|
||||||
|
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
|
||||||
|
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 400 status code</exception>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 401 status code</exception>
|
||||||
|
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||||
|
#nullable enable
|
||||||
|
public async Task<UntypedNode?> PostAsync(global::Marechai.App.Models.CompanyDto body, Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public async Task<UntypedNode> PostAsync(global::Marechai.App.Models.CompanyDto body, Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body));
|
||||||
|
var requestInfo = ToPostRequestInformation(body, requestConfiguration);
|
||||||
|
var errorMapping = new Dictionary<string, ParsableFactory<IParsable>>
|
||||||
|
{
|
||||||
|
{ "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
{ "401", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
};
|
||||||
|
return await RequestAdapter.SendAsync<UntypedNode>(requestInfo, UntypedNode.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false);
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="RequestInformation"/></returns>
|
||||||
|
/// <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<DefaultQueryParameters>>? requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters);
|
||||||
|
requestInfo.Configure(requestConfiguration);
|
||||||
|
requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9");
|
||||||
|
return requestInfo;
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="RequestInformation"/></returns>
|
||||||
|
/// <param name="body">The request body</param>
|
||||||
|
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||||
|
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||||
|
#nullable enable
|
||||||
|
public RequestInformation ToPostRequestInformation(global::Marechai.App.Models.CompanyDto body, Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public RequestInformation ToPostRequestInformation(global::Marechai.App.Models.CompanyDto body, Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body));
|
||||||
|
var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters);
|
||||||
|
requestInfo.Configure(requestConfiguration);
|
||||||
|
requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9");
|
||||||
|
requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body);
|
||||||
|
return requestInfo;
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>A <see cref="global::Marechai.App.Companies.CompaniesRequestBuilder"/></returns>
|
||||||
|
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||||
|
public global::Marechai.App.Companies.CompaniesRequestBuilder WithUrl(string rawUrl)
|
||||||
|
{
|
||||||
|
return new global::Marechai.App.Companies.CompaniesRequestBuilder(rawUrl, RequestAdapter);
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Configuration for the request such as headers, query parameters, and middleware options.
|
||||||
|
/// </summary>
|
||||||
|
[Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")]
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class CompaniesRequestBuilderGetRequestConfiguration : RequestConfiguration<DefaultQueryParameters>
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Configuration for the request such as headers, query parameters, and middleware options.
|
||||||
|
/// </summary>
|
||||||
|
[Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")]
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class CompaniesRequestBuilderPostRequestConfiguration : RequestConfiguration<DefaultQueryParameters>
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#pragma warning restore CS0618
|
||||||
@@ -0,0 +1,216 @@
|
|||||||
|
// <auto-generated/>
|
||||||
|
#pragma warning disable CS0618
|
||||||
|
using Marechai.App.Companies.Item.Description;
|
||||||
|
using Marechai.App.Companies.Item.Logos;
|
||||||
|
using Marechai.App.Companies.Item.Machines;
|
||||||
|
using Marechai.App.Companies.Item.Soldto;
|
||||||
|
using Marechai.App.Models;
|
||||||
|
using Microsoft.Kiota.Abstractions.Extensions;
|
||||||
|
using Microsoft.Kiota.Abstractions.Serialization;
|
||||||
|
using Microsoft.Kiota.Abstractions;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.IO;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Threading;
|
||||||
|
using System;
|
||||||
|
namespace Marechai.App.Companies.Item
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Builds and executes requests for operations under \companies\{company-id}
|
||||||
|
/// </summary>
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class CompanyItemRequestBuilder : BaseRequestBuilder
|
||||||
|
{
|
||||||
|
/// <summary>The description property</summary>
|
||||||
|
public global::Marechai.App.Companies.Item.Description.DescriptionRequestBuilder Description
|
||||||
|
{
|
||||||
|
get => new global::Marechai.App.Companies.Item.Description.DescriptionRequestBuilder(PathParameters, RequestAdapter);
|
||||||
|
}
|
||||||
|
/// <summary>The logos property</summary>
|
||||||
|
public global::Marechai.App.Companies.Item.Logos.LogosRequestBuilder Logos
|
||||||
|
{
|
||||||
|
get => new global::Marechai.App.Companies.Item.Logos.LogosRequestBuilder(PathParameters, RequestAdapter);
|
||||||
|
}
|
||||||
|
/// <summary>The machines property</summary>
|
||||||
|
public global::Marechai.App.Companies.Item.Machines.MachinesRequestBuilder Machines
|
||||||
|
{
|
||||||
|
get => new global::Marechai.App.Companies.Item.Machines.MachinesRequestBuilder(PathParameters, RequestAdapter);
|
||||||
|
}
|
||||||
|
/// <summary>The soldto property</summary>
|
||||||
|
public global::Marechai.App.Companies.Item.Soldto.SoldtoRequestBuilder Soldto
|
||||||
|
{
|
||||||
|
get => new global::Marechai.App.Companies.Item.Soldto.SoldtoRequestBuilder(PathParameters, RequestAdapter);
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Instantiates a new <see cref="global::Marechai.App.Companies.Item.CompanyItemRequestBuilder"/> and sets the default values.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="pathParameters">Path parameters for the request</param>
|
||||||
|
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||||
|
public CompanyItemRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/companies/{company%2Did}", pathParameters)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Instantiates a new <see cref="global::Marechai.App.Companies.Item.CompanyItemRequestBuilder"/> and sets the default values.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||||
|
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||||
|
public CompanyItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/companies/{company%2Did}", rawUrl)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="string"/></returns>
|
||||||
|
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
|
||||||
|
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 400 status code</exception>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 401 status code</exception>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 404 status code</exception>
|
||||||
|
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||||
|
#nullable enable
|
||||||
|
public async Task<string?> DeleteAsync(Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public async Task<string> DeleteAsync(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
var requestInfo = ToDeleteRequestInformation(requestConfiguration);
|
||||||
|
var errorMapping = new Dictionary<string, ParsableFactory<IParsable>>
|
||||||
|
{
|
||||||
|
{ "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
{ "401", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
{ "404", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
};
|
||||||
|
return await RequestAdapter.SendPrimitiveAsync<string>(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false);
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="global::Marechai.App.Models.CompanyDto"/></returns>
|
||||||
|
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
|
||||||
|
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 400 status code</exception>
|
||||||
|
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||||
|
#nullable enable
|
||||||
|
public async Task<global::Marechai.App.Models.CompanyDto?> GetAsync(Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public async Task<global::Marechai.App.Models.CompanyDto> GetAsync(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
var requestInfo = ToGetRequestInformation(requestConfiguration);
|
||||||
|
var errorMapping = new Dictionary<string, ParsableFactory<IParsable>>
|
||||||
|
{
|
||||||
|
{ "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
};
|
||||||
|
return await RequestAdapter.SendAsync<global::Marechai.App.Models.CompanyDto>(requestInfo, global::Marechai.App.Models.CompanyDto.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false);
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="string"/></returns>
|
||||||
|
/// <param name="body">The request body</param>
|
||||||
|
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
|
||||||
|
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 400 status code</exception>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 401 status code</exception>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 404 status code</exception>
|
||||||
|
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||||
|
#nullable enable
|
||||||
|
public async Task<string?> PutAsync(global::Marechai.App.Models.CompanyDto body, Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public async Task<string> PutAsync(global::Marechai.App.Models.CompanyDto body, Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body));
|
||||||
|
var requestInfo = ToPutRequestInformation(body, requestConfiguration);
|
||||||
|
var errorMapping = new Dictionary<string, ParsableFactory<IParsable>>
|
||||||
|
{
|
||||||
|
{ "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
{ "401", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
{ "404", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
};
|
||||||
|
return await RequestAdapter.SendPrimitiveAsync<string>(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false);
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="RequestInformation"/></returns>
|
||||||
|
/// <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 ToDeleteRequestInformation(Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public RequestInformation ToDeleteRequestInformation(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters);
|
||||||
|
requestInfo.Configure(requestConfiguration);
|
||||||
|
requestInfo.Headers.TryAdd("Accept", "application/json, text/plain;q=0.9");
|
||||||
|
return requestInfo;
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="RequestInformation"/></returns>
|
||||||
|
/// <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<DefaultQueryParameters>>? requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters);
|
||||||
|
requestInfo.Configure(requestConfiguration);
|
||||||
|
requestInfo.Headers.TryAdd("Accept", "application/json, text/plain;q=0.9");
|
||||||
|
return requestInfo;
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="RequestInformation"/></returns>
|
||||||
|
/// <param name="body">The request body</param>
|
||||||
|
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||||
|
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||||
|
#nullable enable
|
||||||
|
public RequestInformation ToPutRequestInformation(global::Marechai.App.Models.CompanyDto body, Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public RequestInformation ToPutRequestInformation(global::Marechai.App.Models.CompanyDto body, Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body));
|
||||||
|
var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters);
|
||||||
|
requestInfo.Configure(requestConfiguration);
|
||||||
|
requestInfo.Headers.TryAdd("Accept", "application/json, text/plain;q=0.9");
|
||||||
|
requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body);
|
||||||
|
return requestInfo;
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>A <see cref="global::Marechai.App.Companies.Item.CompanyItemRequestBuilder"/></returns>
|
||||||
|
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||||
|
public global::Marechai.App.Companies.Item.CompanyItemRequestBuilder WithUrl(string rawUrl)
|
||||||
|
{
|
||||||
|
return new global::Marechai.App.Companies.Item.CompanyItemRequestBuilder(rawUrl, RequestAdapter);
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Configuration for the request such as headers, query parameters, and middleware options.
|
||||||
|
/// </summary>
|
||||||
|
[Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")]
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class CompanyItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration<DefaultQueryParameters>
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Configuration for the request such as headers, query parameters, and middleware options.
|
||||||
|
/// </summary>
|
||||||
|
[Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")]
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class CompanyItemRequestBuilderGetRequestConfiguration : RequestConfiguration<DefaultQueryParameters>
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Configuration for the request such as headers, query parameters, and middleware options.
|
||||||
|
/// </summary>
|
||||||
|
[Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")]
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class CompanyItemRequestBuilderPutRequestConfiguration : RequestConfiguration<DefaultQueryParameters>
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#pragma warning restore CS0618
|
||||||
@@ -0,0 +1,148 @@
|
|||||||
|
// <auto-generated/>
|
||||||
|
#pragma warning disable CS0618
|
||||||
|
using Marechai.App.Companies.Item.Description.Text;
|
||||||
|
using Marechai.App.Models;
|
||||||
|
using Microsoft.Kiota.Abstractions.Extensions;
|
||||||
|
using Microsoft.Kiota.Abstractions.Serialization;
|
||||||
|
using Microsoft.Kiota.Abstractions;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.IO;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Threading;
|
||||||
|
using System;
|
||||||
|
namespace Marechai.App.Companies.Item.Description
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Builds and executes requests for operations under \companies\{company-id}\description
|
||||||
|
/// </summary>
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class DescriptionRequestBuilder : BaseRequestBuilder
|
||||||
|
{
|
||||||
|
/// <summary>The text property</summary>
|
||||||
|
public global::Marechai.App.Companies.Item.Description.Text.TextRequestBuilder Text
|
||||||
|
{
|
||||||
|
get => new global::Marechai.App.Companies.Item.Description.Text.TextRequestBuilder(PathParameters, RequestAdapter);
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Instantiates a new <see cref="global::Marechai.App.Companies.Item.Description.DescriptionRequestBuilder"/> and sets the default values.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="pathParameters">Path parameters for the request</param>
|
||||||
|
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||||
|
public DescriptionRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/companies/{company%2Did}/description", pathParameters)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Instantiates a new <see cref="global::Marechai.App.Companies.Item.Description.DescriptionRequestBuilder"/> and sets the default values.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||||
|
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||||
|
public DescriptionRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/companies/{company%2Did}/description", rawUrl)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="global::Marechai.App.Models.CompanyDescriptionDto"/></returns>
|
||||||
|
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
|
||||||
|
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 400 status code</exception>
|
||||||
|
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||||
|
#nullable enable
|
||||||
|
public async Task<global::Marechai.App.Models.CompanyDescriptionDto?> GetAsync(Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public async Task<global::Marechai.App.Models.CompanyDescriptionDto> GetAsync(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
var requestInfo = ToGetRequestInformation(requestConfiguration);
|
||||||
|
var errorMapping = new Dictionary<string, ParsableFactory<IParsable>>
|
||||||
|
{
|
||||||
|
{ "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
};
|
||||||
|
return await RequestAdapter.SendAsync<global::Marechai.App.Models.CompanyDescriptionDto>(requestInfo, global::Marechai.App.Models.CompanyDescriptionDto.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false);
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="UntypedNode"/></returns>
|
||||||
|
/// <param name="body">The request body</param>
|
||||||
|
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
|
||||||
|
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 400 status code</exception>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 401 status code</exception>
|
||||||
|
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||||
|
#nullable enable
|
||||||
|
public async Task<UntypedNode?> PostAsync(global::Marechai.App.Models.CompanyDescriptionDto body, Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public async Task<UntypedNode> PostAsync(global::Marechai.App.Models.CompanyDescriptionDto body, Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body));
|
||||||
|
var requestInfo = ToPostRequestInformation(body, requestConfiguration);
|
||||||
|
var errorMapping = new Dictionary<string, ParsableFactory<IParsable>>
|
||||||
|
{
|
||||||
|
{ "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
{ "401", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
};
|
||||||
|
return await RequestAdapter.SendAsync<UntypedNode>(requestInfo, UntypedNode.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false);
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="RequestInformation"/></returns>
|
||||||
|
/// <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<DefaultQueryParameters>>? requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters);
|
||||||
|
requestInfo.Configure(requestConfiguration);
|
||||||
|
requestInfo.Headers.TryAdd("Accept", "application/json, text/plain;q=0.9");
|
||||||
|
return requestInfo;
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="RequestInformation"/></returns>
|
||||||
|
/// <param name="body">The request body</param>
|
||||||
|
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||||
|
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||||
|
#nullable enable
|
||||||
|
public RequestInformation ToPostRequestInformation(global::Marechai.App.Models.CompanyDescriptionDto body, Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public RequestInformation ToPostRequestInformation(global::Marechai.App.Models.CompanyDescriptionDto body, Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body));
|
||||||
|
var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters);
|
||||||
|
requestInfo.Configure(requestConfiguration);
|
||||||
|
requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9");
|
||||||
|
requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body);
|
||||||
|
return requestInfo;
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>A <see cref="global::Marechai.App.Companies.Item.Description.DescriptionRequestBuilder"/></returns>
|
||||||
|
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||||
|
public global::Marechai.App.Companies.Item.Description.DescriptionRequestBuilder WithUrl(string rawUrl)
|
||||||
|
{
|
||||||
|
return new global::Marechai.App.Companies.Item.Description.DescriptionRequestBuilder(rawUrl, RequestAdapter);
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Configuration for the request such as headers, query parameters, and middleware options.
|
||||||
|
/// </summary>
|
||||||
|
[Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")]
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class DescriptionRequestBuilderGetRequestConfiguration : RequestConfiguration<DefaultQueryParameters>
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Configuration for the request such as headers, query parameters, and middleware options.
|
||||||
|
/// </summary>
|
||||||
|
[Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")]
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class DescriptionRequestBuilderPostRequestConfiguration : RequestConfiguration<DefaultQueryParameters>
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#pragma warning restore CS0618
|
||||||
@@ -0,0 +1,91 @@
|
|||||||
|
// <auto-generated/>
|
||||||
|
#pragma warning disable CS0618
|
||||||
|
using Marechai.App.Models;
|
||||||
|
using Microsoft.Kiota.Abstractions.Extensions;
|
||||||
|
using Microsoft.Kiota.Abstractions.Serialization;
|
||||||
|
using Microsoft.Kiota.Abstractions;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.IO;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Threading;
|
||||||
|
using System;
|
||||||
|
namespace Marechai.App.Companies.Item.Description.Text
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Builds and executes requests for operations under \companies\{company-id}\description\text
|
||||||
|
/// </summary>
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class TextRequestBuilder : BaseRequestBuilder
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Instantiates a new <see cref="global::Marechai.App.Companies.Item.Description.Text.TextRequestBuilder"/> and sets the default values.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="pathParameters">Path parameters for the request</param>
|
||||||
|
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||||
|
public TextRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/companies/{company%2Did}/description/text", pathParameters)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Instantiates a new <see cref="global::Marechai.App.Companies.Item.Description.Text.TextRequestBuilder"/> and sets the default values.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||||
|
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||||
|
public TextRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/companies/{company%2Did}/description/text", rawUrl)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="string"/></returns>
|
||||||
|
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
|
||||||
|
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 400 status code</exception>
|
||||||
|
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||||
|
#nullable enable
|
||||||
|
public async Task<string?> GetAsync(Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public async Task<string> GetAsync(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
var requestInfo = ToGetRequestInformation(requestConfiguration);
|
||||||
|
var errorMapping = new Dictionary<string, ParsableFactory<IParsable>>
|
||||||
|
{
|
||||||
|
{ "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
};
|
||||||
|
return await RequestAdapter.SendPrimitiveAsync<string>(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false);
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="RequestInformation"/></returns>
|
||||||
|
/// <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<DefaultQueryParameters>>? requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters);
|
||||||
|
requestInfo.Configure(requestConfiguration);
|
||||||
|
requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9");
|
||||||
|
return requestInfo;
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>A <see cref="global::Marechai.App.Companies.Item.Description.Text.TextRequestBuilder"/></returns>
|
||||||
|
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||||
|
public global::Marechai.App.Companies.Item.Description.Text.TextRequestBuilder WithUrl(string rawUrl)
|
||||||
|
{
|
||||||
|
return new global::Marechai.App.Companies.Item.Description.Text.TextRequestBuilder(rawUrl, RequestAdapter);
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Configuration for the request such as headers, query parameters, and middleware options.
|
||||||
|
/// </summary>
|
||||||
|
[Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")]
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class TextRequestBuilderGetRequestConfiguration : RequestConfiguration<DefaultQueryParameters>
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#pragma warning restore CS0618
|
||||||
@@ -0,0 +1,92 @@
|
|||||||
|
// <auto-generated/>
|
||||||
|
#pragma warning disable CS0618
|
||||||
|
using Marechai.App.Models;
|
||||||
|
using Microsoft.Kiota.Abstractions.Extensions;
|
||||||
|
using Microsoft.Kiota.Abstractions.Serialization;
|
||||||
|
using Microsoft.Kiota.Abstractions;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.IO;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Threading;
|
||||||
|
using System;
|
||||||
|
namespace Marechai.App.Companies.Item.Logos
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Builds and executes requests for operations under \companies\{company-id}\logos
|
||||||
|
/// </summary>
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class LogosRequestBuilder : BaseRequestBuilder
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Instantiates a new <see cref="global::Marechai.App.Companies.Item.Logos.LogosRequestBuilder"/> and sets the default values.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="pathParameters">Path parameters for the request</param>
|
||||||
|
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||||
|
public LogosRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/companies/{company%2Did}/logos", pathParameters)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Instantiates a new <see cref="global::Marechai.App.Companies.Item.Logos.LogosRequestBuilder"/> and sets the default values.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||||
|
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||||
|
public LogosRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/companies/{company%2Did}/logos", rawUrl)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <returns>A List<global::Marechai.App.Models.CompanyLogoDto></returns>
|
||||||
|
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
|
||||||
|
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 400 status code</exception>
|
||||||
|
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||||
|
#nullable enable
|
||||||
|
public async Task<List<global::Marechai.App.Models.CompanyLogoDto>?> GetAsync(Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public async Task<List<global::Marechai.App.Models.CompanyLogoDto>> GetAsync(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
var requestInfo = ToGetRequestInformation(requestConfiguration);
|
||||||
|
var errorMapping = new Dictionary<string, ParsableFactory<IParsable>>
|
||||||
|
{
|
||||||
|
{ "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
};
|
||||||
|
var collectionResult = await RequestAdapter.SendCollectionAsync<global::Marechai.App.Models.CompanyLogoDto>(requestInfo, global::Marechai.App.Models.CompanyLogoDto.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false);
|
||||||
|
return collectionResult?.AsList();
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="RequestInformation"/></returns>
|
||||||
|
/// <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<DefaultQueryParameters>>? requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters);
|
||||||
|
requestInfo.Configure(requestConfiguration);
|
||||||
|
requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9");
|
||||||
|
return requestInfo;
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>A <see cref="global::Marechai.App.Companies.Item.Logos.LogosRequestBuilder"/></returns>
|
||||||
|
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||||
|
public global::Marechai.App.Companies.Item.Logos.LogosRequestBuilder WithUrl(string rawUrl)
|
||||||
|
{
|
||||||
|
return new global::Marechai.App.Companies.Item.Logos.LogosRequestBuilder(rawUrl, RequestAdapter);
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Configuration for the request such as headers, query parameters, and middleware options.
|
||||||
|
/// </summary>
|
||||||
|
[Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")]
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class LogosRequestBuilderGetRequestConfiguration : RequestConfiguration<DefaultQueryParameters>
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#pragma warning restore CS0618
|
||||||
@@ -0,0 +1,92 @@
|
|||||||
|
// <auto-generated/>
|
||||||
|
#pragma warning disable CS0618
|
||||||
|
using Marechai.App.Models;
|
||||||
|
using Microsoft.Kiota.Abstractions.Extensions;
|
||||||
|
using Microsoft.Kiota.Abstractions.Serialization;
|
||||||
|
using Microsoft.Kiota.Abstractions;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.IO;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Threading;
|
||||||
|
using System;
|
||||||
|
namespace Marechai.App.Companies.Item.Machines
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Builds and executes requests for operations under \companies\{company-id}\machines
|
||||||
|
/// </summary>
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class MachinesRequestBuilder : BaseRequestBuilder
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Instantiates a new <see cref="global::Marechai.App.Companies.Item.Machines.MachinesRequestBuilder"/> and sets the default values.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="pathParameters">Path parameters for the request</param>
|
||||||
|
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||||
|
public MachinesRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/companies/{company%2Did}/machines", pathParameters)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Instantiates a new <see cref="global::Marechai.App.Companies.Item.Machines.MachinesRequestBuilder"/> and sets the default values.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||||
|
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||||
|
public MachinesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/companies/{company%2Did}/machines", rawUrl)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <returns>A List<global::Marechai.App.Models.MachineDto></returns>
|
||||||
|
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
|
||||||
|
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 400 status code</exception>
|
||||||
|
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||||
|
#nullable enable
|
||||||
|
public async Task<List<global::Marechai.App.Models.MachineDto>?> GetAsync(Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public async Task<List<global::Marechai.App.Models.MachineDto>> GetAsync(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
var requestInfo = ToGetRequestInformation(requestConfiguration);
|
||||||
|
var errorMapping = new Dictionary<string, ParsableFactory<IParsable>>
|
||||||
|
{
|
||||||
|
{ "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
};
|
||||||
|
var collectionResult = await RequestAdapter.SendCollectionAsync<global::Marechai.App.Models.MachineDto>(requestInfo, global::Marechai.App.Models.MachineDto.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false);
|
||||||
|
return collectionResult?.AsList();
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="RequestInformation"/></returns>
|
||||||
|
/// <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<DefaultQueryParameters>>? requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters);
|
||||||
|
requestInfo.Configure(requestConfiguration);
|
||||||
|
requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9");
|
||||||
|
return requestInfo;
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>A <see cref="global::Marechai.App.Companies.Item.Machines.MachinesRequestBuilder"/></returns>
|
||||||
|
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||||
|
public global::Marechai.App.Companies.Item.Machines.MachinesRequestBuilder WithUrl(string rawUrl)
|
||||||
|
{
|
||||||
|
return new global::Marechai.App.Companies.Item.Machines.MachinesRequestBuilder(rawUrl, RequestAdapter);
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Configuration for the request such as headers, query parameters, and middleware options.
|
||||||
|
/// </summary>
|
||||||
|
[Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")]
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class MachinesRequestBuilderGetRequestConfiguration : RequestConfiguration<DefaultQueryParameters>
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#pragma warning restore CS0618
|
||||||
@@ -0,0 +1,91 @@
|
|||||||
|
// <auto-generated/>
|
||||||
|
#pragma warning disable CS0618
|
||||||
|
using Marechai.App.Models;
|
||||||
|
using Microsoft.Kiota.Abstractions.Extensions;
|
||||||
|
using Microsoft.Kiota.Abstractions.Serialization;
|
||||||
|
using Microsoft.Kiota.Abstractions;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.IO;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Threading;
|
||||||
|
using System;
|
||||||
|
namespace Marechai.App.Companies.Item.Soldto
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Builds and executes requests for operations under \companies\{company-id}\soldto
|
||||||
|
/// </summary>
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class SoldtoRequestBuilder : BaseRequestBuilder
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Instantiates a new <see cref="global::Marechai.App.Companies.Item.Soldto.SoldtoRequestBuilder"/> and sets the default values.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="pathParameters">Path parameters for the request</param>
|
||||||
|
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||||
|
public SoldtoRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/companies/{company%2Did}/soldto", pathParameters)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Instantiates a new <see cref="global::Marechai.App.Companies.Item.Soldto.SoldtoRequestBuilder"/> and sets the default values.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||||
|
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||||
|
public SoldtoRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/companies/{company%2Did}/soldto", rawUrl)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="global::Marechai.App.Models.CompanyDto"/></returns>
|
||||||
|
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
|
||||||
|
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 400 status code</exception>
|
||||||
|
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||||
|
#nullable enable
|
||||||
|
public async Task<global::Marechai.App.Models.CompanyDto?> GetAsync(Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public async Task<global::Marechai.App.Models.CompanyDto> GetAsync(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
var requestInfo = ToGetRequestInformation(requestConfiguration);
|
||||||
|
var errorMapping = new Dictionary<string, ParsableFactory<IParsable>>
|
||||||
|
{
|
||||||
|
{ "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
};
|
||||||
|
return await RequestAdapter.SendAsync<global::Marechai.App.Models.CompanyDto>(requestInfo, global::Marechai.App.Models.CompanyDto.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false);
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="RequestInformation"/></returns>
|
||||||
|
/// <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<DefaultQueryParameters>>? requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters);
|
||||||
|
requestInfo.Configure(requestConfiguration);
|
||||||
|
requestInfo.Headers.TryAdd("Accept", "application/json, text/plain;q=0.9");
|
||||||
|
return requestInfo;
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>A <see cref="global::Marechai.App.Companies.Item.Soldto.SoldtoRequestBuilder"/></returns>
|
||||||
|
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||||
|
public global::Marechai.App.Companies.Item.Soldto.SoldtoRequestBuilder WithUrl(string rawUrl)
|
||||||
|
{
|
||||||
|
return new global::Marechai.App.Companies.Item.Soldto.SoldtoRequestBuilder(rawUrl, RequestAdapter);
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Configuration for the request such as headers, query parameters, and middleware options.
|
||||||
|
/// </summary>
|
||||||
|
[Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")]
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class SoldtoRequestBuilderGetRequestConfiguration : RequestConfiguration<DefaultQueryParameters>
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#pragma warning restore CS0618
|
||||||
@@ -0,0 +1,92 @@
|
|||||||
|
// <auto-generated/>
|
||||||
|
#pragma warning disable CS0618
|
||||||
|
using Marechai.App.Models;
|
||||||
|
using Microsoft.Kiota.Abstractions.Extensions;
|
||||||
|
using Microsoft.Kiota.Abstractions.Serialization;
|
||||||
|
using Microsoft.Kiota.Abstractions;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.IO;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Threading;
|
||||||
|
using System;
|
||||||
|
namespace Marechai.App.Companies.Letter.Item
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Builds and executes requests for operations under \companies\letter\{id}
|
||||||
|
/// </summary>
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class LetterItemRequestBuilder : BaseRequestBuilder
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Instantiates a new <see cref="global::Marechai.App.Companies.Letter.Item.LetterItemRequestBuilder"/> and sets the default values.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="pathParameters">Path parameters for the request</param>
|
||||||
|
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||||
|
public LetterItemRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/companies/letter/{id}", pathParameters)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Instantiates a new <see cref="global::Marechai.App.Companies.Letter.Item.LetterItemRequestBuilder"/> and sets the default values.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||||
|
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||||
|
public LetterItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/companies/letter/{id}", rawUrl)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <returns>A List<global::Marechai.App.Models.CompanyDto></returns>
|
||||||
|
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
|
||||||
|
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 400 status code</exception>
|
||||||
|
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||||
|
#nullable enable
|
||||||
|
public async Task<List<global::Marechai.App.Models.CompanyDto>?> GetAsync(Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public async Task<List<global::Marechai.App.Models.CompanyDto>> GetAsync(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
var requestInfo = ToGetRequestInformation(requestConfiguration);
|
||||||
|
var errorMapping = new Dictionary<string, ParsableFactory<IParsable>>
|
||||||
|
{
|
||||||
|
{ "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
};
|
||||||
|
var collectionResult = await RequestAdapter.SendCollectionAsync<global::Marechai.App.Models.CompanyDto>(requestInfo, global::Marechai.App.Models.CompanyDto.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false);
|
||||||
|
return collectionResult?.AsList();
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="RequestInformation"/></returns>
|
||||||
|
/// <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<DefaultQueryParameters>>? requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters);
|
||||||
|
requestInfo.Configure(requestConfiguration);
|
||||||
|
requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9");
|
||||||
|
return requestInfo;
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>A <see cref="global::Marechai.App.Companies.Letter.Item.LetterItemRequestBuilder"/></returns>
|
||||||
|
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||||
|
public global::Marechai.App.Companies.Letter.Item.LetterItemRequestBuilder WithUrl(string rawUrl)
|
||||||
|
{
|
||||||
|
return new global::Marechai.App.Companies.Letter.Item.LetterItemRequestBuilder(rawUrl, RequestAdapter);
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Configuration for the request such as headers, query parameters, and middleware options.
|
||||||
|
/// </summary>
|
||||||
|
[Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")]
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class LetterItemRequestBuilderGetRequestConfiguration : RequestConfiguration<DefaultQueryParameters>
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#pragma warning restore CS0618
|
||||||
@@ -0,0 +1,48 @@
|
|||||||
|
// <auto-generated/>
|
||||||
|
#pragma warning disable CS0618
|
||||||
|
using Marechai.App.Companies.Letter.Item;
|
||||||
|
using Microsoft.Kiota.Abstractions.Extensions;
|
||||||
|
using Microsoft.Kiota.Abstractions;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.IO;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System;
|
||||||
|
namespace Marechai.App.Companies.Letter
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Builds and executes requests for operations under \companies\letter
|
||||||
|
/// </summary>
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class LetterRequestBuilder : BaseRequestBuilder
|
||||||
|
{
|
||||||
|
/// <summary>Gets an item from the Marechai.App.companies.letter.item collection</summary>
|
||||||
|
/// <param name="position">Unique identifier of the item</param>
|
||||||
|
/// <returns>A <see cref="global::Marechai.App.Companies.Letter.Item.LetterItemRequestBuilder"/></returns>
|
||||||
|
public global::Marechai.App.Companies.Letter.Item.LetterItemRequestBuilder this[string position]
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
var urlTplParams = new Dictionary<string, object>(PathParameters);
|
||||||
|
urlTplParams.Add("id", position);
|
||||||
|
return new global::Marechai.App.Companies.Letter.Item.LetterItemRequestBuilder(urlTplParams, RequestAdapter);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Instantiates a new <see cref="global::Marechai.App.Companies.Letter.LetterRequestBuilder"/> and sets the default values.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="pathParameters">Path parameters for the request</param>
|
||||||
|
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||||
|
public LetterRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/companies/letter", pathParameters)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Instantiates a new <see cref="global::Marechai.App.Companies.Letter.LetterRequestBuilder"/> and sets the default values.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||||
|
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||||
|
public LetterRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/companies/letter", rawUrl)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#pragma warning restore CS0618
|
||||||
@@ -0,0 +1,61 @@
|
|||||||
|
// <auto-generated/>
|
||||||
|
#pragma warning disable CS0618
|
||||||
|
using Marechai.App.Companies.Logos.ChangeYear.Item;
|
||||||
|
using Microsoft.Kiota.Abstractions.Extensions;
|
||||||
|
using Microsoft.Kiota.Abstractions;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.IO;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System;
|
||||||
|
namespace Marechai.App.Companies.Logos.ChangeYear
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Builds and executes requests for operations under \companies\logos\change-year
|
||||||
|
/// </summary>
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class ChangeYearRequestBuilder : BaseRequestBuilder
|
||||||
|
{
|
||||||
|
/// <summary>Gets an item from the Marechai.App.companies.logos.changeYear.item collection</summary>
|
||||||
|
/// <param name="position">Unique identifier of the item</param>
|
||||||
|
/// <returns>A <see cref="global::Marechai.App.Companies.Logos.ChangeYear.Item.ChangeYearItemRequestBuilder"/></returns>
|
||||||
|
public global::Marechai.App.Companies.Logos.ChangeYear.Item.ChangeYearItemRequestBuilder this[int position]
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
var urlTplParams = new Dictionary<string, object>(PathParameters);
|
||||||
|
urlTplParams.Add("id", position);
|
||||||
|
return new global::Marechai.App.Companies.Logos.ChangeYear.Item.ChangeYearItemRequestBuilder(urlTplParams, RequestAdapter);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// <summary>Gets an item from the Marechai.App.companies.logos.changeYear.item collection</summary>
|
||||||
|
/// <param name="position">Unique identifier of the item</param>
|
||||||
|
/// <returns>A <see cref="global::Marechai.App.Companies.Logos.ChangeYear.Item.ChangeYearItemRequestBuilder"/></returns>
|
||||||
|
[Obsolete("This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead.")]
|
||||||
|
public global::Marechai.App.Companies.Logos.ChangeYear.Item.ChangeYearItemRequestBuilder this[string position]
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
var urlTplParams = new Dictionary<string, object>(PathParameters);
|
||||||
|
if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("id", position);
|
||||||
|
return new global::Marechai.App.Companies.Logos.ChangeYear.Item.ChangeYearItemRequestBuilder(urlTplParams, RequestAdapter);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Instantiates a new <see cref="global::Marechai.App.Companies.Logos.ChangeYear.ChangeYearRequestBuilder"/> and sets the default values.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="pathParameters">Path parameters for the request</param>
|
||||||
|
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||||
|
public ChangeYearRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/companies/logos/change-year", pathParameters)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Instantiates a new <see cref="global::Marechai.App.Companies.Logos.ChangeYear.ChangeYearRequestBuilder"/> and sets the default values.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||||
|
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||||
|
public ChangeYearRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/companies/logos/change-year", rawUrl)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#pragma warning restore CS0618
|
||||||
@@ -0,0 +1,175 @@
|
|||||||
|
// <auto-generated/>
|
||||||
|
#pragma warning disable CS0618
|
||||||
|
using Marechai.App.Models;
|
||||||
|
using Microsoft.Kiota.Abstractions.Extensions;
|
||||||
|
using Microsoft.Kiota.Abstractions.Serialization;
|
||||||
|
using Microsoft.Kiota.Abstractions;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.IO;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Threading;
|
||||||
|
using System;
|
||||||
|
namespace Marechai.App.Companies.Logos.ChangeYear.Item
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Builds and executes requests for operations under \companies\logos\change-year\{id}
|
||||||
|
/// </summary>
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class ChangeYearItemRequestBuilder : BaseRequestBuilder
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Instantiates a new <see cref="global::Marechai.App.Companies.Logos.ChangeYear.Item.ChangeYearItemRequestBuilder"/> and sets the default values.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="pathParameters">Path parameters for the request</param>
|
||||||
|
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||||
|
public ChangeYearItemRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/companies/logos/change-year/{id}", pathParameters)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Instantiates a new <see cref="global::Marechai.App.Companies.Logos.ChangeYear.Item.ChangeYearItemRequestBuilder"/> and sets the default values.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||||
|
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||||
|
public ChangeYearItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/companies/logos/change-year/{id}", rawUrl)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="string"/></returns>
|
||||||
|
/// <param name="body">The request body</param>
|
||||||
|
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
|
||||||
|
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 400 status code</exception>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 401 status code</exception>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 404 status code</exception>
|
||||||
|
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||||
|
#nullable enable
|
||||||
|
public async Task<string?> PutAsync(global::Marechai.App.Companies.Logos.ChangeYear.Item.ChangeYearItemRequestBuilder.ChangeYearPutRequestBody body, Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public async Task<string> PutAsync(global::Marechai.App.Companies.Logos.ChangeYear.Item.ChangeYearItemRequestBuilder.ChangeYearPutRequestBody body, Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body));
|
||||||
|
var requestInfo = ToPutRequestInformation(body, requestConfiguration);
|
||||||
|
var errorMapping = new Dictionary<string, ParsableFactory<IParsable>>
|
||||||
|
{
|
||||||
|
{ "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
{ "401", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
{ "404", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
};
|
||||||
|
return await RequestAdapter.SendPrimitiveAsync<string>(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false);
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="RequestInformation"/></returns>
|
||||||
|
/// <param name="body">The request body</param>
|
||||||
|
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||||
|
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||||
|
#nullable enable
|
||||||
|
public RequestInformation ToPutRequestInformation(global::Marechai.App.Companies.Logos.ChangeYear.Item.ChangeYearItemRequestBuilder.ChangeYearPutRequestBody body, Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public RequestInformation ToPutRequestInformation(global::Marechai.App.Companies.Logos.ChangeYear.Item.ChangeYearItemRequestBuilder.ChangeYearPutRequestBody body, Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body));
|
||||||
|
var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters);
|
||||||
|
requestInfo.Configure(requestConfiguration);
|
||||||
|
requestInfo.Headers.TryAdd("Accept", "application/json, text/plain;q=0.9");
|
||||||
|
requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body);
|
||||||
|
return requestInfo;
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>A <see cref="global::Marechai.App.Companies.Logos.ChangeYear.Item.ChangeYearItemRequestBuilder"/></returns>
|
||||||
|
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||||
|
public global::Marechai.App.Companies.Logos.ChangeYear.Item.ChangeYearItemRequestBuilder WithUrl(string rawUrl)
|
||||||
|
{
|
||||||
|
return new global::Marechai.App.Companies.Logos.ChangeYear.Item.ChangeYearItemRequestBuilder(rawUrl, RequestAdapter);
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Configuration for the request such as headers, query parameters, and middleware options.
|
||||||
|
/// </summary>
|
||||||
|
[Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")]
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class ChangeYearItemRequestBuilderPutRequestConfiguration : RequestConfiguration<DefaultQueryParameters>
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Composed type wrapper for classes <see cref="global::Marechai.App.Companies.Logos.ChangeYear.Item.ChangeYearPutRequestBodyMember1"/>, <see cref="global::Marechai.App.Companies.Logos.ChangeYear.Item.ChangeYearPutRequestBodyMember2"/>
|
||||||
|
/// </summary>
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class ChangeYearPutRequestBody : IComposedTypeWrapper, IParsable
|
||||||
|
{
|
||||||
|
/// <summary>Composed type representation for type <see cref="global::Marechai.App.Companies.Logos.ChangeYear.Item.ChangeYearPutRequestBodyMember1"/></summary>
|
||||||
|
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||||
|
#nullable enable
|
||||||
|
public global::Marechai.App.Companies.Logos.ChangeYear.Item.ChangeYearPutRequestBodyMember1? ChangeYearPutRequestBodyMember1 { get; set; }
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public global::Marechai.App.Companies.Logos.ChangeYear.Item.ChangeYearPutRequestBodyMember1 ChangeYearPutRequestBodyMember1 { get; set; }
|
||||||
|
#endif
|
||||||
|
/// <summary>Composed type representation for type <see cref="global::Marechai.App.Companies.Logos.ChangeYear.Item.ChangeYearPutRequestBodyMember2"/></summary>
|
||||||
|
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||||
|
#nullable enable
|
||||||
|
public global::Marechai.App.Companies.Logos.ChangeYear.Item.ChangeYearPutRequestBodyMember2? ChangeYearPutRequestBodyMember2 { get; set; }
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public global::Marechai.App.Companies.Logos.ChangeYear.Item.ChangeYearPutRequestBodyMember2 ChangeYearPutRequestBodyMember2 { get; set; }
|
||||||
|
#endif
|
||||||
|
/// <summary>
|
||||||
|
/// Creates a new instance of the appropriate class based on discriminator value
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>A <see cref="global::Marechai.App.Companies.Logos.ChangeYear.Item.ChangeYearItemRequestBuilder.ChangeYearPutRequestBody"/></returns>
|
||||||
|
/// <param name="parseNode">The parse node to use to read the discriminator value and create the object</param>
|
||||||
|
public static global::Marechai.App.Companies.Logos.ChangeYear.Item.ChangeYearItemRequestBuilder.ChangeYearPutRequestBody CreateFromDiscriminatorValue(IParseNode parseNode)
|
||||||
|
{
|
||||||
|
if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode));
|
||||||
|
var mappingValue = parseNode.GetChildNode("")?.GetStringValue();
|
||||||
|
var result = new global::Marechai.App.Companies.Logos.ChangeYear.Item.ChangeYearItemRequestBuilder.ChangeYearPutRequestBody();
|
||||||
|
if("".Equals(mappingValue, StringComparison.OrdinalIgnoreCase))
|
||||||
|
{
|
||||||
|
result.ChangeYearPutRequestBodyMember1 = new global::Marechai.App.Companies.Logos.ChangeYear.Item.ChangeYearPutRequestBodyMember1();
|
||||||
|
}
|
||||||
|
else if("".Equals(mappingValue, StringComparison.OrdinalIgnoreCase))
|
||||||
|
{
|
||||||
|
result.ChangeYearPutRequestBodyMember2 = new global::Marechai.App.Companies.Logos.ChangeYear.Item.ChangeYearPutRequestBodyMember2();
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// The deserialization information for the current model
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>A IDictionary<string, Action<IParseNode>></returns>
|
||||||
|
public virtual IDictionary<string, Action<IParseNode>> GetFieldDeserializers()
|
||||||
|
{
|
||||||
|
if(ChangeYearPutRequestBodyMember1 != null)
|
||||||
|
{
|
||||||
|
return ChangeYearPutRequestBodyMember1.GetFieldDeserializers();
|
||||||
|
}
|
||||||
|
else if(ChangeYearPutRequestBodyMember2 != null)
|
||||||
|
{
|
||||||
|
return ChangeYearPutRequestBodyMember2.GetFieldDeserializers();
|
||||||
|
}
|
||||||
|
return new Dictionary<string, Action<IParseNode>>();
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Serializes information the current object
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="writer">Serialization writer to use to serialize this model</param>
|
||||||
|
public virtual void Serialize(ISerializationWriter writer)
|
||||||
|
{
|
||||||
|
if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer));
|
||||||
|
if(ChangeYearPutRequestBodyMember1 != null)
|
||||||
|
{
|
||||||
|
writer.WriteObjectValue<global::Marechai.App.Companies.Logos.ChangeYear.Item.ChangeYearPutRequestBodyMember1>(null, ChangeYearPutRequestBodyMember1);
|
||||||
|
}
|
||||||
|
else if(ChangeYearPutRequestBodyMember2 != null)
|
||||||
|
{
|
||||||
|
writer.WriteObjectValue<global::Marechai.App.Companies.Logos.ChangeYear.Item.ChangeYearPutRequestBodyMember2>(null, ChangeYearPutRequestBodyMember2);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#pragma warning restore CS0618
|
||||||
@@ -0,0 +1,55 @@
|
|||||||
|
// <auto-generated/>
|
||||||
|
#pragma warning disable CS0618
|
||||||
|
using Microsoft.Kiota.Abstractions.Extensions;
|
||||||
|
using Microsoft.Kiota.Abstractions.Serialization;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.IO;
|
||||||
|
using System;
|
||||||
|
namespace Marechai.App.Companies.Logos.ChangeYear.Item
|
||||||
|
{
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
#pragma warning disable CS1591
|
||||||
|
public partial class ChangeYearPutRequestBodyMember1 : IAdditionalDataHolder, IParsable
|
||||||
|
#pragma warning restore CS1591
|
||||||
|
{
|
||||||
|
/// <summary>Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.</summary>
|
||||||
|
public IDictionary<string, object> AdditionalData { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// Instantiates a new <see cref="global::Marechai.App.Companies.Logos.ChangeYear.Item.ChangeYearPutRequestBodyMember1"/> and sets the default values.
|
||||||
|
/// </summary>
|
||||||
|
public ChangeYearPutRequestBodyMember1()
|
||||||
|
{
|
||||||
|
AdditionalData = new Dictionary<string, object>();
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Creates a new instance of the appropriate class based on discriminator value
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>A <see cref="global::Marechai.App.Companies.Logos.ChangeYear.Item.ChangeYearPutRequestBodyMember1"/></returns>
|
||||||
|
/// <param name="parseNode">The parse node to use to read the discriminator value and create the object</param>
|
||||||
|
public static global::Marechai.App.Companies.Logos.ChangeYear.Item.ChangeYearPutRequestBodyMember1 CreateFromDiscriminatorValue(IParseNode parseNode)
|
||||||
|
{
|
||||||
|
if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode));
|
||||||
|
return new global::Marechai.App.Companies.Logos.ChangeYear.Item.ChangeYearPutRequestBodyMember1();
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// The deserialization information for the current model
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>A IDictionary<string, Action<IParseNode>></returns>
|
||||||
|
public virtual IDictionary<string, Action<IParseNode>> GetFieldDeserializers()
|
||||||
|
{
|
||||||
|
return new Dictionary<string, Action<IParseNode>>
|
||||||
|
{
|
||||||
|
};
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Serializes information the current object
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="writer">Serialization writer to use to serialize this model</param>
|
||||||
|
public virtual void Serialize(ISerializationWriter writer)
|
||||||
|
{
|
||||||
|
if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer));
|
||||||
|
writer.WriteAdditionalData(AdditionalData);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#pragma warning restore CS0618
|
||||||
@@ -0,0 +1,55 @@
|
|||||||
|
// <auto-generated/>
|
||||||
|
#pragma warning disable CS0618
|
||||||
|
using Microsoft.Kiota.Abstractions.Extensions;
|
||||||
|
using Microsoft.Kiota.Abstractions.Serialization;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.IO;
|
||||||
|
using System;
|
||||||
|
namespace Marechai.App.Companies.Logos.ChangeYear.Item
|
||||||
|
{
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
#pragma warning disable CS1591
|
||||||
|
public partial class ChangeYearPutRequestBodyMember2 : IAdditionalDataHolder, IParsable
|
||||||
|
#pragma warning restore CS1591
|
||||||
|
{
|
||||||
|
/// <summary>Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.</summary>
|
||||||
|
public IDictionary<string, object> AdditionalData { get; set; }
|
||||||
|
/// <summary>
|
||||||
|
/// Instantiates a new <see cref="global::Marechai.App.Companies.Logos.ChangeYear.Item.ChangeYearPutRequestBodyMember2"/> and sets the default values.
|
||||||
|
/// </summary>
|
||||||
|
public ChangeYearPutRequestBodyMember2()
|
||||||
|
{
|
||||||
|
AdditionalData = new Dictionary<string, object>();
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Creates a new instance of the appropriate class based on discriminator value
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>A <see cref="global::Marechai.App.Companies.Logos.ChangeYear.Item.ChangeYearPutRequestBodyMember2"/></returns>
|
||||||
|
/// <param name="parseNode">The parse node to use to read the discriminator value and create the object</param>
|
||||||
|
public static global::Marechai.App.Companies.Logos.ChangeYear.Item.ChangeYearPutRequestBodyMember2 CreateFromDiscriminatorValue(IParseNode parseNode)
|
||||||
|
{
|
||||||
|
if(ReferenceEquals(parseNode, null)) throw new ArgumentNullException(nameof(parseNode));
|
||||||
|
return new global::Marechai.App.Companies.Logos.ChangeYear.Item.ChangeYearPutRequestBodyMember2();
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// The deserialization information for the current model
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>A IDictionary<string, Action<IParseNode>></returns>
|
||||||
|
public virtual IDictionary<string, Action<IParseNode>> GetFieldDeserializers()
|
||||||
|
{
|
||||||
|
return new Dictionary<string, Action<IParseNode>>
|
||||||
|
{
|
||||||
|
};
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Serializes information the current object
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="writer">Serialization writer to use to serialize this model</param>
|
||||||
|
public virtual void Serialize(ISerializationWriter writer)
|
||||||
|
{
|
||||||
|
if(ReferenceEquals(writer, null)) throw new ArgumentNullException(nameof(writer));
|
||||||
|
writer.WriteAdditionalData(AdditionalData);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#pragma warning restore CS0618
|
||||||
@@ -0,0 +1,95 @@
|
|||||||
|
// <auto-generated/>
|
||||||
|
#pragma warning disable CS0618
|
||||||
|
using Marechai.App.Models;
|
||||||
|
using Microsoft.Kiota.Abstractions.Extensions;
|
||||||
|
using Microsoft.Kiota.Abstractions.Serialization;
|
||||||
|
using Microsoft.Kiota.Abstractions;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.IO;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Threading;
|
||||||
|
using System;
|
||||||
|
namespace Marechai.App.Companies.Logos.Item
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Builds and executes requests for operations under \companies\logos\{id}
|
||||||
|
/// </summary>
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class LogosItemRequestBuilder : BaseRequestBuilder
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Instantiates a new <see cref="global::Marechai.App.Companies.Logos.Item.LogosItemRequestBuilder"/> and sets the default values.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="pathParameters">Path parameters for the request</param>
|
||||||
|
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||||
|
public LogosItemRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/companies/logos/{id}", pathParameters)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Instantiates a new <see cref="global::Marechai.App.Companies.Logos.Item.LogosItemRequestBuilder"/> and sets the default values.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||||
|
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||||
|
public LogosItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/companies/logos/{id}", rawUrl)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="string"/></returns>
|
||||||
|
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
|
||||||
|
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 400 status code</exception>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 401 status code</exception>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 404 status code</exception>
|
||||||
|
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||||
|
#nullable enable
|
||||||
|
public async Task<string?> DeleteAsync(Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public async Task<string> DeleteAsync(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
var requestInfo = ToDeleteRequestInformation(requestConfiguration);
|
||||||
|
var errorMapping = new Dictionary<string, ParsableFactory<IParsable>>
|
||||||
|
{
|
||||||
|
{ "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
{ "401", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
{ "404", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
};
|
||||||
|
return await RequestAdapter.SendPrimitiveAsync<string>(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false);
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="RequestInformation"/></returns>
|
||||||
|
/// <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 ToDeleteRequestInformation(Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public RequestInformation ToDeleteRequestInformation(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters);
|
||||||
|
requestInfo.Configure(requestConfiguration);
|
||||||
|
requestInfo.Headers.TryAdd("Accept", "application/json, text/plain;q=0.9");
|
||||||
|
return requestInfo;
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>A <see cref="global::Marechai.App.Companies.Logos.Item.LogosItemRequestBuilder"/></returns>
|
||||||
|
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||||
|
public global::Marechai.App.Companies.Logos.Item.LogosItemRequestBuilder WithUrl(string rawUrl)
|
||||||
|
{
|
||||||
|
return new global::Marechai.App.Companies.Logos.Item.LogosItemRequestBuilder(rawUrl, RequestAdapter);
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Configuration for the request such as headers, query parameters, and middleware options.
|
||||||
|
/// </summary>
|
||||||
|
[Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")]
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class LogosItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration<DefaultQueryParameters>
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#pragma warning restore CS0618
|
||||||
@@ -0,0 +1,130 @@
|
|||||||
|
// <auto-generated/>
|
||||||
|
#pragma warning disable CS0618
|
||||||
|
using Marechai.App.Companies.Logos.ChangeYear;
|
||||||
|
using Marechai.App.Companies.Logos.Item;
|
||||||
|
using Marechai.App.Models;
|
||||||
|
using Microsoft.Kiota.Abstractions.Extensions;
|
||||||
|
using Microsoft.Kiota.Abstractions.Serialization;
|
||||||
|
using Microsoft.Kiota.Abstractions;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.IO;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Threading;
|
||||||
|
using System;
|
||||||
|
namespace Marechai.App.Companies.Logos
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Builds and executes requests for operations under \companies\logos
|
||||||
|
/// </summary>
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class LogosRequestBuilder : BaseRequestBuilder
|
||||||
|
{
|
||||||
|
/// <summary>The changeYear property</summary>
|
||||||
|
public global::Marechai.App.Companies.Logos.ChangeYear.ChangeYearRequestBuilder ChangeYear
|
||||||
|
{
|
||||||
|
get => new global::Marechai.App.Companies.Logos.ChangeYear.ChangeYearRequestBuilder(PathParameters, RequestAdapter);
|
||||||
|
}
|
||||||
|
/// <summary>Gets an item from the Marechai.App.companies.logos.item collection</summary>
|
||||||
|
/// <param name="position">Unique identifier of the item</param>
|
||||||
|
/// <returns>A <see cref="global::Marechai.App.Companies.Logos.Item.LogosItemRequestBuilder"/></returns>
|
||||||
|
public global::Marechai.App.Companies.Logos.Item.LogosItemRequestBuilder this[int position]
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
var urlTplParams = new Dictionary<string, object>(PathParameters);
|
||||||
|
urlTplParams.Add("id", position);
|
||||||
|
return new global::Marechai.App.Companies.Logos.Item.LogosItemRequestBuilder(urlTplParams, RequestAdapter);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// <summary>Gets an item from the Marechai.App.companies.logos.item collection</summary>
|
||||||
|
/// <param name="position">Unique identifier of the item</param>
|
||||||
|
/// <returns>A <see cref="global::Marechai.App.Companies.Logos.Item.LogosItemRequestBuilder"/></returns>
|
||||||
|
[Obsolete("This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead.")]
|
||||||
|
public global::Marechai.App.Companies.Logos.Item.LogosItemRequestBuilder this[string position]
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
var urlTplParams = new Dictionary<string, object>(PathParameters);
|
||||||
|
if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("id", position);
|
||||||
|
return new global::Marechai.App.Companies.Logos.Item.LogosItemRequestBuilder(urlTplParams, RequestAdapter);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Instantiates a new <see cref="global::Marechai.App.Companies.Logos.LogosRequestBuilder"/> and sets the default values.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="pathParameters">Path parameters for the request</param>
|
||||||
|
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||||
|
public LogosRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/companies/logos", pathParameters)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Instantiates a new <see cref="global::Marechai.App.Companies.Logos.LogosRequestBuilder"/> and sets the default values.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||||
|
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||||
|
public LogosRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/companies/logos", rawUrl)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="UntypedNode"/></returns>
|
||||||
|
/// <param name="body">The request body</param>
|
||||||
|
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
|
||||||
|
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 400 status code</exception>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 401 status code</exception>
|
||||||
|
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||||
|
#nullable enable
|
||||||
|
public async Task<UntypedNode?> PostAsync(global::Marechai.App.Models.CompanyLogoDto body, Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public async Task<UntypedNode> PostAsync(global::Marechai.App.Models.CompanyLogoDto body, Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body));
|
||||||
|
var requestInfo = ToPostRequestInformation(body, requestConfiguration);
|
||||||
|
var errorMapping = new Dictionary<string, ParsableFactory<IParsable>>
|
||||||
|
{
|
||||||
|
{ "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
{ "401", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
};
|
||||||
|
return await RequestAdapter.SendAsync<UntypedNode>(requestInfo, UntypedNode.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false);
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="RequestInformation"/></returns>
|
||||||
|
/// <param name="body">The request body</param>
|
||||||
|
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||||
|
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||||
|
#nullable enable
|
||||||
|
public RequestInformation ToPostRequestInformation(global::Marechai.App.Models.CompanyLogoDto body, Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public RequestInformation ToPostRequestInformation(global::Marechai.App.Models.CompanyLogoDto body, Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body));
|
||||||
|
var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters);
|
||||||
|
requestInfo.Configure(requestConfiguration);
|
||||||
|
requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9");
|
||||||
|
requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body);
|
||||||
|
return requestInfo;
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>A <see cref="global::Marechai.App.Companies.Logos.LogosRequestBuilder"/></returns>
|
||||||
|
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||||
|
public global::Marechai.App.Companies.Logos.LogosRequestBuilder WithUrl(string rawUrl)
|
||||||
|
{
|
||||||
|
return new global::Marechai.App.Companies.Logos.LogosRequestBuilder(rawUrl, RequestAdapter);
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Configuration for the request such as headers, query parameters, and middleware options.
|
||||||
|
/// </summary>
|
||||||
|
[Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")]
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class LogosRequestBuilderPostRequestConfiguration : RequestConfiguration<DefaultQueryParameters>
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#pragma warning restore CS0618
|
||||||
@@ -0,0 +1,92 @@
|
|||||||
|
// <auto-generated/>
|
||||||
|
#pragma warning disable CS0618
|
||||||
|
using Marechai.App.Models;
|
||||||
|
using Microsoft.Kiota.Abstractions.Extensions;
|
||||||
|
using Microsoft.Kiota.Abstractions.Serialization;
|
||||||
|
using Microsoft.Kiota.Abstractions;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.IO;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Threading;
|
||||||
|
using System;
|
||||||
|
namespace Marechai.App.Computers
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Builds and executes requests for operations under \computers
|
||||||
|
/// </summary>
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class ComputersRequestBuilder : BaseRequestBuilder
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Instantiates a new <see cref="global::Marechai.App.Computers.ComputersRequestBuilder"/> and sets the default values.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="pathParameters">Path parameters for the request</param>
|
||||||
|
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||||
|
public ComputersRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/computers", pathParameters)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Instantiates a new <see cref="global::Marechai.App.Computers.ComputersRequestBuilder"/> and sets the default values.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||||
|
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||||
|
public ComputersRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/computers", rawUrl)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <returns>A List<global::Marechai.App.Models.MachineDto></returns>
|
||||||
|
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
|
||||||
|
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 400 status code</exception>
|
||||||
|
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||||
|
#nullable enable
|
||||||
|
public async Task<List<global::Marechai.App.Models.MachineDto>?> GetAsync(Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public async Task<List<global::Marechai.App.Models.MachineDto>> GetAsync(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
var requestInfo = ToGetRequestInformation(requestConfiguration);
|
||||||
|
var errorMapping = new Dictionary<string, ParsableFactory<IParsable>>
|
||||||
|
{
|
||||||
|
{ "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
};
|
||||||
|
var collectionResult = await RequestAdapter.SendCollectionAsync<global::Marechai.App.Models.MachineDto>(requestInfo, global::Marechai.App.Models.MachineDto.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false);
|
||||||
|
return collectionResult?.AsList();
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="RequestInformation"/></returns>
|
||||||
|
/// <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<DefaultQueryParameters>>? requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters);
|
||||||
|
requestInfo.Configure(requestConfiguration);
|
||||||
|
requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9");
|
||||||
|
return requestInfo;
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>A <see cref="global::Marechai.App.Computers.ComputersRequestBuilder"/></returns>
|
||||||
|
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||||
|
public global::Marechai.App.Computers.ComputersRequestBuilder WithUrl(string rawUrl)
|
||||||
|
{
|
||||||
|
return new global::Marechai.App.Computers.ComputersRequestBuilder(rawUrl, RequestAdapter);
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Configuration for the request such as headers, query parameters, and middleware options.
|
||||||
|
/// </summary>
|
||||||
|
[Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")]
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class ComputersRequestBuilderGetRequestConfiguration : RequestConfiguration<DefaultQueryParameters>
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#pragma warning restore CS0618
|
||||||
@@ -0,0 +1,92 @@
|
|||||||
|
// <auto-generated/>
|
||||||
|
#pragma warning disable CS0618
|
||||||
|
using Marechai.App.Models;
|
||||||
|
using Microsoft.Kiota.Abstractions.Extensions;
|
||||||
|
using Microsoft.Kiota.Abstractions.Serialization;
|
||||||
|
using Microsoft.Kiota.Abstractions;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.IO;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Threading;
|
||||||
|
using System;
|
||||||
|
namespace Marechai.App.Consoles
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Builds and executes requests for operations under \consoles
|
||||||
|
/// </summary>
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class ConsolesRequestBuilder : BaseRequestBuilder
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Instantiates a new <see cref="global::Marechai.App.Consoles.ConsolesRequestBuilder"/> and sets the default values.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="pathParameters">Path parameters for the request</param>
|
||||||
|
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||||
|
public ConsolesRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/consoles", pathParameters)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Instantiates a new <see cref="global::Marechai.App.Consoles.ConsolesRequestBuilder"/> and sets the default values.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||||
|
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||||
|
public ConsolesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/consoles", rawUrl)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <returns>A List<global::Marechai.App.Models.MachineDto></returns>
|
||||||
|
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
|
||||||
|
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 400 status code</exception>
|
||||||
|
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||||
|
#nullable enable
|
||||||
|
public async Task<List<global::Marechai.App.Models.MachineDto>?> GetAsync(Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public async Task<List<global::Marechai.App.Models.MachineDto>> GetAsync(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
var requestInfo = ToGetRequestInformation(requestConfiguration);
|
||||||
|
var errorMapping = new Dictionary<string, ParsableFactory<IParsable>>
|
||||||
|
{
|
||||||
|
{ "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
};
|
||||||
|
var collectionResult = await RequestAdapter.SendCollectionAsync<global::Marechai.App.Models.MachineDto>(requestInfo, global::Marechai.App.Models.MachineDto.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false);
|
||||||
|
return collectionResult?.AsList();
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="RequestInformation"/></returns>
|
||||||
|
/// <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<DefaultQueryParameters>>? requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters);
|
||||||
|
requestInfo.Configure(requestConfiguration);
|
||||||
|
requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9");
|
||||||
|
return requestInfo;
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>A <see cref="global::Marechai.App.Consoles.ConsolesRequestBuilder"/></returns>
|
||||||
|
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||||
|
public global::Marechai.App.Consoles.ConsolesRequestBuilder WithUrl(string rawUrl)
|
||||||
|
{
|
||||||
|
return new global::Marechai.App.Consoles.ConsolesRequestBuilder(rawUrl, RequestAdapter);
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Configuration for the request such as headers, query parameters, and middleware options.
|
||||||
|
/// </summary>
|
||||||
|
[Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")]
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class ConsolesRequestBuilderGetRequestConfiguration : RequestConfiguration<DefaultQueryParameters>
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#pragma warning restore CS0618
|
||||||
91
Marechai.App/Services/Client/Count/CountRequestBuilder.cs
Normal file
91
Marechai.App/Services/Client/Count/CountRequestBuilder.cs
Normal file
@@ -0,0 +1,91 @@
|
|||||||
|
// <auto-generated/>
|
||||||
|
#pragma warning disable CS0618
|
||||||
|
using Marechai.App.Models;
|
||||||
|
using Microsoft.Kiota.Abstractions.Extensions;
|
||||||
|
using Microsoft.Kiota.Abstractions.Serialization;
|
||||||
|
using Microsoft.Kiota.Abstractions;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.IO;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Threading;
|
||||||
|
using System;
|
||||||
|
namespace Marechai.App.Count
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Builds and executes requests for operations under \count
|
||||||
|
/// </summary>
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class CountRequestBuilder : BaseRequestBuilder
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Instantiates a new <see cref="global::Marechai.App.Count.CountRequestBuilder"/> and sets the default values.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="pathParameters">Path parameters for the request</param>
|
||||||
|
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||||
|
public CountRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/count", pathParameters)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Instantiates a new <see cref="global::Marechai.App.Count.CountRequestBuilder"/> and sets the default values.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||||
|
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||||
|
public CountRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/count", rawUrl)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="UntypedNode"/></returns>
|
||||||
|
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
|
||||||
|
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 400 status code</exception>
|
||||||
|
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||||
|
#nullable enable
|
||||||
|
public async Task<UntypedNode?> GetAsync(Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public async Task<UntypedNode> GetAsync(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
var requestInfo = ToGetRequestInformation(requestConfiguration);
|
||||||
|
var errorMapping = new Dictionary<string, ParsableFactory<IParsable>>
|
||||||
|
{
|
||||||
|
{ "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
};
|
||||||
|
return await RequestAdapter.SendAsync<UntypedNode>(requestInfo, UntypedNode.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false);
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="RequestInformation"/></returns>
|
||||||
|
/// <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<DefaultQueryParameters>>? requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters);
|
||||||
|
requestInfo.Configure(requestConfiguration);
|
||||||
|
requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9");
|
||||||
|
return requestInfo;
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>A <see cref="global::Marechai.App.Count.CountRequestBuilder"/></returns>
|
||||||
|
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||||
|
public global::Marechai.App.Count.CountRequestBuilder WithUrl(string rawUrl)
|
||||||
|
{
|
||||||
|
return new global::Marechai.App.Count.CountRequestBuilder(rawUrl, RequestAdapter);
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Configuration for the request such as headers, query parameters, and middleware options.
|
||||||
|
/// </summary>
|
||||||
|
[Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")]
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class CountRequestBuilderGetRequestConfiguration : RequestConfiguration<DefaultQueryParameters>
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#pragma warning restore CS0618
|
||||||
@@ -0,0 +1,61 @@
|
|||||||
|
// <auto-generated/>
|
||||||
|
#pragma warning disable CS0618
|
||||||
|
using Marechai.App.Countries.Item;
|
||||||
|
using Microsoft.Kiota.Abstractions.Extensions;
|
||||||
|
using Microsoft.Kiota.Abstractions;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.IO;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System;
|
||||||
|
namespace Marechai.App.Countries
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Builds and executes requests for operations under \countries
|
||||||
|
/// </summary>
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class CountriesRequestBuilder : BaseRequestBuilder
|
||||||
|
{
|
||||||
|
/// <summary>Gets an item from the Marechai.App.countries.item collection</summary>
|
||||||
|
/// <param name="position">Unique identifier of the item</param>
|
||||||
|
/// <returns>A <see cref="global::Marechai.App.Countries.Item.CountriesItemRequestBuilder"/></returns>
|
||||||
|
public global::Marechai.App.Countries.Item.CountriesItemRequestBuilder this[int position]
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
var urlTplParams = new Dictionary<string, object>(PathParameters);
|
||||||
|
urlTplParams.Add("id", position);
|
||||||
|
return new global::Marechai.App.Countries.Item.CountriesItemRequestBuilder(urlTplParams, RequestAdapter);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// <summary>Gets an item from the Marechai.App.countries.item collection</summary>
|
||||||
|
/// <param name="position">Unique identifier of the item</param>
|
||||||
|
/// <returns>A <see cref="global::Marechai.App.Countries.Item.CountriesItemRequestBuilder"/></returns>
|
||||||
|
[Obsolete("This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead.")]
|
||||||
|
public global::Marechai.App.Countries.Item.CountriesItemRequestBuilder this[string position]
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
var urlTplParams = new Dictionary<string, object>(PathParameters);
|
||||||
|
if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("id", position);
|
||||||
|
return new global::Marechai.App.Countries.Item.CountriesItemRequestBuilder(urlTplParams, RequestAdapter);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Instantiates a new <see cref="global::Marechai.App.Countries.CountriesRequestBuilder"/> and sets the default values.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="pathParameters">Path parameters for the request</param>
|
||||||
|
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||||
|
public CountriesRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/countries", pathParameters)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Instantiates a new <see cref="global::Marechai.App.Countries.CountriesRequestBuilder"/> and sets the default values.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||||
|
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||||
|
public CountriesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/countries", rawUrl)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#pragma warning restore CS0618
|
||||||
@@ -0,0 +1,92 @@
|
|||||||
|
// <auto-generated/>
|
||||||
|
#pragma warning disable CS0618
|
||||||
|
using Marechai.App.Models;
|
||||||
|
using Microsoft.Kiota.Abstractions.Extensions;
|
||||||
|
using Microsoft.Kiota.Abstractions.Serialization;
|
||||||
|
using Microsoft.Kiota.Abstractions;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.IO;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Threading;
|
||||||
|
using System;
|
||||||
|
namespace Marechai.App.Countries.Item.Companies
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Builds and executes requests for operations under \countries\{id}\companies
|
||||||
|
/// </summary>
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class CompaniesRequestBuilder : BaseRequestBuilder
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Instantiates a new <see cref="global::Marechai.App.Countries.Item.Companies.CompaniesRequestBuilder"/> and sets the default values.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="pathParameters">Path parameters for the request</param>
|
||||||
|
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||||
|
public CompaniesRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/countries/{id}/companies", pathParameters)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Instantiates a new <see cref="global::Marechai.App.Countries.Item.Companies.CompaniesRequestBuilder"/> and sets the default values.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||||
|
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||||
|
public CompaniesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/countries/{id}/companies", rawUrl)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <returns>A List<global::Marechai.App.Models.CompanyDto></returns>
|
||||||
|
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
|
||||||
|
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 400 status code</exception>
|
||||||
|
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||||
|
#nullable enable
|
||||||
|
public async Task<List<global::Marechai.App.Models.CompanyDto>?> GetAsync(Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public async Task<List<global::Marechai.App.Models.CompanyDto>> GetAsync(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
var requestInfo = ToGetRequestInformation(requestConfiguration);
|
||||||
|
var errorMapping = new Dictionary<string, ParsableFactory<IParsable>>
|
||||||
|
{
|
||||||
|
{ "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
};
|
||||||
|
var collectionResult = await RequestAdapter.SendCollectionAsync<global::Marechai.App.Models.CompanyDto>(requestInfo, global::Marechai.App.Models.CompanyDto.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false);
|
||||||
|
return collectionResult?.AsList();
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="RequestInformation"/></returns>
|
||||||
|
/// <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<DefaultQueryParameters>>? requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters);
|
||||||
|
requestInfo.Configure(requestConfiguration);
|
||||||
|
requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9");
|
||||||
|
return requestInfo;
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>A <see cref="global::Marechai.App.Countries.Item.Companies.CompaniesRequestBuilder"/></returns>
|
||||||
|
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||||
|
public global::Marechai.App.Countries.Item.Companies.CompaniesRequestBuilder WithUrl(string rawUrl)
|
||||||
|
{
|
||||||
|
return new global::Marechai.App.Countries.Item.Companies.CompaniesRequestBuilder(rawUrl, RequestAdapter);
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Configuration for the request such as headers, query parameters, and middleware options.
|
||||||
|
/// </summary>
|
||||||
|
[Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")]
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class CompaniesRequestBuilderGetRequestConfiguration : RequestConfiguration<DefaultQueryParameters>
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#pragma warning restore CS0618
|
||||||
@@ -0,0 +1,47 @@
|
|||||||
|
// <auto-generated/>
|
||||||
|
#pragma warning disable CS0618
|
||||||
|
using Marechai.App.Countries.Item.Companies;
|
||||||
|
using Marechai.App.Countries.Item.Name;
|
||||||
|
using Microsoft.Kiota.Abstractions.Extensions;
|
||||||
|
using Microsoft.Kiota.Abstractions;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.IO;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System;
|
||||||
|
namespace Marechai.App.Countries.Item
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Builds and executes requests for operations under \countries\{id}
|
||||||
|
/// </summary>
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class CountriesItemRequestBuilder : BaseRequestBuilder
|
||||||
|
{
|
||||||
|
/// <summary>The companies property</summary>
|
||||||
|
public global::Marechai.App.Countries.Item.Companies.CompaniesRequestBuilder Companies
|
||||||
|
{
|
||||||
|
get => new global::Marechai.App.Countries.Item.Companies.CompaniesRequestBuilder(PathParameters, RequestAdapter);
|
||||||
|
}
|
||||||
|
/// <summary>The name property</summary>
|
||||||
|
public global::Marechai.App.Countries.Item.Name.NameRequestBuilder Name
|
||||||
|
{
|
||||||
|
get => new global::Marechai.App.Countries.Item.Name.NameRequestBuilder(PathParameters, RequestAdapter);
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Instantiates a new <see cref="global::Marechai.App.Countries.Item.CountriesItemRequestBuilder"/> and sets the default values.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="pathParameters">Path parameters for the request</param>
|
||||||
|
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||||
|
public CountriesItemRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/countries/{id}", pathParameters)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Instantiates a new <see cref="global::Marechai.App.Countries.Item.CountriesItemRequestBuilder"/> and sets the default values.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||||
|
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||||
|
public CountriesItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/countries/{id}", rawUrl)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#pragma warning restore CS0618
|
||||||
@@ -0,0 +1,91 @@
|
|||||||
|
// <auto-generated/>
|
||||||
|
#pragma warning disable CS0618
|
||||||
|
using Marechai.App.Models;
|
||||||
|
using Microsoft.Kiota.Abstractions.Extensions;
|
||||||
|
using Microsoft.Kiota.Abstractions.Serialization;
|
||||||
|
using Microsoft.Kiota.Abstractions;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.IO;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Threading;
|
||||||
|
using System;
|
||||||
|
namespace Marechai.App.Countries.Item.Name
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Builds and executes requests for operations under \countries\{id}\name
|
||||||
|
/// </summary>
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class NameRequestBuilder : BaseRequestBuilder
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Instantiates a new <see cref="global::Marechai.App.Countries.Item.Name.NameRequestBuilder"/> and sets the default values.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="pathParameters">Path parameters for the request</param>
|
||||||
|
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||||
|
public NameRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/countries/{id}/name", pathParameters)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Instantiates a new <see cref="global::Marechai.App.Countries.Item.Name.NameRequestBuilder"/> and sets the default values.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||||
|
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||||
|
public NameRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/countries/{id}/name", rawUrl)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="string"/></returns>
|
||||||
|
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
|
||||||
|
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 400 status code</exception>
|
||||||
|
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||||
|
#nullable enable
|
||||||
|
public async Task<string?> GetAsync(Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public async Task<string> GetAsync(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
var requestInfo = ToGetRequestInformation(requestConfiguration);
|
||||||
|
var errorMapping = new Dictionary<string, ParsableFactory<IParsable>>
|
||||||
|
{
|
||||||
|
{ "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
};
|
||||||
|
return await RequestAdapter.SendPrimitiveAsync<string>(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false);
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="RequestInformation"/></returns>
|
||||||
|
/// <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<DefaultQueryParameters>>? requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters);
|
||||||
|
requestInfo.Configure(requestConfiguration);
|
||||||
|
requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9");
|
||||||
|
return requestInfo;
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>A <see cref="global::Marechai.App.Countries.Item.Name.NameRequestBuilder"/></returns>
|
||||||
|
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||||
|
public global::Marechai.App.Countries.Item.Name.NameRequestBuilder WithUrl(string rawUrl)
|
||||||
|
{
|
||||||
|
return new global::Marechai.App.Countries.Item.Name.NameRequestBuilder(rawUrl, RequestAdapter);
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Configuration for the request such as headers, query parameters, and middleware options.
|
||||||
|
/// </summary>
|
||||||
|
[Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")]
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class NameRequestBuilderGetRequestConfiguration : RequestConfiguration<DefaultQueryParameters>
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#pragma warning restore CS0618
|
||||||
@@ -0,0 +1,47 @@
|
|||||||
|
// <auto-generated/>
|
||||||
|
#pragma warning disable CS0618
|
||||||
|
using Marechai.App.Currencies.Inflation;
|
||||||
|
using Marechai.App.Currencies.Pegging;
|
||||||
|
using Microsoft.Kiota.Abstractions.Extensions;
|
||||||
|
using Microsoft.Kiota.Abstractions;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.IO;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System;
|
||||||
|
namespace Marechai.App.Currencies
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Builds and executes requests for operations under \currencies
|
||||||
|
/// </summary>
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class CurrenciesRequestBuilder : BaseRequestBuilder
|
||||||
|
{
|
||||||
|
/// <summary>The inflation property</summary>
|
||||||
|
public global::Marechai.App.Currencies.Inflation.InflationRequestBuilder Inflation
|
||||||
|
{
|
||||||
|
get => new global::Marechai.App.Currencies.Inflation.InflationRequestBuilder(PathParameters, RequestAdapter);
|
||||||
|
}
|
||||||
|
/// <summary>The pegging property</summary>
|
||||||
|
public global::Marechai.App.Currencies.Pegging.PeggingRequestBuilder Pegging
|
||||||
|
{
|
||||||
|
get => new global::Marechai.App.Currencies.Pegging.PeggingRequestBuilder(PathParameters, RequestAdapter);
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Instantiates a new <see cref="global::Marechai.App.Currencies.CurrenciesRequestBuilder"/> and sets the default values.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="pathParameters">Path parameters for the request</param>
|
||||||
|
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||||
|
public CurrenciesRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/currencies", pathParameters)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Instantiates a new <see cref="global::Marechai.App.Currencies.CurrenciesRequestBuilder"/> and sets the default values.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||||
|
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||||
|
public CurrenciesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/currencies", rawUrl)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#pragma warning restore CS0618
|
||||||
@@ -0,0 +1,169 @@
|
|||||||
|
// <auto-generated/>
|
||||||
|
#pragma warning disable CS0618
|
||||||
|
using Marechai.App.Currencies.Inflation.Item;
|
||||||
|
using Marechai.App.Models;
|
||||||
|
using Microsoft.Kiota.Abstractions.Extensions;
|
||||||
|
using Microsoft.Kiota.Abstractions.Serialization;
|
||||||
|
using Microsoft.Kiota.Abstractions;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.IO;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Threading;
|
||||||
|
using System;
|
||||||
|
namespace Marechai.App.Currencies.Inflation
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Builds and executes requests for operations under \currencies\inflation
|
||||||
|
/// </summary>
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class InflationRequestBuilder : BaseRequestBuilder
|
||||||
|
{
|
||||||
|
/// <summary>Gets an item from the Marechai.App.currencies.inflation.item collection</summary>
|
||||||
|
/// <param name="position">Unique identifier of the item</param>
|
||||||
|
/// <returns>A <see cref="global::Marechai.App.Currencies.Inflation.Item.InflationItemRequestBuilder"/></returns>
|
||||||
|
public global::Marechai.App.Currencies.Inflation.Item.InflationItemRequestBuilder this[int position]
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
var urlTplParams = new Dictionary<string, object>(PathParameters);
|
||||||
|
urlTplParams.Add("id", position);
|
||||||
|
return new global::Marechai.App.Currencies.Inflation.Item.InflationItemRequestBuilder(urlTplParams, RequestAdapter);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// <summary>Gets an item from the Marechai.App.currencies.inflation.item collection</summary>
|
||||||
|
/// <param name="position">Unique identifier of the item</param>
|
||||||
|
/// <returns>A <see cref="global::Marechai.App.Currencies.Inflation.Item.InflationItemRequestBuilder"/></returns>
|
||||||
|
[Obsolete("This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead.")]
|
||||||
|
public global::Marechai.App.Currencies.Inflation.Item.InflationItemRequestBuilder this[string position]
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
var urlTplParams = new Dictionary<string, object>(PathParameters);
|
||||||
|
if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("id", position);
|
||||||
|
return new global::Marechai.App.Currencies.Inflation.Item.InflationItemRequestBuilder(urlTplParams, RequestAdapter);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Instantiates a new <see cref="global::Marechai.App.Currencies.Inflation.InflationRequestBuilder"/> and sets the default values.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="pathParameters">Path parameters for the request</param>
|
||||||
|
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||||
|
public InflationRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/currencies/inflation", pathParameters)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Instantiates a new <see cref="global::Marechai.App.Currencies.Inflation.InflationRequestBuilder"/> and sets the default values.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||||
|
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||||
|
public InflationRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/currencies/inflation", rawUrl)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <returns>A List<global::Marechai.App.Models.CurrencyInflationDto></returns>
|
||||||
|
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
|
||||||
|
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 400 status code</exception>
|
||||||
|
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||||
|
#nullable enable
|
||||||
|
public async Task<List<global::Marechai.App.Models.CurrencyInflationDto>?> GetAsync(Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public async Task<List<global::Marechai.App.Models.CurrencyInflationDto>> GetAsync(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
var requestInfo = ToGetRequestInformation(requestConfiguration);
|
||||||
|
var errorMapping = new Dictionary<string, ParsableFactory<IParsable>>
|
||||||
|
{
|
||||||
|
{ "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
};
|
||||||
|
var collectionResult = await RequestAdapter.SendCollectionAsync<global::Marechai.App.Models.CurrencyInflationDto>(requestInfo, global::Marechai.App.Models.CurrencyInflationDto.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false);
|
||||||
|
return collectionResult?.AsList();
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="UntypedNode"/></returns>
|
||||||
|
/// <param name="body">The request body</param>
|
||||||
|
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
|
||||||
|
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 400 status code</exception>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 401 status code</exception>
|
||||||
|
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||||
|
#nullable enable
|
||||||
|
public async Task<UntypedNode?> PostAsync(global::Marechai.App.Models.CurrencyInflationDto body, Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public async Task<UntypedNode> PostAsync(global::Marechai.App.Models.CurrencyInflationDto body, Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body));
|
||||||
|
var requestInfo = ToPostRequestInformation(body, requestConfiguration);
|
||||||
|
var errorMapping = new Dictionary<string, ParsableFactory<IParsable>>
|
||||||
|
{
|
||||||
|
{ "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
{ "401", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
};
|
||||||
|
return await RequestAdapter.SendAsync<UntypedNode>(requestInfo, UntypedNode.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false);
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="RequestInformation"/></returns>
|
||||||
|
/// <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<DefaultQueryParameters>>? requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters);
|
||||||
|
requestInfo.Configure(requestConfiguration);
|
||||||
|
requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9");
|
||||||
|
return requestInfo;
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="RequestInformation"/></returns>
|
||||||
|
/// <param name="body">The request body</param>
|
||||||
|
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||||
|
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||||
|
#nullable enable
|
||||||
|
public RequestInformation ToPostRequestInformation(global::Marechai.App.Models.CurrencyInflationDto body, Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public RequestInformation ToPostRequestInformation(global::Marechai.App.Models.CurrencyInflationDto body, Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body));
|
||||||
|
var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters);
|
||||||
|
requestInfo.Configure(requestConfiguration);
|
||||||
|
requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9");
|
||||||
|
requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body);
|
||||||
|
return requestInfo;
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>A <see cref="global::Marechai.App.Currencies.Inflation.InflationRequestBuilder"/></returns>
|
||||||
|
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||||
|
public global::Marechai.App.Currencies.Inflation.InflationRequestBuilder WithUrl(string rawUrl)
|
||||||
|
{
|
||||||
|
return new global::Marechai.App.Currencies.Inflation.InflationRequestBuilder(rawUrl, RequestAdapter);
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Configuration for the request such as headers, query parameters, and middleware options.
|
||||||
|
/// </summary>
|
||||||
|
[Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")]
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class InflationRequestBuilderGetRequestConfiguration : RequestConfiguration<DefaultQueryParameters>
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Configuration for the request such as headers, query parameters, and middleware options.
|
||||||
|
/// </summary>
|
||||||
|
[Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")]
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class InflationRequestBuilderPostRequestConfiguration : RequestConfiguration<DefaultQueryParameters>
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#pragma warning restore CS0618
|
||||||
@@ -0,0 +1,192 @@
|
|||||||
|
// <auto-generated/>
|
||||||
|
#pragma warning disable CS0618
|
||||||
|
using Marechai.App.Models;
|
||||||
|
using Microsoft.Kiota.Abstractions.Extensions;
|
||||||
|
using Microsoft.Kiota.Abstractions.Serialization;
|
||||||
|
using Microsoft.Kiota.Abstractions;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.IO;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Threading;
|
||||||
|
using System;
|
||||||
|
namespace Marechai.App.Currencies.Inflation.Item
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Builds and executes requests for operations under \currencies\inflation\{id}
|
||||||
|
/// </summary>
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class InflationItemRequestBuilder : BaseRequestBuilder
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Instantiates a new <see cref="global::Marechai.App.Currencies.Inflation.Item.InflationItemRequestBuilder"/> and sets the default values.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="pathParameters">Path parameters for the request</param>
|
||||||
|
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||||
|
public InflationItemRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/currencies/inflation/{id}", pathParameters)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Instantiates a new <see cref="global::Marechai.App.Currencies.Inflation.Item.InflationItemRequestBuilder"/> and sets the default values.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||||
|
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||||
|
public InflationItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/currencies/inflation/{id}", rawUrl)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="string"/></returns>
|
||||||
|
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
|
||||||
|
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 400 status code</exception>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 401 status code</exception>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 404 status code</exception>
|
||||||
|
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||||
|
#nullable enable
|
||||||
|
public async Task<string?> DeleteAsync(Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public async Task<string> DeleteAsync(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
var requestInfo = ToDeleteRequestInformation(requestConfiguration);
|
||||||
|
var errorMapping = new Dictionary<string, ParsableFactory<IParsable>>
|
||||||
|
{
|
||||||
|
{ "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
{ "401", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
{ "404", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
};
|
||||||
|
return await RequestAdapter.SendPrimitiveAsync<string>(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false);
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="global::Marechai.App.Models.CurrencyInflationDto"/></returns>
|
||||||
|
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
|
||||||
|
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 400 status code</exception>
|
||||||
|
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||||
|
#nullable enable
|
||||||
|
public async Task<global::Marechai.App.Models.CurrencyInflationDto?> GetAsync(Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public async Task<global::Marechai.App.Models.CurrencyInflationDto> GetAsync(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
var requestInfo = ToGetRequestInformation(requestConfiguration);
|
||||||
|
var errorMapping = new Dictionary<string, ParsableFactory<IParsable>>
|
||||||
|
{
|
||||||
|
{ "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
};
|
||||||
|
return await RequestAdapter.SendAsync<global::Marechai.App.Models.CurrencyInflationDto>(requestInfo, global::Marechai.App.Models.CurrencyInflationDto.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false);
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="string"/></returns>
|
||||||
|
/// <param name="body">The request body</param>
|
||||||
|
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
|
||||||
|
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 400 status code</exception>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 401 status code</exception>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 404 status code</exception>
|
||||||
|
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||||
|
#nullable enable
|
||||||
|
public async Task<string?> PutAsync(global::Marechai.App.Models.CurrencyInflationDto body, Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public async Task<string> PutAsync(global::Marechai.App.Models.CurrencyInflationDto body, Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body));
|
||||||
|
var requestInfo = ToPutRequestInformation(body, requestConfiguration);
|
||||||
|
var errorMapping = new Dictionary<string, ParsableFactory<IParsable>>
|
||||||
|
{
|
||||||
|
{ "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
{ "401", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
{ "404", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
};
|
||||||
|
return await RequestAdapter.SendPrimitiveAsync<string>(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false);
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="RequestInformation"/></returns>
|
||||||
|
/// <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 ToDeleteRequestInformation(Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public RequestInformation ToDeleteRequestInformation(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters);
|
||||||
|
requestInfo.Configure(requestConfiguration);
|
||||||
|
requestInfo.Headers.TryAdd("Accept", "application/json, text/plain;q=0.9");
|
||||||
|
return requestInfo;
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="RequestInformation"/></returns>
|
||||||
|
/// <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<DefaultQueryParameters>>? requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters);
|
||||||
|
requestInfo.Configure(requestConfiguration);
|
||||||
|
requestInfo.Headers.TryAdd("Accept", "application/json, text/plain;q=0.9");
|
||||||
|
return requestInfo;
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="RequestInformation"/></returns>
|
||||||
|
/// <param name="body">The request body</param>
|
||||||
|
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||||
|
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||||
|
#nullable enable
|
||||||
|
public RequestInformation ToPutRequestInformation(global::Marechai.App.Models.CurrencyInflationDto body, Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public RequestInformation ToPutRequestInformation(global::Marechai.App.Models.CurrencyInflationDto body, Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body));
|
||||||
|
var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters);
|
||||||
|
requestInfo.Configure(requestConfiguration);
|
||||||
|
requestInfo.Headers.TryAdd("Accept", "application/json, text/plain;q=0.9");
|
||||||
|
requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body);
|
||||||
|
return requestInfo;
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>A <see cref="global::Marechai.App.Currencies.Inflation.Item.InflationItemRequestBuilder"/></returns>
|
||||||
|
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||||
|
public global::Marechai.App.Currencies.Inflation.Item.InflationItemRequestBuilder WithUrl(string rawUrl)
|
||||||
|
{
|
||||||
|
return new global::Marechai.App.Currencies.Inflation.Item.InflationItemRequestBuilder(rawUrl, RequestAdapter);
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Configuration for the request such as headers, query parameters, and middleware options.
|
||||||
|
/// </summary>
|
||||||
|
[Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")]
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class InflationItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration<DefaultQueryParameters>
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Configuration for the request such as headers, query parameters, and middleware options.
|
||||||
|
/// </summary>
|
||||||
|
[Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")]
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class InflationItemRequestBuilderGetRequestConfiguration : RequestConfiguration<DefaultQueryParameters>
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Configuration for the request such as headers, query parameters, and middleware options.
|
||||||
|
/// </summary>
|
||||||
|
[Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")]
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class InflationItemRequestBuilderPutRequestConfiguration : RequestConfiguration<DefaultQueryParameters>
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#pragma warning restore CS0618
|
||||||
@@ -0,0 +1,192 @@
|
|||||||
|
// <auto-generated/>
|
||||||
|
#pragma warning disable CS0618
|
||||||
|
using Marechai.App.Models;
|
||||||
|
using Microsoft.Kiota.Abstractions.Extensions;
|
||||||
|
using Microsoft.Kiota.Abstractions.Serialization;
|
||||||
|
using Microsoft.Kiota.Abstractions;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.IO;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Threading;
|
||||||
|
using System;
|
||||||
|
namespace Marechai.App.Currencies.Pegging.Item
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Builds and executes requests for operations under \currencies\pegging\{id}
|
||||||
|
/// </summary>
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class PeggingItemRequestBuilder : BaseRequestBuilder
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Instantiates a new <see cref="global::Marechai.App.Currencies.Pegging.Item.PeggingItemRequestBuilder"/> and sets the default values.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="pathParameters">Path parameters for the request</param>
|
||||||
|
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||||
|
public PeggingItemRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/currencies/pegging/{id}", pathParameters)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Instantiates a new <see cref="global::Marechai.App.Currencies.Pegging.Item.PeggingItemRequestBuilder"/> and sets the default values.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||||
|
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||||
|
public PeggingItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/currencies/pegging/{id}", rawUrl)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="string"/></returns>
|
||||||
|
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
|
||||||
|
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 400 status code</exception>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 401 status code</exception>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 404 status code</exception>
|
||||||
|
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||||
|
#nullable enable
|
||||||
|
public async Task<string?> DeleteAsync(Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public async Task<string> DeleteAsync(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
var requestInfo = ToDeleteRequestInformation(requestConfiguration);
|
||||||
|
var errorMapping = new Dictionary<string, ParsableFactory<IParsable>>
|
||||||
|
{
|
||||||
|
{ "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
{ "401", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
{ "404", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
};
|
||||||
|
return await RequestAdapter.SendPrimitiveAsync<string>(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false);
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="global::Marechai.App.Models.CurrencyPeggingDto"/></returns>
|
||||||
|
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
|
||||||
|
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 400 status code</exception>
|
||||||
|
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||||
|
#nullable enable
|
||||||
|
public async Task<global::Marechai.App.Models.CurrencyPeggingDto?> GetAsync(Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public async Task<global::Marechai.App.Models.CurrencyPeggingDto> GetAsync(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
var requestInfo = ToGetRequestInformation(requestConfiguration);
|
||||||
|
var errorMapping = new Dictionary<string, ParsableFactory<IParsable>>
|
||||||
|
{
|
||||||
|
{ "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
};
|
||||||
|
return await RequestAdapter.SendAsync<global::Marechai.App.Models.CurrencyPeggingDto>(requestInfo, global::Marechai.App.Models.CurrencyPeggingDto.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false);
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="string"/></returns>
|
||||||
|
/// <param name="body">The request body</param>
|
||||||
|
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
|
||||||
|
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 400 status code</exception>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 401 status code</exception>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 404 status code</exception>
|
||||||
|
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||||
|
#nullable enable
|
||||||
|
public async Task<string?> PutAsync(global::Marechai.App.Models.CurrencyPeggingDto body, Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public async Task<string> PutAsync(global::Marechai.App.Models.CurrencyPeggingDto body, Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body));
|
||||||
|
var requestInfo = ToPutRequestInformation(body, requestConfiguration);
|
||||||
|
var errorMapping = new Dictionary<string, ParsableFactory<IParsable>>
|
||||||
|
{
|
||||||
|
{ "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
{ "401", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
{ "404", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
};
|
||||||
|
return await RequestAdapter.SendPrimitiveAsync<string>(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false);
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="RequestInformation"/></returns>
|
||||||
|
/// <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 ToDeleteRequestInformation(Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public RequestInformation ToDeleteRequestInformation(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters);
|
||||||
|
requestInfo.Configure(requestConfiguration);
|
||||||
|
requestInfo.Headers.TryAdd("Accept", "application/json, text/plain;q=0.9");
|
||||||
|
return requestInfo;
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="RequestInformation"/></returns>
|
||||||
|
/// <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<DefaultQueryParameters>>? requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters);
|
||||||
|
requestInfo.Configure(requestConfiguration);
|
||||||
|
requestInfo.Headers.TryAdd("Accept", "application/json, text/plain;q=0.9");
|
||||||
|
return requestInfo;
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="RequestInformation"/></returns>
|
||||||
|
/// <param name="body">The request body</param>
|
||||||
|
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||||
|
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||||
|
#nullable enable
|
||||||
|
public RequestInformation ToPutRequestInformation(global::Marechai.App.Models.CurrencyPeggingDto body, Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public RequestInformation ToPutRequestInformation(global::Marechai.App.Models.CurrencyPeggingDto body, Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body));
|
||||||
|
var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters);
|
||||||
|
requestInfo.Configure(requestConfiguration);
|
||||||
|
requestInfo.Headers.TryAdd("Accept", "application/json, text/plain;q=0.9");
|
||||||
|
requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body);
|
||||||
|
return requestInfo;
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>A <see cref="global::Marechai.App.Currencies.Pegging.Item.PeggingItemRequestBuilder"/></returns>
|
||||||
|
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||||
|
public global::Marechai.App.Currencies.Pegging.Item.PeggingItemRequestBuilder WithUrl(string rawUrl)
|
||||||
|
{
|
||||||
|
return new global::Marechai.App.Currencies.Pegging.Item.PeggingItemRequestBuilder(rawUrl, RequestAdapter);
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Configuration for the request such as headers, query parameters, and middleware options.
|
||||||
|
/// </summary>
|
||||||
|
[Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")]
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class PeggingItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration<DefaultQueryParameters>
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Configuration for the request such as headers, query parameters, and middleware options.
|
||||||
|
/// </summary>
|
||||||
|
[Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")]
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class PeggingItemRequestBuilderGetRequestConfiguration : RequestConfiguration<DefaultQueryParameters>
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Configuration for the request such as headers, query parameters, and middleware options.
|
||||||
|
/// </summary>
|
||||||
|
[Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")]
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class PeggingItemRequestBuilderPutRequestConfiguration : RequestConfiguration<DefaultQueryParameters>
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#pragma warning restore CS0618
|
||||||
@@ -0,0 +1,169 @@
|
|||||||
|
// <auto-generated/>
|
||||||
|
#pragma warning disable CS0618
|
||||||
|
using Marechai.App.Currencies.Pegging.Item;
|
||||||
|
using Marechai.App.Models;
|
||||||
|
using Microsoft.Kiota.Abstractions.Extensions;
|
||||||
|
using Microsoft.Kiota.Abstractions.Serialization;
|
||||||
|
using Microsoft.Kiota.Abstractions;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.IO;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Threading;
|
||||||
|
using System;
|
||||||
|
namespace Marechai.App.Currencies.Pegging
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Builds and executes requests for operations under \currencies\pegging
|
||||||
|
/// </summary>
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class PeggingRequestBuilder : BaseRequestBuilder
|
||||||
|
{
|
||||||
|
/// <summary>Gets an item from the Marechai.App.currencies.pegging.item collection</summary>
|
||||||
|
/// <param name="position">Unique identifier of the item</param>
|
||||||
|
/// <returns>A <see cref="global::Marechai.App.Currencies.Pegging.Item.PeggingItemRequestBuilder"/></returns>
|
||||||
|
public global::Marechai.App.Currencies.Pegging.Item.PeggingItemRequestBuilder this[int position]
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
var urlTplParams = new Dictionary<string, object>(PathParameters);
|
||||||
|
urlTplParams.Add("id", position);
|
||||||
|
return new global::Marechai.App.Currencies.Pegging.Item.PeggingItemRequestBuilder(urlTplParams, RequestAdapter);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// <summary>Gets an item from the Marechai.App.currencies.pegging.item collection</summary>
|
||||||
|
/// <param name="position">Unique identifier of the item</param>
|
||||||
|
/// <returns>A <see cref="global::Marechai.App.Currencies.Pegging.Item.PeggingItemRequestBuilder"/></returns>
|
||||||
|
[Obsolete("This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead.")]
|
||||||
|
public global::Marechai.App.Currencies.Pegging.Item.PeggingItemRequestBuilder this[string position]
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
var urlTplParams = new Dictionary<string, object>(PathParameters);
|
||||||
|
if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("id", position);
|
||||||
|
return new global::Marechai.App.Currencies.Pegging.Item.PeggingItemRequestBuilder(urlTplParams, RequestAdapter);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Instantiates a new <see cref="global::Marechai.App.Currencies.Pegging.PeggingRequestBuilder"/> and sets the default values.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="pathParameters">Path parameters for the request</param>
|
||||||
|
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||||
|
public PeggingRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/currencies/pegging", pathParameters)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Instantiates a new <see cref="global::Marechai.App.Currencies.Pegging.PeggingRequestBuilder"/> and sets the default values.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||||
|
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||||
|
public PeggingRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/currencies/pegging", rawUrl)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <returns>A List<global::Marechai.App.Models.CurrencyPeggingDto></returns>
|
||||||
|
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
|
||||||
|
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 400 status code</exception>
|
||||||
|
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||||
|
#nullable enable
|
||||||
|
public async Task<List<global::Marechai.App.Models.CurrencyPeggingDto>?> GetAsync(Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public async Task<List<global::Marechai.App.Models.CurrencyPeggingDto>> GetAsync(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
var requestInfo = ToGetRequestInformation(requestConfiguration);
|
||||||
|
var errorMapping = new Dictionary<string, ParsableFactory<IParsable>>
|
||||||
|
{
|
||||||
|
{ "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
};
|
||||||
|
var collectionResult = await RequestAdapter.SendCollectionAsync<global::Marechai.App.Models.CurrencyPeggingDto>(requestInfo, global::Marechai.App.Models.CurrencyPeggingDto.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false);
|
||||||
|
return collectionResult?.AsList();
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="UntypedNode"/></returns>
|
||||||
|
/// <param name="body">The request body</param>
|
||||||
|
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
|
||||||
|
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 400 status code</exception>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 401 status code</exception>
|
||||||
|
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||||
|
#nullable enable
|
||||||
|
public async Task<UntypedNode?> PostAsync(global::Marechai.App.Models.CurrencyPeggingDto body, Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public async Task<UntypedNode> PostAsync(global::Marechai.App.Models.CurrencyPeggingDto body, Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body));
|
||||||
|
var requestInfo = ToPostRequestInformation(body, requestConfiguration);
|
||||||
|
var errorMapping = new Dictionary<string, ParsableFactory<IParsable>>
|
||||||
|
{
|
||||||
|
{ "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
{ "401", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
};
|
||||||
|
return await RequestAdapter.SendAsync<UntypedNode>(requestInfo, UntypedNode.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false);
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="RequestInformation"/></returns>
|
||||||
|
/// <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<DefaultQueryParameters>>? requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters);
|
||||||
|
requestInfo.Configure(requestConfiguration);
|
||||||
|
requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9");
|
||||||
|
return requestInfo;
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="RequestInformation"/></returns>
|
||||||
|
/// <param name="body">The request body</param>
|
||||||
|
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||||
|
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||||
|
#nullable enable
|
||||||
|
public RequestInformation ToPostRequestInformation(global::Marechai.App.Models.CurrencyPeggingDto body, Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public RequestInformation ToPostRequestInformation(global::Marechai.App.Models.CurrencyPeggingDto body, Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body));
|
||||||
|
var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters);
|
||||||
|
requestInfo.Configure(requestConfiguration);
|
||||||
|
requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9");
|
||||||
|
requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body);
|
||||||
|
return requestInfo;
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>A <see cref="global::Marechai.App.Currencies.Pegging.PeggingRequestBuilder"/></returns>
|
||||||
|
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||||
|
public global::Marechai.App.Currencies.Pegging.PeggingRequestBuilder WithUrl(string rawUrl)
|
||||||
|
{
|
||||||
|
return new global::Marechai.App.Currencies.Pegging.PeggingRequestBuilder(rawUrl, RequestAdapter);
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Configuration for the request such as headers, query parameters, and middleware options.
|
||||||
|
/// </summary>
|
||||||
|
[Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")]
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class PeggingRequestBuilderGetRequestConfiguration : RequestConfiguration<DefaultQueryParameters>
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Configuration for the request such as headers, query parameters, and middleware options.
|
||||||
|
/// </summary>
|
||||||
|
[Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")]
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class PeggingRequestBuilderPostRequestConfiguration : RequestConfiguration<DefaultQueryParameters>
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#pragma warning restore CS0618
|
||||||
@@ -0,0 +1,169 @@
|
|||||||
|
// <auto-generated/>
|
||||||
|
#pragma warning disable CS0618
|
||||||
|
using Marechai.App.Documents.Companies.Item;
|
||||||
|
using Marechai.App.Models;
|
||||||
|
using Microsoft.Kiota.Abstractions.Extensions;
|
||||||
|
using Microsoft.Kiota.Abstractions.Serialization;
|
||||||
|
using Microsoft.Kiota.Abstractions;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.IO;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Threading;
|
||||||
|
using System;
|
||||||
|
namespace Marechai.App.Documents.Companies
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Builds and executes requests for operations under \documents\companies
|
||||||
|
/// </summary>
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class CompaniesRequestBuilder : BaseRequestBuilder
|
||||||
|
{
|
||||||
|
/// <summary>Gets an item from the Marechai.App.documents.companies.item collection</summary>
|
||||||
|
/// <param name="position">Unique identifier of the item</param>
|
||||||
|
/// <returns>A <see cref="global::Marechai.App.Documents.Companies.Item.CompaniesItemRequestBuilder"/></returns>
|
||||||
|
public global::Marechai.App.Documents.Companies.Item.CompaniesItemRequestBuilder this[int position]
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
var urlTplParams = new Dictionary<string, object>(PathParameters);
|
||||||
|
urlTplParams.Add("id", position);
|
||||||
|
return new global::Marechai.App.Documents.Companies.Item.CompaniesItemRequestBuilder(urlTplParams, RequestAdapter);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// <summary>Gets an item from the Marechai.App.documents.companies.item collection</summary>
|
||||||
|
/// <param name="position">Unique identifier of the item</param>
|
||||||
|
/// <returns>A <see cref="global::Marechai.App.Documents.Companies.Item.CompaniesItemRequestBuilder"/></returns>
|
||||||
|
[Obsolete("This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead.")]
|
||||||
|
public global::Marechai.App.Documents.Companies.Item.CompaniesItemRequestBuilder this[string position]
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
var urlTplParams = new Dictionary<string, object>(PathParameters);
|
||||||
|
if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("id", position);
|
||||||
|
return new global::Marechai.App.Documents.Companies.Item.CompaniesItemRequestBuilder(urlTplParams, RequestAdapter);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Instantiates a new <see cref="global::Marechai.App.Documents.Companies.CompaniesRequestBuilder"/> and sets the default values.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="pathParameters">Path parameters for the request</param>
|
||||||
|
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||||
|
public CompaniesRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/documents/companies", pathParameters)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Instantiates a new <see cref="global::Marechai.App.Documents.Companies.CompaniesRequestBuilder"/> and sets the default values.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||||
|
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||||
|
public CompaniesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/documents/companies", rawUrl)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <returns>A List<global::Marechai.App.Models.DocumentCompanyDto></returns>
|
||||||
|
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
|
||||||
|
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 400 status code</exception>
|
||||||
|
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||||
|
#nullable enable
|
||||||
|
public async Task<List<global::Marechai.App.Models.DocumentCompanyDto>?> GetAsync(Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public async Task<List<global::Marechai.App.Models.DocumentCompanyDto>> GetAsync(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
var requestInfo = ToGetRequestInformation(requestConfiguration);
|
||||||
|
var errorMapping = new Dictionary<string, ParsableFactory<IParsable>>
|
||||||
|
{
|
||||||
|
{ "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
};
|
||||||
|
var collectionResult = await RequestAdapter.SendCollectionAsync<global::Marechai.App.Models.DocumentCompanyDto>(requestInfo, global::Marechai.App.Models.DocumentCompanyDto.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false);
|
||||||
|
return collectionResult?.AsList();
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="UntypedNode"/></returns>
|
||||||
|
/// <param name="body">The request body</param>
|
||||||
|
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
|
||||||
|
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 400 status code</exception>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 401 status code</exception>
|
||||||
|
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||||
|
#nullable enable
|
||||||
|
public async Task<UntypedNode?> PostAsync(global::Marechai.App.Models.DocumentCompanyDto body, Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public async Task<UntypedNode> PostAsync(global::Marechai.App.Models.DocumentCompanyDto body, Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body));
|
||||||
|
var requestInfo = ToPostRequestInformation(body, requestConfiguration);
|
||||||
|
var errorMapping = new Dictionary<string, ParsableFactory<IParsable>>
|
||||||
|
{
|
||||||
|
{ "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
{ "401", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
};
|
||||||
|
return await RequestAdapter.SendAsync<UntypedNode>(requestInfo, UntypedNode.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false);
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="RequestInformation"/></returns>
|
||||||
|
/// <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<DefaultQueryParameters>>? requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters);
|
||||||
|
requestInfo.Configure(requestConfiguration);
|
||||||
|
requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9");
|
||||||
|
return requestInfo;
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="RequestInformation"/></returns>
|
||||||
|
/// <param name="body">The request body</param>
|
||||||
|
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||||
|
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||||
|
#nullable enable
|
||||||
|
public RequestInformation ToPostRequestInformation(global::Marechai.App.Models.DocumentCompanyDto body, Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public RequestInformation ToPostRequestInformation(global::Marechai.App.Models.DocumentCompanyDto body, Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body));
|
||||||
|
var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters);
|
||||||
|
requestInfo.Configure(requestConfiguration);
|
||||||
|
requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9");
|
||||||
|
requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body);
|
||||||
|
return requestInfo;
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>A <see cref="global::Marechai.App.Documents.Companies.CompaniesRequestBuilder"/></returns>
|
||||||
|
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||||
|
public global::Marechai.App.Documents.Companies.CompaniesRequestBuilder WithUrl(string rawUrl)
|
||||||
|
{
|
||||||
|
return new global::Marechai.App.Documents.Companies.CompaniesRequestBuilder(rawUrl, RequestAdapter);
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Configuration for the request such as headers, query parameters, and middleware options.
|
||||||
|
/// </summary>
|
||||||
|
[Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")]
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class CompaniesRequestBuilderGetRequestConfiguration : RequestConfiguration<DefaultQueryParameters>
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Configuration for the request such as headers, query parameters, and middleware options.
|
||||||
|
/// </summary>
|
||||||
|
[Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")]
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class CompaniesRequestBuilderPostRequestConfiguration : RequestConfiguration<DefaultQueryParameters>
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#pragma warning restore CS0618
|
||||||
@@ -0,0 +1,192 @@
|
|||||||
|
// <auto-generated/>
|
||||||
|
#pragma warning disable CS0618
|
||||||
|
using Marechai.App.Models;
|
||||||
|
using Microsoft.Kiota.Abstractions.Extensions;
|
||||||
|
using Microsoft.Kiota.Abstractions.Serialization;
|
||||||
|
using Microsoft.Kiota.Abstractions;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.IO;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Threading;
|
||||||
|
using System;
|
||||||
|
namespace Marechai.App.Documents.Companies.Item
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Builds and executes requests for operations under \documents\companies\{id}
|
||||||
|
/// </summary>
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class CompaniesItemRequestBuilder : BaseRequestBuilder
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Instantiates a new <see cref="global::Marechai.App.Documents.Companies.Item.CompaniesItemRequestBuilder"/> and sets the default values.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="pathParameters">Path parameters for the request</param>
|
||||||
|
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||||
|
public CompaniesItemRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/documents/companies/{id}", pathParameters)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Instantiates a new <see cref="global::Marechai.App.Documents.Companies.Item.CompaniesItemRequestBuilder"/> and sets the default values.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||||
|
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||||
|
public CompaniesItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/documents/companies/{id}", rawUrl)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="string"/></returns>
|
||||||
|
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
|
||||||
|
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 400 status code</exception>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 401 status code</exception>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 404 status code</exception>
|
||||||
|
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||||
|
#nullable enable
|
||||||
|
public async Task<string?> DeleteAsync(Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public async Task<string> DeleteAsync(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
var requestInfo = ToDeleteRequestInformation(requestConfiguration);
|
||||||
|
var errorMapping = new Dictionary<string, ParsableFactory<IParsable>>
|
||||||
|
{
|
||||||
|
{ "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
{ "401", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
{ "404", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
};
|
||||||
|
return await RequestAdapter.SendPrimitiveAsync<string>(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false);
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="global::Marechai.App.Models.DocumentCompanyDto"/></returns>
|
||||||
|
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
|
||||||
|
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 400 status code</exception>
|
||||||
|
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||||
|
#nullable enable
|
||||||
|
public async Task<global::Marechai.App.Models.DocumentCompanyDto?> GetAsync(Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public async Task<global::Marechai.App.Models.DocumentCompanyDto> GetAsync(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
var requestInfo = ToGetRequestInformation(requestConfiguration);
|
||||||
|
var errorMapping = new Dictionary<string, ParsableFactory<IParsable>>
|
||||||
|
{
|
||||||
|
{ "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
};
|
||||||
|
return await RequestAdapter.SendAsync<global::Marechai.App.Models.DocumentCompanyDto>(requestInfo, global::Marechai.App.Models.DocumentCompanyDto.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false);
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="string"/></returns>
|
||||||
|
/// <param name="body">The request body</param>
|
||||||
|
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
|
||||||
|
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 400 status code</exception>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 401 status code</exception>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 404 status code</exception>
|
||||||
|
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||||
|
#nullable enable
|
||||||
|
public async Task<string?> PutAsync(global::Marechai.App.Models.DocumentCompanyDto body, Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public async Task<string> PutAsync(global::Marechai.App.Models.DocumentCompanyDto body, Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body));
|
||||||
|
var requestInfo = ToPutRequestInformation(body, requestConfiguration);
|
||||||
|
var errorMapping = new Dictionary<string, ParsableFactory<IParsable>>
|
||||||
|
{
|
||||||
|
{ "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
{ "401", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
{ "404", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
};
|
||||||
|
return await RequestAdapter.SendPrimitiveAsync<string>(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false);
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="RequestInformation"/></returns>
|
||||||
|
/// <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 ToDeleteRequestInformation(Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public RequestInformation ToDeleteRequestInformation(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters);
|
||||||
|
requestInfo.Configure(requestConfiguration);
|
||||||
|
requestInfo.Headers.TryAdd("Accept", "application/json, text/plain;q=0.9");
|
||||||
|
return requestInfo;
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="RequestInformation"/></returns>
|
||||||
|
/// <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<DefaultQueryParameters>>? requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters);
|
||||||
|
requestInfo.Configure(requestConfiguration);
|
||||||
|
requestInfo.Headers.TryAdd("Accept", "application/json, text/plain;q=0.9");
|
||||||
|
return requestInfo;
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="RequestInformation"/></returns>
|
||||||
|
/// <param name="body">The request body</param>
|
||||||
|
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||||
|
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||||
|
#nullable enable
|
||||||
|
public RequestInformation ToPutRequestInformation(global::Marechai.App.Models.DocumentCompanyDto body, Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public RequestInformation ToPutRequestInformation(global::Marechai.App.Models.DocumentCompanyDto body, Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body));
|
||||||
|
var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters);
|
||||||
|
requestInfo.Configure(requestConfiguration);
|
||||||
|
requestInfo.Headers.TryAdd("Accept", "application/json, text/plain;q=0.9");
|
||||||
|
requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body);
|
||||||
|
return requestInfo;
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>A <see cref="global::Marechai.App.Documents.Companies.Item.CompaniesItemRequestBuilder"/></returns>
|
||||||
|
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||||
|
public global::Marechai.App.Documents.Companies.Item.CompaniesItemRequestBuilder WithUrl(string rawUrl)
|
||||||
|
{
|
||||||
|
return new global::Marechai.App.Documents.Companies.Item.CompaniesItemRequestBuilder(rawUrl, RequestAdapter);
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Configuration for the request such as headers, query parameters, and middleware options.
|
||||||
|
/// </summary>
|
||||||
|
[Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")]
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class CompaniesItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration<DefaultQueryParameters>
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Configuration for the request such as headers, query parameters, and middleware options.
|
||||||
|
/// </summary>
|
||||||
|
[Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")]
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class CompaniesItemRequestBuilderGetRequestConfiguration : RequestConfiguration<DefaultQueryParameters>
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Configuration for the request such as headers, query parameters, and middleware options.
|
||||||
|
/// </summary>
|
||||||
|
[Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")]
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class CompaniesItemRequestBuilderPutRequestConfiguration : RequestConfiguration<DefaultQueryParameters>
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#pragma warning restore CS0618
|
||||||
@@ -0,0 +1,193 @@
|
|||||||
|
// <auto-generated/>
|
||||||
|
#pragma warning disable CS0618
|
||||||
|
using Marechai.App.Documents.Companies;
|
||||||
|
using Marechai.App.Documents.Item;
|
||||||
|
using Marechai.App.Documents.People;
|
||||||
|
using Marechai.App.Documents.Roles;
|
||||||
|
using Marechai.App.Documents.Scans;
|
||||||
|
using Marechai.App.Models;
|
||||||
|
using Microsoft.Kiota.Abstractions.Extensions;
|
||||||
|
using Microsoft.Kiota.Abstractions.Serialization;
|
||||||
|
using Microsoft.Kiota.Abstractions;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.IO;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Threading;
|
||||||
|
using System;
|
||||||
|
namespace Marechai.App.Documents
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Builds and executes requests for operations under \documents
|
||||||
|
/// </summary>
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class DocumentsRequestBuilder : BaseRequestBuilder
|
||||||
|
{
|
||||||
|
/// <summary>The companies property</summary>
|
||||||
|
public global::Marechai.App.Documents.Companies.CompaniesRequestBuilder Companies
|
||||||
|
{
|
||||||
|
get => new global::Marechai.App.Documents.Companies.CompaniesRequestBuilder(PathParameters, RequestAdapter);
|
||||||
|
}
|
||||||
|
/// <summary>The people property</summary>
|
||||||
|
public global::Marechai.App.Documents.People.PeopleRequestBuilder People
|
||||||
|
{
|
||||||
|
get => new global::Marechai.App.Documents.People.PeopleRequestBuilder(PathParameters, RequestAdapter);
|
||||||
|
}
|
||||||
|
/// <summary>The roles property</summary>
|
||||||
|
public global::Marechai.App.Documents.Roles.RolesRequestBuilder Roles
|
||||||
|
{
|
||||||
|
get => new global::Marechai.App.Documents.Roles.RolesRequestBuilder(PathParameters, RequestAdapter);
|
||||||
|
}
|
||||||
|
/// <summary>The scans property</summary>
|
||||||
|
public global::Marechai.App.Documents.Scans.ScansRequestBuilder Scans
|
||||||
|
{
|
||||||
|
get => new global::Marechai.App.Documents.Scans.ScansRequestBuilder(PathParameters, RequestAdapter);
|
||||||
|
}
|
||||||
|
/// <summary>Gets an item from the Marechai.App.documents.item collection</summary>
|
||||||
|
/// <param name="position">Unique identifier of the item</param>
|
||||||
|
/// <returns>A <see cref="global::Marechai.App.Documents.Item.DocumentItemRequestBuilder"/></returns>
|
||||||
|
public global::Marechai.App.Documents.Item.DocumentItemRequestBuilder this[long position]
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
var urlTplParams = new Dictionary<string, object>(PathParameters);
|
||||||
|
urlTplParams.Add("document%2Did", position);
|
||||||
|
return new global::Marechai.App.Documents.Item.DocumentItemRequestBuilder(urlTplParams, RequestAdapter);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// <summary>Gets an item from the Marechai.App.documents.item collection</summary>
|
||||||
|
/// <param name="position">Unique identifier of the item</param>
|
||||||
|
/// <returns>A <see cref="global::Marechai.App.Documents.Item.DocumentItemRequestBuilder"/></returns>
|
||||||
|
[Obsolete("This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead.")]
|
||||||
|
public global::Marechai.App.Documents.Item.DocumentItemRequestBuilder this[string position]
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
var urlTplParams = new Dictionary<string, object>(PathParameters);
|
||||||
|
if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("document%2Did", position);
|
||||||
|
return new global::Marechai.App.Documents.Item.DocumentItemRequestBuilder(urlTplParams, RequestAdapter);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Instantiates a new <see cref="global::Marechai.App.Documents.DocumentsRequestBuilder"/> and sets the default values.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="pathParameters">Path parameters for the request</param>
|
||||||
|
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||||
|
public DocumentsRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/documents", pathParameters)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Instantiates a new <see cref="global::Marechai.App.Documents.DocumentsRequestBuilder"/> and sets the default values.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||||
|
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||||
|
public DocumentsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/documents", rawUrl)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <returns>A List<global::Marechai.App.Models.DocumentDto></returns>
|
||||||
|
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
|
||||||
|
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 400 status code</exception>
|
||||||
|
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||||
|
#nullable enable
|
||||||
|
public async Task<List<global::Marechai.App.Models.DocumentDto>?> GetAsync(Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public async Task<List<global::Marechai.App.Models.DocumentDto>> GetAsync(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
var requestInfo = ToGetRequestInformation(requestConfiguration);
|
||||||
|
var errorMapping = new Dictionary<string, ParsableFactory<IParsable>>
|
||||||
|
{
|
||||||
|
{ "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
};
|
||||||
|
var collectionResult = await RequestAdapter.SendCollectionAsync<global::Marechai.App.Models.DocumentDto>(requestInfo, global::Marechai.App.Models.DocumentDto.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false);
|
||||||
|
return collectionResult?.AsList();
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="UntypedNode"/></returns>
|
||||||
|
/// <param name="body">The request body</param>
|
||||||
|
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
|
||||||
|
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 400 status code</exception>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 401 status code</exception>
|
||||||
|
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||||
|
#nullable enable
|
||||||
|
public async Task<UntypedNode?> PostAsync(global::Marechai.App.Models.DocumentDto body, Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public async Task<UntypedNode> PostAsync(global::Marechai.App.Models.DocumentDto body, Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body));
|
||||||
|
var requestInfo = ToPostRequestInformation(body, requestConfiguration);
|
||||||
|
var errorMapping = new Dictionary<string, ParsableFactory<IParsable>>
|
||||||
|
{
|
||||||
|
{ "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
{ "401", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
};
|
||||||
|
return await RequestAdapter.SendAsync<UntypedNode>(requestInfo, UntypedNode.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false);
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="RequestInformation"/></returns>
|
||||||
|
/// <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<DefaultQueryParameters>>? requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters);
|
||||||
|
requestInfo.Configure(requestConfiguration);
|
||||||
|
requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9");
|
||||||
|
return requestInfo;
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="RequestInformation"/></returns>
|
||||||
|
/// <param name="body">The request body</param>
|
||||||
|
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||||
|
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||||
|
#nullable enable
|
||||||
|
public RequestInformation ToPostRequestInformation(global::Marechai.App.Models.DocumentDto body, Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public RequestInformation ToPostRequestInformation(global::Marechai.App.Models.DocumentDto body, Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body));
|
||||||
|
var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters);
|
||||||
|
requestInfo.Configure(requestConfiguration);
|
||||||
|
requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9");
|
||||||
|
requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body);
|
||||||
|
return requestInfo;
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>A <see cref="global::Marechai.App.Documents.DocumentsRequestBuilder"/></returns>
|
||||||
|
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||||
|
public global::Marechai.App.Documents.DocumentsRequestBuilder WithUrl(string rawUrl)
|
||||||
|
{
|
||||||
|
return new global::Marechai.App.Documents.DocumentsRequestBuilder(rawUrl, RequestAdapter);
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Configuration for the request such as headers, query parameters, and middleware options.
|
||||||
|
/// </summary>
|
||||||
|
[Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")]
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class DocumentsRequestBuilderGetRequestConfiguration : RequestConfiguration<DefaultQueryParameters>
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Configuration for the request such as headers, query parameters, and middleware options.
|
||||||
|
/// </summary>
|
||||||
|
[Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")]
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class DocumentsRequestBuilderPostRequestConfiguration : RequestConfiguration<DefaultQueryParameters>
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#pragma warning restore CS0618
|
||||||
@@ -0,0 +1,92 @@
|
|||||||
|
// <auto-generated/>
|
||||||
|
#pragma warning disable CS0618
|
||||||
|
using Marechai.App.Models;
|
||||||
|
using Microsoft.Kiota.Abstractions.Extensions;
|
||||||
|
using Microsoft.Kiota.Abstractions.Serialization;
|
||||||
|
using Microsoft.Kiota.Abstractions;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.IO;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Threading;
|
||||||
|
using System;
|
||||||
|
namespace Marechai.App.Documents.Item.Companies
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Builds and executes requests for operations under \documents\{document-id}\companies
|
||||||
|
/// </summary>
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class CompaniesRequestBuilder : BaseRequestBuilder
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Instantiates a new <see cref="global::Marechai.App.Documents.Item.Companies.CompaniesRequestBuilder"/> and sets the default values.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="pathParameters">Path parameters for the request</param>
|
||||||
|
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||||
|
public CompaniesRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/documents/{document%2Did}/companies", pathParameters)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Instantiates a new <see cref="global::Marechai.App.Documents.Item.Companies.CompaniesRequestBuilder"/> and sets the default values.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||||
|
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||||
|
public CompaniesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/documents/{document%2Did}/companies", rawUrl)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <returns>A List<global::Marechai.App.Models.CompanyByDocumentDto></returns>
|
||||||
|
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
|
||||||
|
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 400 status code</exception>
|
||||||
|
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||||
|
#nullable enable
|
||||||
|
public async Task<List<global::Marechai.App.Models.CompanyByDocumentDto>?> GetAsync(Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public async Task<List<global::Marechai.App.Models.CompanyByDocumentDto>> GetAsync(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
var requestInfo = ToGetRequestInformation(requestConfiguration);
|
||||||
|
var errorMapping = new Dictionary<string, ParsableFactory<IParsable>>
|
||||||
|
{
|
||||||
|
{ "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
};
|
||||||
|
var collectionResult = await RequestAdapter.SendCollectionAsync<global::Marechai.App.Models.CompanyByDocumentDto>(requestInfo, global::Marechai.App.Models.CompanyByDocumentDto.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false);
|
||||||
|
return collectionResult?.AsList();
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="RequestInformation"/></returns>
|
||||||
|
/// <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<DefaultQueryParameters>>? requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters);
|
||||||
|
requestInfo.Configure(requestConfiguration);
|
||||||
|
requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9");
|
||||||
|
return requestInfo;
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>A <see cref="global::Marechai.App.Documents.Item.Companies.CompaniesRequestBuilder"/></returns>
|
||||||
|
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||||
|
public global::Marechai.App.Documents.Item.Companies.CompaniesRequestBuilder WithUrl(string rawUrl)
|
||||||
|
{
|
||||||
|
return new global::Marechai.App.Documents.Item.Companies.CompaniesRequestBuilder(rawUrl, RequestAdapter);
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Configuration for the request such as headers, query parameters, and middleware options.
|
||||||
|
/// </summary>
|
||||||
|
[Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")]
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class CompaniesRequestBuilderGetRequestConfiguration : RequestConfiguration<DefaultQueryParameters>
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#pragma warning restore CS0618
|
||||||
@@ -0,0 +1,228 @@
|
|||||||
|
// <auto-generated/>
|
||||||
|
#pragma warning disable CS0618
|
||||||
|
using Marechai.App.Documents.Item.Companies;
|
||||||
|
using Marechai.App.Documents.Item.MachineFamilies;
|
||||||
|
using Marechai.App.Documents.Item.Machines;
|
||||||
|
using Marechai.App.Documents.Item.People;
|
||||||
|
using Marechai.App.Documents.Item.Scans;
|
||||||
|
using Marechai.App.Documents.Item.Synopsis;
|
||||||
|
using Marechai.App.Models;
|
||||||
|
using Microsoft.Kiota.Abstractions.Extensions;
|
||||||
|
using Microsoft.Kiota.Abstractions.Serialization;
|
||||||
|
using Microsoft.Kiota.Abstractions;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.IO;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Threading;
|
||||||
|
using System;
|
||||||
|
namespace Marechai.App.Documents.Item
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Builds and executes requests for operations under \documents\{document-id}
|
||||||
|
/// </summary>
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class DocumentItemRequestBuilder : BaseRequestBuilder
|
||||||
|
{
|
||||||
|
/// <summary>The companies property</summary>
|
||||||
|
public global::Marechai.App.Documents.Item.Companies.CompaniesRequestBuilder Companies
|
||||||
|
{
|
||||||
|
get => new global::Marechai.App.Documents.Item.Companies.CompaniesRequestBuilder(PathParameters, RequestAdapter);
|
||||||
|
}
|
||||||
|
/// <summary>The machineFamilies property</summary>
|
||||||
|
public global::Marechai.App.Documents.Item.MachineFamilies.MachineFamiliesRequestBuilder MachineFamilies
|
||||||
|
{
|
||||||
|
get => new global::Marechai.App.Documents.Item.MachineFamilies.MachineFamiliesRequestBuilder(PathParameters, RequestAdapter);
|
||||||
|
}
|
||||||
|
/// <summary>The machines property</summary>
|
||||||
|
public global::Marechai.App.Documents.Item.Machines.MachinesRequestBuilder Machines
|
||||||
|
{
|
||||||
|
get => new global::Marechai.App.Documents.Item.Machines.MachinesRequestBuilder(PathParameters, RequestAdapter);
|
||||||
|
}
|
||||||
|
/// <summary>The people property</summary>
|
||||||
|
public global::Marechai.App.Documents.Item.People.PeopleRequestBuilder People
|
||||||
|
{
|
||||||
|
get => new global::Marechai.App.Documents.Item.People.PeopleRequestBuilder(PathParameters, RequestAdapter);
|
||||||
|
}
|
||||||
|
/// <summary>The scans property</summary>
|
||||||
|
public global::Marechai.App.Documents.Item.Scans.ScansRequestBuilder Scans
|
||||||
|
{
|
||||||
|
get => new global::Marechai.App.Documents.Item.Scans.ScansRequestBuilder(PathParameters, RequestAdapter);
|
||||||
|
}
|
||||||
|
/// <summary>The synopsis property</summary>
|
||||||
|
public global::Marechai.App.Documents.Item.Synopsis.SynopsisRequestBuilder Synopsis
|
||||||
|
{
|
||||||
|
get => new global::Marechai.App.Documents.Item.Synopsis.SynopsisRequestBuilder(PathParameters, RequestAdapter);
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Instantiates a new <see cref="global::Marechai.App.Documents.Item.DocumentItemRequestBuilder"/> and sets the default values.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="pathParameters">Path parameters for the request</param>
|
||||||
|
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||||
|
public DocumentItemRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/documents/{document%2Did}", pathParameters)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Instantiates a new <see cref="global::Marechai.App.Documents.Item.DocumentItemRequestBuilder"/> and sets the default values.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||||
|
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||||
|
public DocumentItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/documents/{document%2Did}", rawUrl)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="string"/></returns>
|
||||||
|
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
|
||||||
|
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 400 status code</exception>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 401 status code</exception>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 404 status code</exception>
|
||||||
|
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||||
|
#nullable enable
|
||||||
|
public async Task<string?> DeleteAsync(Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public async Task<string> DeleteAsync(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
var requestInfo = ToDeleteRequestInformation(requestConfiguration);
|
||||||
|
var errorMapping = new Dictionary<string, ParsableFactory<IParsable>>
|
||||||
|
{
|
||||||
|
{ "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
{ "401", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
{ "404", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
};
|
||||||
|
return await RequestAdapter.SendPrimitiveAsync<string>(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false);
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="global::Marechai.App.Models.DocumentDto"/></returns>
|
||||||
|
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
|
||||||
|
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 400 status code</exception>
|
||||||
|
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||||
|
#nullable enable
|
||||||
|
public async Task<global::Marechai.App.Models.DocumentDto?> GetAsync(Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public async Task<global::Marechai.App.Models.DocumentDto> GetAsync(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
var requestInfo = ToGetRequestInformation(requestConfiguration);
|
||||||
|
var errorMapping = new Dictionary<string, ParsableFactory<IParsable>>
|
||||||
|
{
|
||||||
|
{ "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
};
|
||||||
|
return await RequestAdapter.SendAsync<global::Marechai.App.Models.DocumentDto>(requestInfo, global::Marechai.App.Models.DocumentDto.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false);
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="string"/></returns>
|
||||||
|
/// <param name="body">The request body</param>
|
||||||
|
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
|
||||||
|
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 400 status code</exception>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 401 status code</exception>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 404 status code</exception>
|
||||||
|
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||||
|
#nullable enable
|
||||||
|
public async Task<string?> PutAsync(global::Marechai.App.Models.DocumentDto body, Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public async Task<string> PutAsync(global::Marechai.App.Models.DocumentDto body, Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body));
|
||||||
|
var requestInfo = ToPutRequestInformation(body, requestConfiguration);
|
||||||
|
var errorMapping = new Dictionary<string, ParsableFactory<IParsable>>
|
||||||
|
{
|
||||||
|
{ "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
{ "401", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
{ "404", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
};
|
||||||
|
return await RequestAdapter.SendPrimitiveAsync<string>(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false);
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="RequestInformation"/></returns>
|
||||||
|
/// <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 ToDeleteRequestInformation(Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public RequestInformation ToDeleteRequestInformation(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters);
|
||||||
|
requestInfo.Configure(requestConfiguration);
|
||||||
|
requestInfo.Headers.TryAdd("Accept", "application/json, text/plain;q=0.9");
|
||||||
|
return requestInfo;
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="RequestInformation"/></returns>
|
||||||
|
/// <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<DefaultQueryParameters>>? requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters);
|
||||||
|
requestInfo.Configure(requestConfiguration);
|
||||||
|
requestInfo.Headers.TryAdd("Accept", "application/json, text/plain;q=0.9");
|
||||||
|
return requestInfo;
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="RequestInformation"/></returns>
|
||||||
|
/// <param name="body">The request body</param>
|
||||||
|
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||||
|
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||||
|
#nullable enable
|
||||||
|
public RequestInformation ToPutRequestInformation(global::Marechai.App.Models.DocumentDto body, Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public RequestInformation ToPutRequestInformation(global::Marechai.App.Models.DocumentDto body, Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body));
|
||||||
|
var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters);
|
||||||
|
requestInfo.Configure(requestConfiguration);
|
||||||
|
requestInfo.Headers.TryAdd("Accept", "application/json, text/plain;q=0.9");
|
||||||
|
requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body);
|
||||||
|
return requestInfo;
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>A <see cref="global::Marechai.App.Documents.Item.DocumentItemRequestBuilder"/></returns>
|
||||||
|
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||||
|
public global::Marechai.App.Documents.Item.DocumentItemRequestBuilder WithUrl(string rawUrl)
|
||||||
|
{
|
||||||
|
return new global::Marechai.App.Documents.Item.DocumentItemRequestBuilder(rawUrl, RequestAdapter);
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Configuration for the request such as headers, query parameters, and middleware options.
|
||||||
|
/// </summary>
|
||||||
|
[Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")]
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class DocumentItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration<DefaultQueryParameters>
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Configuration for the request such as headers, query parameters, and middleware options.
|
||||||
|
/// </summary>
|
||||||
|
[Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")]
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class DocumentItemRequestBuilderGetRequestConfiguration : RequestConfiguration<DefaultQueryParameters>
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Configuration for the request such as headers, query parameters, and middleware options.
|
||||||
|
/// </summary>
|
||||||
|
[Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")]
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class DocumentItemRequestBuilderPutRequestConfiguration : RequestConfiguration<DefaultQueryParameters>
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#pragma warning restore CS0618
|
||||||
@@ -0,0 +1,92 @@
|
|||||||
|
// <auto-generated/>
|
||||||
|
#pragma warning disable CS0618
|
||||||
|
using Marechai.App.Models;
|
||||||
|
using Microsoft.Kiota.Abstractions.Extensions;
|
||||||
|
using Microsoft.Kiota.Abstractions.Serialization;
|
||||||
|
using Microsoft.Kiota.Abstractions;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.IO;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Threading;
|
||||||
|
using System;
|
||||||
|
namespace Marechai.App.Documents.Item.MachineFamilies
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Builds and executes requests for operations under \documents\{document-id}\machine-families
|
||||||
|
/// </summary>
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class MachineFamiliesRequestBuilder : BaseRequestBuilder
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Instantiates a new <see cref="global::Marechai.App.Documents.Item.MachineFamilies.MachineFamiliesRequestBuilder"/> and sets the default values.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="pathParameters">Path parameters for the request</param>
|
||||||
|
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||||
|
public MachineFamiliesRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/documents/{document%2Did}/machine-families", pathParameters)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Instantiates a new <see cref="global::Marechai.App.Documents.Item.MachineFamilies.MachineFamiliesRequestBuilder"/> and sets the default values.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||||
|
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||||
|
public MachineFamiliesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/documents/{document%2Did}/machine-families", rawUrl)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <returns>A List<global::Marechai.App.Models.DocumentByMachineFamilyDto></returns>
|
||||||
|
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
|
||||||
|
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 400 status code</exception>
|
||||||
|
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||||
|
#nullable enable
|
||||||
|
public async Task<List<global::Marechai.App.Models.DocumentByMachineFamilyDto>?> GetAsync(Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public async Task<List<global::Marechai.App.Models.DocumentByMachineFamilyDto>> GetAsync(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
var requestInfo = ToGetRequestInformation(requestConfiguration);
|
||||||
|
var errorMapping = new Dictionary<string, ParsableFactory<IParsable>>
|
||||||
|
{
|
||||||
|
{ "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
};
|
||||||
|
var collectionResult = await RequestAdapter.SendCollectionAsync<global::Marechai.App.Models.DocumentByMachineFamilyDto>(requestInfo, global::Marechai.App.Models.DocumentByMachineFamilyDto.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false);
|
||||||
|
return collectionResult?.AsList();
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="RequestInformation"/></returns>
|
||||||
|
/// <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<DefaultQueryParameters>>? requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters);
|
||||||
|
requestInfo.Configure(requestConfiguration);
|
||||||
|
requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9");
|
||||||
|
return requestInfo;
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>A <see cref="global::Marechai.App.Documents.Item.MachineFamilies.MachineFamiliesRequestBuilder"/></returns>
|
||||||
|
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||||
|
public global::Marechai.App.Documents.Item.MachineFamilies.MachineFamiliesRequestBuilder WithUrl(string rawUrl)
|
||||||
|
{
|
||||||
|
return new global::Marechai.App.Documents.Item.MachineFamilies.MachineFamiliesRequestBuilder(rawUrl, RequestAdapter);
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Configuration for the request such as headers, query parameters, and middleware options.
|
||||||
|
/// </summary>
|
||||||
|
[Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")]
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class MachineFamiliesRequestBuilderGetRequestConfiguration : RequestConfiguration<DefaultQueryParameters>
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#pragma warning restore CS0618
|
||||||
@@ -0,0 +1,92 @@
|
|||||||
|
// <auto-generated/>
|
||||||
|
#pragma warning disable CS0618
|
||||||
|
using Marechai.App.Models;
|
||||||
|
using Microsoft.Kiota.Abstractions.Extensions;
|
||||||
|
using Microsoft.Kiota.Abstractions.Serialization;
|
||||||
|
using Microsoft.Kiota.Abstractions;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.IO;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Threading;
|
||||||
|
using System;
|
||||||
|
namespace Marechai.App.Documents.Item.Machines
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Builds and executes requests for operations under \documents\{document-id}\machines
|
||||||
|
/// </summary>
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class MachinesRequestBuilder : BaseRequestBuilder
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Instantiates a new <see cref="global::Marechai.App.Documents.Item.Machines.MachinesRequestBuilder"/> and sets the default values.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="pathParameters">Path parameters for the request</param>
|
||||||
|
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||||
|
public MachinesRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/documents/{document%2Did}/machines", pathParameters)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Instantiates a new <see cref="global::Marechai.App.Documents.Item.Machines.MachinesRequestBuilder"/> and sets the default values.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||||
|
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||||
|
public MachinesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/documents/{document%2Did}/machines", rawUrl)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <returns>A List<global::Marechai.App.Models.DocumentByMachineDto></returns>
|
||||||
|
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
|
||||||
|
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 400 status code</exception>
|
||||||
|
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||||
|
#nullable enable
|
||||||
|
public async Task<List<global::Marechai.App.Models.DocumentByMachineDto>?> GetAsync(Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public async Task<List<global::Marechai.App.Models.DocumentByMachineDto>> GetAsync(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
var requestInfo = ToGetRequestInformation(requestConfiguration);
|
||||||
|
var errorMapping = new Dictionary<string, ParsableFactory<IParsable>>
|
||||||
|
{
|
||||||
|
{ "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
};
|
||||||
|
var collectionResult = await RequestAdapter.SendCollectionAsync<global::Marechai.App.Models.DocumentByMachineDto>(requestInfo, global::Marechai.App.Models.DocumentByMachineDto.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false);
|
||||||
|
return collectionResult?.AsList();
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="RequestInformation"/></returns>
|
||||||
|
/// <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<DefaultQueryParameters>>? requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters);
|
||||||
|
requestInfo.Configure(requestConfiguration);
|
||||||
|
requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9");
|
||||||
|
return requestInfo;
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>A <see cref="global::Marechai.App.Documents.Item.Machines.MachinesRequestBuilder"/></returns>
|
||||||
|
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||||
|
public global::Marechai.App.Documents.Item.Machines.MachinesRequestBuilder WithUrl(string rawUrl)
|
||||||
|
{
|
||||||
|
return new global::Marechai.App.Documents.Item.Machines.MachinesRequestBuilder(rawUrl, RequestAdapter);
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Configuration for the request such as headers, query parameters, and middleware options.
|
||||||
|
/// </summary>
|
||||||
|
[Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")]
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class MachinesRequestBuilderGetRequestConfiguration : RequestConfiguration<DefaultQueryParameters>
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#pragma warning restore CS0618
|
||||||
@@ -0,0 +1,92 @@
|
|||||||
|
// <auto-generated/>
|
||||||
|
#pragma warning disable CS0618
|
||||||
|
using Marechai.App.Models;
|
||||||
|
using Microsoft.Kiota.Abstractions.Extensions;
|
||||||
|
using Microsoft.Kiota.Abstractions.Serialization;
|
||||||
|
using Microsoft.Kiota.Abstractions;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.IO;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Threading;
|
||||||
|
using System;
|
||||||
|
namespace Marechai.App.Documents.Item.People
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Builds and executes requests for operations under \documents\{document-id}\people
|
||||||
|
/// </summary>
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class PeopleRequestBuilder : BaseRequestBuilder
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Instantiates a new <see cref="global::Marechai.App.Documents.Item.People.PeopleRequestBuilder"/> and sets the default values.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="pathParameters">Path parameters for the request</param>
|
||||||
|
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||||
|
public PeopleRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/documents/{document%2Did}/people", pathParameters)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Instantiates a new <see cref="global::Marechai.App.Documents.Item.People.PeopleRequestBuilder"/> and sets the default values.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||||
|
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||||
|
public PeopleRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/documents/{document%2Did}/people", rawUrl)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <returns>A List<global::Marechai.App.Models.PersonByDocumentDto></returns>
|
||||||
|
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
|
||||||
|
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 400 status code</exception>
|
||||||
|
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||||
|
#nullable enable
|
||||||
|
public async Task<List<global::Marechai.App.Models.PersonByDocumentDto>?> GetAsync(Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public async Task<List<global::Marechai.App.Models.PersonByDocumentDto>> GetAsync(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
var requestInfo = ToGetRequestInformation(requestConfiguration);
|
||||||
|
var errorMapping = new Dictionary<string, ParsableFactory<IParsable>>
|
||||||
|
{
|
||||||
|
{ "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
};
|
||||||
|
var collectionResult = await RequestAdapter.SendCollectionAsync<global::Marechai.App.Models.PersonByDocumentDto>(requestInfo, global::Marechai.App.Models.PersonByDocumentDto.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false);
|
||||||
|
return collectionResult?.AsList();
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="RequestInformation"/></returns>
|
||||||
|
/// <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<DefaultQueryParameters>>? requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters);
|
||||||
|
requestInfo.Configure(requestConfiguration);
|
||||||
|
requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9");
|
||||||
|
return requestInfo;
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>A <see cref="global::Marechai.App.Documents.Item.People.PeopleRequestBuilder"/></returns>
|
||||||
|
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||||
|
public global::Marechai.App.Documents.Item.People.PeopleRequestBuilder WithUrl(string rawUrl)
|
||||||
|
{
|
||||||
|
return new global::Marechai.App.Documents.Item.People.PeopleRequestBuilder(rawUrl, RequestAdapter);
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Configuration for the request such as headers, query parameters, and middleware options.
|
||||||
|
/// </summary>
|
||||||
|
[Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")]
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class PeopleRequestBuilderGetRequestConfiguration : RequestConfiguration<DefaultQueryParameters>
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#pragma warning restore CS0618
|
||||||
@@ -0,0 +1,92 @@
|
|||||||
|
// <auto-generated/>
|
||||||
|
#pragma warning disable CS0618
|
||||||
|
using Marechai.App.Models;
|
||||||
|
using Microsoft.Kiota.Abstractions.Extensions;
|
||||||
|
using Microsoft.Kiota.Abstractions.Serialization;
|
||||||
|
using Microsoft.Kiota.Abstractions;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.IO;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Threading;
|
||||||
|
using System;
|
||||||
|
namespace Marechai.App.Documents.Item.Scans
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Builds and executes requests for operations under \documents\{document-id}\scans
|
||||||
|
/// </summary>
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class ScansRequestBuilder : BaseRequestBuilder
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Instantiates a new <see cref="global::Marechai.App.Documents.Item.Scans.ScansRequestBuilder"/> and sets the default values.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="pathParameters">Path parameters for the request</param>
|
||||||
|
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||||
|
public ScansRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/documents/{document%2Did}/scans", pathParameters)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Instantiates a new <see cref="global::Marechai.App.Documents.Item.Scans.ScansRequestBuilder"/> and sets the default values.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||||
|
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||||
|
public ScansRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/documents/{document%2Did}/scans", rawUrl)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <returns>A List<Guid></returns>
|
||||||
|
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
|
||||||
|
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 400 status code</exception>
|
||||||
|
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||||
|
#nullable enable
|
||||||
|
public async Task<List<Guid?>?> GetAsync(Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public async Task<List<Guid?>> GetAsync(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
var requestInfo = ToGetRequestInformation(requestConfiguration);
|
||||||
|
var errorMapping = new Dictionary<string, ParsableFactory<IParsable>>
|
||||||
|
{
|
||||||
|
{ "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
};
|
||||||
|
var collectionResult = await RequestAdapter.SendPrimitiveCollectionAsync<Guid?>(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false);
|
||||||
|
return collectionResult?.AsList();
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="RequestInformation"/></returns>
|
||||||
|
/// <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<DefaultQueryParameters>>? requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters);
|
||||||
|
requestInfo.Configure(requestConfiguration);
|
||||||
|
requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9");
|
||||||
|
return requestInfo;
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>A <see cref="global::Marechai.App.Documents.Item.Scans.ScansRequestBuilder"/></returns>
|
||||||
|
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||||
|
public global::Marechai.App.Documents.Item.Scans.ScansRequestBuilder WithUrl(string rawUrl)
|
||||||
|
{
|
||||||
|
return new global::Marechai.App.Documents.Item.Scans.ScansRequestBuilder(rawUrl, RequestAdapter);
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Configuration for the request such as headers, query parameters, and middleware options.
|
||||||
|
/// </summary>
|
||||||
|
[Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")]
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class ScansRequestBuilderGetRequestConfiguration : RequestConfiguration<DefaultQueryParameters>
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#pragma warning restore CS0618
|
||||||
@@ -0,0 +1,91 @@
|
|||||||
|
// <auto-generated/>
|
||||||
|
#pragma warning disable CS0618
|
||||||
|
using Marechai.App.Models;
|
||||||
|
using Microsoft.Kiota.Abstractions.Extensions;
|
||||||
|
using Microsoft.Kiota.Abstractions.Serialization;
|
||||||
|
using Microsoft.Kiota.Abstractions;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.IO;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Threading;
|
||||||
|
using System;
|
||||||
|
namespace Marechai.App.Documents.Item.Synopsis
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Builds and executes requests for operations under \documents\{document-id}\synopsis
|
||||||
|
/// </summary>
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class SynopsisRequestBuilder : BaseRequestBuilder
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Instantiates a new <see cref="global::Marechai.App.Documents.Item.Synopsis.SynopsisRequestBuilder"/> and sets the default values.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="pathParameters">Path parameters for the request</param>
|
||||||
|
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||||
|
public SynopsisRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/documents/{document%2Did}/synopsis", pathParameters)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Instantiates a new <see cref="global::Marechai.App.Documents.Item.Synopsis.SynopsisRequestBuilder"/> and sets the default values.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||||
|
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||||
|
public SynopsisRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/documents/{document%2Did}/synopsis", rawUrl)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="string"/></returns>
|
||||||
|
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
|
||||||
|
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 400 status code</exception>
|
||||||
|
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||||
|
#nullable enable
|
||||||
|
public async Task<string?> GetAsync(Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public async Task<string> GetAsync(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
var requestInfo = ToGetRequestInformation(requestConfiguration);
|
||||||
|
var errorMapping = new Dictionary<string, ParsableFactory<IParsable>>
|
||||||
|
{
|
||||||
|
{ "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
};
|
||||||
|
return await RequestAdapter.SendPrimitiveAsync<string>(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false);
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="RequestInformation"/></returns>
|
||||||
|
/// <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<DefaultQueryParameters>>? requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters);
|
||||||
|
requestInfo.Configure(requestConfiguration);
|
||||||
|
requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9");
|
||||||
|
return requestInfo;
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>A <see cref="global::Marechai.App.Documents.Item.Synopsis.SynopsisRequestBuilder"/></returns>
|
||||||
|
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||||
|
public global::Marechai.App.Documents.Item.Synopsis.SynopsisRequestBuilder WithUrl(string rawUrl)
|
||||||
|
{
|
||||||
|
return new global::Marechai.App.Documents.Item.Synopsis.SynopsisRequestBuilder(rawUrl, RequestAdapter);
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Configuration for the request such as headers, query parameters, and middleware options.
|
||||||
|
/// </summary>
|
||||||
|
[Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")]
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class SynopsisRequestBuilderGetRequestConfiguration : RequestConfiguration<DefaultQueryParameters>
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#pragma warning restore CS0618
|
||||||
@@ -0,0 +1,192 @@
|
|||||||
|
// <auto-generated/>
|
||||||
|
#pragma warning disable CS0618
|
||||||
|
using Marechai.App.Models;
|
||||||
|
using Microsoft.Kiota.Abstractions.Extensions;
|
||||||
|
using Microsoft.Kiota.Abstractions.Serialization;
|
||||||
|
using Microsoft.Kiota.Abstractions;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.IO;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Threading;
|
||||||
|
using System;
|
||||||
|
namespace Marechai.App.Documents.People.Item
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Builds and executes requests for operations under \documents\people\{id}
|
||||||
|
/// </summary>
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class PeopleItemRequestBuilder : BaseRequestBuilder
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Instantiates a new <see cref="global::Marechai.App.Documents.People.Item.PeopleItemRequestBuilder"/> and sets the default values.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="pathParameters">Path parameters for the request</param>
|
||||||
|
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||||
|
public PeopleItemRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/documents/people/{id}", pathParameters)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Instantiates a new <see cref="global::Marechai.App.Documents.People.Item.PeopleItemRequestBuilder"/> and sets the default values.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||||
|
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||||
|
public PeopleItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/documents/people/{id}", rawUrl)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="string"/></returns>
|
||||||
|
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
|
||||||
|
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 400 status code</exception>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 401 status code</exception>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 404 status code</exception>
|
||||||
|
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||||
|
#nullable enable
|
||||||
|
public async Task<string?> DeleteAsync(Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public async Task<string> DeleteAsync(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
var requestInfo = ToDeleteRequestInformation(requestConfiguration);
|
||||||
|
var errorMapping = new Dictionary<string, ParsableFactory<IParsable>>
|
||||||
|
{
|
||||||
|
{ "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
{ "401", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
{ "404", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
};
|
||||||
|
return await RequestAdapter.SendPrimitiveAsync<string>(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false);
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="global::Marechai.App.Models.DocumentPersonDto"/></returns>
|
||||||
|
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
|
||||||
|
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 400 status code</exception>
|
||||||
|
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||||
|
#nullable enable
|
||||||
|
public async Task<global::Marechai.App.Models.DocumentPersonDto?> GetAsync(Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public async Task<global::Marechai.App.Models.DocumentPersonDto> GetAsync(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
var requestInfo = ToGetRequestInformation(requestConfiguration);
|
||||||
|
var errorMapping = new Dictionary<string, ParsableFactory<IParsable>>
|
||||||
|
{
|
||||||
|
{ "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
};
|
||||||
|
return await RequestAdapter.SendAsync<global::Marechai.App.Models.DocumentPersonDto>(requestInfo, global::Marechai.App.Models.DocumentPersonDto.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false);
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="string"/></returns>
|
||||||
|
/// <param name="body">The request body</param>
|
||||||
|
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
|
||||||
|
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 400 status code</exception>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 401 status code</exception>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 404 status code</exception>
|
||||||
|
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||||
|
#nullable enable
|
||||||
|
public async Task<string?> PutAsync(global::Marechai.App.Models.DocumentPersonDto body, Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public async Task<string> PutAsync(global::Marechai.App.Models.DocumentPersonDto body, Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body));
|
||||||
|
var requestInfo = ToPutRequestInformation(body, requestConfiguration);
|
||||||
|
var errorMapping = new Dictionary<string, ParsableFactory<IParsable>>
|
||||||
|
{
|
||||||
|
{ "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
{ "401", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
{ "404", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
};
|
||||||
|
return await RequestAdapter.SendPrimitiveAsync<string>(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false);
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="RequestInformation"/></returns>
|
||||||
|
/// <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 ToDeleteRequestInformation(Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public RequestInformation ToDeleteRequestInformation(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters);
|
||||||
|
requestInfo.Configure(requestConfiguration);
|
||||||
|
requestInfo.Headers.TryAdd("Accept", "application/json, text/plain;q=0.9");
|
||||||
|
return requestInfo;
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="RequestInformation"/></returns>
|
||||||
|
/// <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<DefaultQueryParameters>>? requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters);
|
||||||
|
requestInfo.Configure(requestConfiguration);
|
||||||
|
requestInfo.Headers.TryAdd("Accept", "application/json, text/plain;q=0.9");
|
||||||
|
return requestInfo;
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="RequestInformation"/></returns>
|
||||||
|
/// <param name="body">The request body</param>
|
||||||
|
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||||
|
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||||
|
#nullable enable
|
||||||
|
public RequestInformation ToPutRequestInformation(global::Marechai.App.Models.DocumentPersonDto body, Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public RequestInformation ToPutRequestInformation(global::Marechai.App.Models.DocumentPersonDto body, Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body));
|
||||||
|
var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters);
|
||||||
|
requestInfo.Configure(requestConfiguration);
|
||||||
|
requestInfo.Headers.TryAdd("Accept", "application/json, text/plain;q=0.9");
|
||||||
|
requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body);
|
||||||
|
return requestInfo;
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>A <see cref="global::Marechai.App.Documents.People.Item.PeopleItemRequestBuilder"/></returns>
|
||||||
|
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||||
|
public global::Marechai.App.Documents.People.Item.PeopleItemRequestBuilder WithUrl(string rawUrl)
|
||||||
|
{
|
||||||
|
return new global::Marechai.App.Documents.People.Item.PeopleItemRequestBuilder(rawUrl, RequestAdapter);
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Configuration for the request such as headers, query parameters, and middleware options.
|
||||||
|
/// </summary>
|
||||||
|
[Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")]
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class PeopleItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration<DefaultQueryParameters>
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Configuration for the request such as headers, query parameters, and middleware options.
|
||||||
|
/// </summary>
|
||||||
|
[Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")]
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class PeopleItemRequestBuilderGetRequestConfiguration : RequestConfiguration<DefaultQueryParameters>
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Configuration for the request such as headers, query parameters, and middleware options.
|
||||||
|
/// </summary>
|
||||||
|
[Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")]
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class PeopleItemRequestBuilderPutRequestConfiguration : RequestConfiguration<DefaultQueryParameters>
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#pragma warning restore CS0618
|
||||||
@@ -0,0 +1,169 @@
|
|||||||
|
// <auto-generated/>
|
||||||
|
#pragma warning disable CS0618
|
||||||
|
using Marechai.App.Documents.People.Item;
|
||||||
|
using Marechai.App.Models;
|
||||||
|
using Microsoft.Kiota.Abstractions.Extensions;
|
||||||
|
using Microsoft.Kiota.Abstractions.Serialization;
|
||||||
|
using Microsoft.Kiota.Abstractions;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.IO;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Threading;
|
||||||
|
using System;
|
||||||
|
namespace Marechai.App.Documents.People
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Builds and executes requests for operations under \documents\people
|
||||||
|
/// </summary>
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class PeopleRequestBuilder : BaseRequestBuilder
|
||||||
|
{
|
||||||
|
/// <summary>Gets an item from the Marechai.App.documents.people.item collection</summary>
|
||||||
|
/// <param name="position">Unique identifier of the item</param>
|
||||||
|
/// <returns>A <see cref="global::Marechai.App.Documents.People.Item.PeopleItemRequestBuilder"/></returns>
|
||||||
|
public global::Marechai.App.Documents.People.Item.PeopleItemRequestBuilder this[int position]
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
var urlTplParams = new Dictionary<string, object>(PathParameters);
|
||||||
|
urlTplParams.Add("id", position);
|
||||||
|
return new global::Marechai.App.Documents.People.Item.PeopleItemRequestBuilder(urlTplParams, RequestAdapter);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// <summary>Gets an item from the Marechai.App.documents.people.item collection</summary>
|
||||||
|
/// <param name="position">Unique identifier of the item</param>
|
||||||
|
/// <returns>A <see cref="global::Marechai.App.Documents.People.Item.PeopleItemRequestBuilder"/></returns>
|
||||||
|
[Obsolete("This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead.")]
|
||||||
|
public global::Marechai.App.Documents.People.Item.PeopleItemRequestBuilder this[string position]
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
var urlTplParams = new Dictionary<string, object>(PathParameters);
|
||||||
|
if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("id", position);
|
||||||
|
return new global::Marechai.App.Documents.People.Item.PeopleItemRequestBuilder(urlTplParams, RequestAdapter);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Instantiates a new <see cref="global::Marechai.App.Documents.People.PeopleRequestBuilder"/> and sets the default values.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="pathParameters">Path parameters for the request</param>
|
||||||
|
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||||
|
public PeopleRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/documents/people", pathParameters)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Instantiates a new <see cref="global::Marechai.App.Documents.People.PeopleRequestBuilder"/> and sets the default values.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||||
|
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||||
|
public PeopleRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/documents/people", rawUrl)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <returns>A List<global::Marechai.App.Models.DocumentPersonDto></returns>
|
||||||
|
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
|
||||||
|
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 400 status code</exception>
|
||||||
|
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||||
|
#nullable enable
|
||||||
|
public async Task<List<global::Marechai.App.Models.DocumentPersonDto>?> GetAsync(Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public async Task<List<global::Marechai.App.Models.DocumentPersonDto>> GetAsync(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
var requestInfo = ToGetRequestInformation(requestConfiguration);
|
||||||
|
var errorMapping = new Dictionary<string, ParsableFactory<IParsable>>
|
||||||
|
{
|
||||||
|
{ "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
};
|
||||||
|
var collectionResult = await RequestAdapter.SendCollectionAsync<global::Marechai.App.Models.DocumentPersonDto>(requestInfo, global::Marechai.App.Models.DocumentPersonDto.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false);
|
||||||
|
return collectionResult?.AsList();
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="UntypedNode"/></returns>
|
||||||
|
/// <param name="body">The request body</param>
|
||||||
|
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
|
||||||
|
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 400 status code</exception>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 401 status code</exception>
|
||||||
|
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||||
|
#nullable enable
|
||||||
|
public async Task<UntypedNode?> PostAsync(global::Marechai.App.Models.DocumentPersonDto body, Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public async Task<UntypedNode> PostAsync(global::Marechai.App.Models.DocumentPersonDto body, Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body));
|
||||||
|
var requestInfo = ToPostRequestInformation(body, requestConfiguration);
|
||||||
|
var errorMapping = new Dictionary<string, ParsableFactory<IParsable>>
|
||||||
|
{
|
||||||
|
{ "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
{ "401", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
};
|
||||||
|
return await RequestAdapter.SendAsync<UntypedNode>(requestInfo, UntypedNode.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false);
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="RequestInformation"/></returns>
|
||||||
|
/// <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<DefaultQueryParameters>>? requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters);
|
||||||
|
requestInfo.Configure(requestConfiguration);
|
||||||
|
requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9");
|
||||||
|
return requestInfo;
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="RequestInformation"/></returns>
|
||||||
|
/// <param name="body">The request body</param>
|
||||||
|
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||||
|
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||||
|
#nullable enable
|
||||||
|
public RequestInformation ToPostRequestInformation(global::Marechai.App.Models.DocumentPersonDto body, Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public RequestInformation ToPostRequestInformation(global::Marechai.App.Models.DocumentPersonDto body, Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body));
|
||||||
|
var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters);
|
||||||
|
requestInfo.Configure(requestConfiguration);
|
||||||
|
requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9");
|
||||||
|
requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body);
|
||||||
|
return requestInfo;
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>A <see cref="global::Marechai.App.Documents.People.PeopleRequestBuilder"/></returns>
|
||||||
|
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||||
|
public global::Marechai.App.Documents.People.PeopleRequestBuilder WithUrl(string rawUrl)
|
||||||
|
{
|
||||||
|
return new global::Marechai.App.Documents.People.PeopleRequestBuilder(rawUrl, RequestAdapter);
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Configuration for the request such as headers, query parameters, and middleware options.
|
||||||
|
/// </summary>
|
||||||
|
[Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")]
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class PeopleRequestBuilderGetRequestConfiguration : RequestConfiguration<DefaultQueryParameters>
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Configuration for the request such as headers, query parameters, and middleware options.
|
||||||
|
/// </summary>
|
||||||
|
[Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")]
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class PeopleRequestBuilderPostRequestConfiguration : RequestConfiguration<DefaultQueryParameters>
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#pragma warning restore CS0618
|
||||||
@@ -0,0 +1,92 @@
|
|||||||
|
// <auto-generated/>
|
||||||
|
#pragma warning disable CS0618
|
||||||
|
using Marechai.App.Models;
|
||||||
|
using Microsoft.Kiota.Abstractions.Extensions;
|
||||||
|
using Microsoft.Kiota.Abstractions.Serialization;
|
||||||
|
using Microsoft.Kiota.Abstractions;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.IO;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Threading;
|
||||||
|
using System;
|
||||||
|
namespace Marechai.App.Documents.Roles.Enabled
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Builds and executes requests for operations under \documents\roles\enabled
|
||||||
|
/// </summary>
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class EnabledRequestBuilder : BaseRequestBuilder
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Instantiates a new <see cref="global::Marechai.App.Documents.Roles.Enabled.EnabledRequestBuilder"/> and sets the default values.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="pathParameters">Path parameters for the request</param>
|
||||||
|
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||||
|
public EnabledRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/documents/roles/enabled", pathParameters)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Instantiates a new <see cref="global::Marechai.App.Documents.Roles.Enabled.EnabledRequestBuilder"/> and sets the default values.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||||
|
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||||
|
public EnabledRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/documents/roles/enabled", rawUrl)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <returns>A List<global::Marechai.App.Models.DocumentRoleDto></returns>
|
||||||
|
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
|
||||||
|
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 400 status code</exception>
|
||||||
|
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||||
|
#nullable enable
|
||||||
|
public async Task<List<global::Marechai.App.Models.DocumentRoleDto>?> GetAsync(Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public async Task<List<global::Marechai.App.Models.DocumentRoleDto>> GetAsync(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
var requestInfo = ToGetRequestInformation(requestConfiguration);
|
||||||
|
var errorMapping = new Dictionary<string, ParsableFactory<IParsable>>
|
||||||
|
{
|
||||||
|
{ "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
};
|
||||||
|
var collectionResult = await RequestAdapter.SendCollectionAsync<global::Marechai.App.Models.DocumentRoleDto>(requestInfo, global::Marechai.App.Models.DocumentRoleDto.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false);
|
||||||
|
return collectionResult?.AsList();
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="RequestInformation"/></returns>
|
||||||
|
/// <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<DefaultQueryParameters>>? requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters);
|
||||||
|
requestInfo.Configure(requestConfiguration);
|
||||||
|
requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9");
|
||||||
|
return requestInfo;
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>A <see cref="global::Marechai.App.Documents.Roles.Enabled.EnabledRequestBuilder"/></returns>
|
||||||
|
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||||
|
public global::Marechai.App.Documents.Roles.Enabled.EnabledRequestBuilder WithUrl(string rawUrl)
|
||||||
|
{
|
||||||
|
return new global::Marechai.App.Documents.Roles.Enabled.EnabledRequestBuilder(rawUrl, RequestAdapter);
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Configuration for the request such as headers, query parameters, and middleware options.
|
||||||
|
/// </summary>
|
||||||
|
[Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")]
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class EnabledRequestBuilderGetRequestConfiguration : RequestConfiguration<DefaultQueryParameters>
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#pragma warning restore CS0618
|
||||||
@@ -0,0 +1,91 @@
|
|||||||
|
// <auto-generated/>
|
||||||
|
#pragma warning disable CS0618
|
||||||
|
using Marechai.App.Models;
|
||||||
|
using Microsoft.Kiota.Abstractions.Extensions;
|
||||||
|
using Microsoft.Kiota.Abstractions.Serialization;
|
||||||
|
using Microsoft.Kiota.Abstractions;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.IO;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Threading;
|
||||||
|
using System;
|
||||||
|
namespace Marechai.App.Documents.Roles.Item
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Builds and executes requests for operations under \documents\roles\{id}
|
||||||
|
/// </summary>
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class RolesItemRequestBuilder : BaseRequestBuilder
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Instantiates a new <see cref="global::Marechai.App.Documents.Roles.Item.RolesItemRequestBuilder"/> and sets the default values.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="pathParameters">Path parameters for the request</param>
|
||||||
|
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||||
|
public RolesItemRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/documents/roles/{id}", pathParameters)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Instantiates a new <see cref="global::Marechai.App.Documents.Roles.Item.RolesItemRequestBuilder"/> and sets the default values.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||||
|
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||||
|
public RolesItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/documents/roles/{id}", rawUrl)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="global::Marechai.App.Models.DocumentRoleDto"/></returns>
|
||||||
|
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
|
||||||
|
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 400 status code</exception>
|
||||||
|
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||||
|
#nullable enable
|
||||||
|
public async Task<global::Marechai.App.Models.DocumentRoleDto?> GetAsync(Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public async Task<global::Marechai.App.Models.DocumentRoleDto> GetAsync(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
var requestInfo = ToGetRequestInformation(requestConfiguration);
|
||||||
|
var errorMapping = new Dictionary<string, ParsableFactory<IParsable>>
|
||||||
|
{
|
||||||
|
{ "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
};
|
||||||
|
return await RequestAdapter.SendAsync<global::Marechai.App.Models.DocumentRoleDto>(requestInfo, global::Marechai.App.Models.DocumentRoleDto.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false);
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="RequestInformation"/></returns>
|
||||||
|
/// <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<DefaultQueryParameters>>? requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters);
|
||||||
|
requestInfo.Configure(requestConfiguration);
|
||||||
|
requestInfo.Headers.TryAdd("Accept", "application/json, text/plain;q=0.9");
|
||||||
|
return requestInfo;
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>A <see cref="global::Marechai.App.Documents.Roles.Item.RolesItemRequestBuilder"/></returns>
|
||||||
|
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||||
|
public global::Marechai.App.Documents.Roles.Item.RolesItemRequestBuilder WithUrl(string rawUrl)
|
||||||
|
{
|
||||||
|
return new global::Marechai.App.Documents.Roles.Item.RolesItemRequestBuilder(rawUrl, RequestAdapter);
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Configuration for the request such as headers, query parameters, and middleware options.
|
||||||
|
/// </summary>
|
||||||
|
[Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")]
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class RolesItemRequestBuilderGetRequestConfiguration : RequestConfiguration<DefaultQueryParameters>
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#pragma warning restore CS0618
|
||||||
@@ -0,0 +1,111 @@
|
|||||||
|
// <auto-generated/>
|
||||||
|
#pragma warning disable CS0618
|
||||||
|
using Marechai.App.Documents.Roles.Enabled;
|
||||||
|
using Marechai.App.Documents.Roles.Item;
|
||||||
|
using Marechai.App.Models;
|
||||||
|
using Microsoft.Kiota.Abstractions.Extensions;
|
||||||
|
using Microsoft.Kiota.Abstractions.Serialization;
|
||||||
|
using Microsoft.Kiota.Abstractions;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.IO;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Threading;
|
||||||
|
using System;
|
||||||
|
namespace Marechai.App.Documents.Roles
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Builds and executes requests for operations under \documents\roles
|
||||||
|
/// </summary>
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class RolesRequestBuilder : BaseRequestBuilder
|
||||||
|
{
|
||||||
|
/// <summary>The enabled property</summary>
|
||||||
|
public global::Marechai.App.Documents.Roles.Enabled.EnabledRequestBuilder Enabled
|
||||||
|
{
|
||||||
|
get => new global::Marechai.App.Documents.Roles.Enabled.EnabledRequestBuilder(PathParameters, RequestAdapter);
|
||||||
|
}
|
||||||
|
/// <summary>Gets an item from the Marechai.App.documents.roles.item collection</summary>
|
||||||
|
/// <param name="position">Unique identifier of the item</param>
|
||||||
|
/// <returns>A <see cref="global::Marechai.App.Documents.Roles.Item.RolesItemRequestBuilder"/></returns>
|
||||||
|
public global::Marechai.App.Documents.Roles.Item.RolesItemRequestBuilder this[string position]
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
var urlTplParams = new Dictionary<string, object>(PathParameters);
|
||||||
|
urlTplParams.Add("id", position);
|
||||||
|
return new global::Marechai.App.Documents.Roles.Item.RolesItemRequestBuilder(urlTplParams, RequestAdapter);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Instantiates a new <see cref="global::Marechai.App.Documents.Roles.RolesRequestBuilder"/> and sets the default values.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="pathParameters">Path parameters for the request</param>
|
||||||
|
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||||
|
public RolesRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/documents/roles", pathParameters)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Instantiates a new <see cref="global::Marechai.App.Documents.Roles.RolesRequestBuilder"/> and sets the default values.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||||
|
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||||
|
public RolesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/documents/roles", rawUrl)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <returns>A List<global::Marechai.App.Models.DocumentRoleDto></returns>
|
||||||
|
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
|
||||||
|
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 400 status code</exception>
|
||||||
|
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||||
|
#nullable enable
|
||||||
|
public async Task<List<global::Marechai.App.Models.DocumentRoleDto>?> GetAsync(Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public async Task<List<global::Marechai.App.Models.DocumentRoleDto>> GetAsync(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
var requestInfo = ToGetRequestInformation(requestConfiguration);
|
||||||
|
var errorMapping = new Dictionary<string, ParsableFactory<IParsable>>
|
||||||
|
{
|
||||||
|
{ "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
};
|
||||||
|
var collectionResult = await RequestAdapter.SendCollectionAsync<global::Marechai.App.Models.DocumentRoleDto>(requestInfo, global::Marechai.App.Models.DocumentRoleDto.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false);
|
||||||
|
return collectionResult?.AsList();
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="RequestInformation"/></returns>
|
||||||
|
/// <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<DefaultQueryParameters>>? requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters);
|
||||||
|
requestInfo.Configure(requestConfiguration);
|
||||||
|
requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9");
|
||||||
|
return requestInfo;
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>A <see cref="global::Marechai.App.Documents.Roles.RolesRequestBuilder"/></returns>
|
||||||
|
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||||
|
public global::Marechai.App.Documents.Roles.RolesRequestBuilder WithUrl(string rawUrl)
|
||||||
|
{
|
||||||
|
return new global::Marechai.App.Documents.Roles.RolesRequestBuilder(rawUrl, RequestAdapter);
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Configuration for the request such as headers, query parameters, and middleware options.
|
||||||
|
/// </summary>
|
||||||
|
[Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")]
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class RolesRequestBuilderGetRequestConfiguration : RequestConfiguration<DefaultQueryParameters>
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#pragma warning restore CS0618
|
||||||
@@ -0,0 +1,192 @@
|
|||||||
|
// <auto-generated/>
|
||||||
|
#pragma warning disable CS0618
|
||||||
|
using Marechai.App.Models;
|
||||||
|
using Microsoft.Kiota.Abstractions.Extensions;
|
||||||
|
using Microsoft.Kiota.Abstractions.Serialization;
|
||||||
|
using Microsoft.Kiota.Abstractions;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.IO;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Threading;
|
||||||
|
using System;
|
||||||
|
namespace Marechai.App.Documents.Scans.Item
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Builds and executes requests for operations under \documents\scans\{id}
|
||||||
|
/// </summary>
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class ScansItemRequestBuilder : BaseRequestBuilder
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Instantiates a new <see cref="global::Marechai.App.Documents.Scans.Item.ScansItemRequestBuilder"/> and sets the default values.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="pathParameters">Path parameters for the request</param>
|
||||||
|
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||||
|
public ScansItemRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/documents/scans/{id}", pathParameters)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Instantiates a new <see cref="global::Marechai.App.Documents.Scans.Item.ScansItemRequestBuilder"/> and sets the default values.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||||
|
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||||
|
public ScansItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/documents/scans/{id}", rawUrl)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="string"/></returns>
|
||||||
|
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
|
||||||
|
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 400 status code</exception>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 401 status code</exception>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 404 status code</exception>
|
||||||
|
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||||
|
#nullable enable
|
||||||
|
public async Task<string?> DeleteAsync(Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public async Task<string> DeleteAsync(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
var requestInfo = ToDeleteRequestInformation(requestConfiguration);
|
||||||
|
var errorMapping = new Dictionary<string, ParsableFactory<IParsable>>
|
||||||
|
{
|
||||||
|
{ "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
{ "401", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
{ "404", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
};
|
||||||
|
return await RequestAdapter.SendPrimitiveAsync<string>(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false);
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="global::Marechai.App.Models.DocumentScanDto"/></returns>
|
||||||
|
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
|
||||||
|
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 400 status code</exception>
|
||||||
|
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||||
|
#nullable enable
|
||||||
|
public async Task<global::Marechai.App.Models.DocumentScanDto?> GetAsync(Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public async Task<global::Marechai.App.Models.DocumentScanDto> GetAsync(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
var requestInfo = ToGetRequestInformation(requestConfiguration);
|
||||||
|
var errorMapping = new Dictionary<string, ParsableFactory<IParsable>>
|
||||||
|
{
|
||||||
|
{ "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
};
|
||||||
|
return await RequestAdapter.SendAsync<global::Marechai.App.Models.DocumentScanDto>(requestInfo, global::Marechai.App.Models.DocumentScanDto.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false);
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="string"/></returns>
|
||||||
|
/// <param name="body">The request body</param>
|
||||||
|
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
|
||||||
|
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 400 status code</exception>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 401 status code</exception>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 404 status code</exception>
|
||||||
|
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||||
|
#nullable enable
|
||||||
|
public async Task<string?> PutAsync(global::Marechai.App.Models.DocumentScanDto body, Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public async Task<string> PutAsync(global::Marechai.App.Models.DocumentScanDto body, Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body));
|
||||||
|
var requestInfo = ToPutRequestInformation(body, requestConfiguration);
|
||||||
|
var errorMapping = new Dictionary<string, ParsableFactory<IParsable>>
|
||||||
|
{
|
||||||
|
{ "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
{ "401", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
{ "404", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
};
|
||||||
|
return await RequestAdapter.SendPrimitiveAsync<string>(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false);
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="RequestInformation"/></returns>
|
||||||
|
/// <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 ToDeleteRequestInformation(Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public RequestInformation ToDeleteRequestInformation(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters);
|
||||||
|
requestInfo.Configure(requestConfiguration);
|
||||||
|
requestInfo.Headers.TryAdd("Accept", "application/json, text/plain;q=0.9");
|
||||||
|
return requestInfo;
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="RequestInformation"/></returns>
|
||||||
|
/// <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<DefaultQueryParameters>>? requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters);
|
||||||
|
requestInfo.Configure(requestConfiguration);
|
||||||
|
requestInfo.Headers.TryAdd("Accept", "application/json, text/plain;q=0.9");
|
||||||
|
return requestInfo;
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="RequestInformation"/></returns>
|
||||||
|
/// <param name="body">The request body</param>
|
||||||
|
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||||
|
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||||
|
#nullable enable
|
||||||
|
public RequestInformation ToPutRequestInformation(global::Marechai.App.Models.DocumentScanDto body, Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public RequestInformation ToPutRequestInformation(global::Marechai.App.Models.DocumentScanDto body, Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body));
|
||||||
|
var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters);
|
||||||
|
requestInfo.Configure(requestConfiguration);
|
||||||
|
requestInfo.Headers.TryAdd("Accept", "application/json, text/plain;q=0.9");
|
||||||
|
requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body);
|
||||||
|
return requestInfo;
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>A <see cref="global::Marechai.App.Documents.Scans.Item.ScansItemRequestBuilder"/></returns>
|
||||||
|
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||||
|
public global::Marechai.App.Documents.Scans.Item.ScansItemRequestBuilder WithUrl(string rawUrl)
|
||||||
|
{
|
||||||
|
return new global::Marechai.App.Documents.Scans.Item.ScansItemRequestBuilder(rawUrl, RequestAdapter);
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Configuration for the request such as headers, query parameters, and middleware options.
|
||||||
|
/// </summary>
|
||||||
|
[Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")]
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class ScansItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration<DefaultQueryParameters>
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Configuration for the request such as headers, query parameters, and middleware options.
|
||||||
|
/// </summary>
|
||||||
|
[Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")]
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class ScansItemRequestBuilderGetRequestConfiguration : RequestConfiguration<DefaultQueryParameters>
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Configuration for the request such as headers, query parameters, and middleware options.
|
||||||
|
/// </summary>
|
||||||
|
[Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")]
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class ScansItemRequestBuilderPutRequestConfiguration : RequestConfiguration<DefaultQueryParameters>
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#pragma warning restore CS0618
|
||||||
@@ -0,0 +1,124 @@
|
|||||||
|
// <auto-generated/>
|
||||||
|
#pragma warning disable CS0618
|
||||||
|
using Marechai.App.Documents.Scans.Item;
|
||||||
|
using Marechai.App.Models;
|
||||||
|
using Microsoft.Kiota.Abstractions.Extensions;
|
||||||
|
using Microsoft.Kiota.Abstractions.Serialization;
|
||||||
|
using Microsoft.Kiota.Abstractions;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.IO;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Threading;
|
||||||
|
using System;
|
||||||
|
namespace Marechai.App.Documents.Scans
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Builds and executes requests for operations under \documents\scans
|
||||||
|
/// </summary>
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class ScansRequestBuilder : BaseRequestBuilder
|
||||||
|
{
|
||||||
|
/// <summary>Gets an item from the Marechai.App.documents.scans.item collection</summary>
|
||||||
|
/// <param name="position">Unique identifier of the item</param>
|
||||||
|
/// <returns>A <see cref="global::Marechai.App.Documents.Scans.Item.ScansItemRequestBuilder"/></returns>
|
||||||
|
public global::Marechai.App.Documents.Scans.Item.ScansItemRequestBuilder this[Guid position]
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
var urlTplParams = new Dictionary<string, object>(PathParameters);
|
||||||
|
urlTplParams.Add("id", position);
|
||||||
|
return new global::Marechai.App.Documents.Scans.Item.ScansItemRequestBuilder(urlTplParams, RequestAdapter);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// <summary>Gets an item from the Marechai.App.documents.scans.item collection</summary>
|
||||||
|
/// <param name="position">Unique identifier of the item</param>
|
||||||
|
/// <returns>A <see cref="global::Marechai.App.Documents.Scans.Item.ScansItemRequestBuilder"/></returns>
|
||||||
|
[Obsolete("This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead.")]
|
||||||
|
public global::Marechai.App.Documents.Scans.Item.ScansItemRequestBuilder this[string position]
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
var urlTplParams = new Dictionary<string, object>(PathParameters);
|
||||||
|
if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("id", position);
|
||||||
|
return new global::Marechai.App.Documents.Scans.Item.ScansItemRequestBuilder(urlTplParams, RequestAdapter);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Instantiates a new <see cref="global::Marechai.App.Documents.Scans.ScansRequestBuilder"/> and sets the default values.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="pathParameters">Path parameters for the request</param>
|
||||||
|
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||||
|
public ScansRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/documents/scans", pathParameters)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Instantiates a new <see cref="global::Marechai.App.Documents.Scans.ScansRequestBuilder"/> and sets the default values.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||||
|
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||||
|
public ScansRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/documents/scans", rawUrl)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="Guid"/></returns>
|
||||||
|
/// <param name="body">The request body</param>
|
||||||
|
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
|
||||||
|
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 400 status code</exception>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 401 status code</exception>
|
||||||
|
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||||
|
#nullable enable
|
||||||
|
public async Task<Guid?> PostAsync(global::Marechai.App.Models.DocumentScanDto body, Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public async Task<Guid?> PostAsync(global::Marechai.App.Models.DocumentScanDto body, Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body));
|
||||||
|
var requestInfo = ToPostRequestInformation(body, requestConfiguration);
|
||||||
|
var errorMapping = new Dictionary<string, ParsableFactory<IParsable>>
|
||||||
|
{
|
||||||
|
{ "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
{ "401", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
};
|
||||||
|
return await RequestAdapter.SendPrimitiveAsync<Guid?>(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false);
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="RequestInformation"/></returns>
|
||||||
|
/// <param name="body">The request body</param>
|
||||||
|
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||||
|
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||||
|
#nullable enable
|
||||||
|
public RequestInformation ToPostRequestInformation(global::Marechai.App.Models.DocumentScanDto body, Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public RequestInformation ToPostRequestInformation(global::Marechai.App.Models.DocumentScanDto body, Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body));
|
||||||
|
var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters);
|
||||||
|
requestInfo.Configure(requestConfiguration);
|
||||||
|
requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9");
|
||||||
|
requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body);
|
||||||
|
return requestInfo;
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>A <see cref="global::Marechai.App.Documents.Scans.ScansRequestBuilder"/></returns>
|
||||||
|
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||||
|
public global::Marechai.App.Documents.Scans.ScansRequestBuilder WithUrl(string rawUrl)
|
||||||
|
{
|
||||||
|
return new global::Marechai.App.Documents.Scans.ScansRequestBuilder(rawUrl, RequestAdapter);
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Configuration for the request such as headers, query parameters, and middleware options.
|
||||||
|
/// </summary>
|
||||||
|
[Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")]
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class ScansRequestBuilderPostRequestConfiguration : RequestConfiguration<DefaultQueryParameters>
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#pragma warning restore CS0618
|
||||||
156
Marechai.App/Services/Client/Dumps/DumpsRequestBuilder.cs
Normal file
156
Marechai.App/Services/Client/Dumps/DumpsRequestBuilder.cs
Normal file
@@ -0,0 +1,156 @@
|
|||||||
|
// <auto-generated/>
|
||||||
|
#pragma warning disable CS0618
|
||||||
|
using Marechai.App.Dumps.Item;
|
||||||
|
using Marechai.App.Models;
|
||||||
|
using Microsoft.Kiota.Abstractions.Extensions;
|
||||||
|
using Microsoft.Kiota.Abstractions.Serialization;
|
||||||
|
using Microsoft.Kiota.Abstractions;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.IO;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Threading;
|
||||||
|
using System;
|
||||||
|
namespace Marechai.App.Dumps
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Builds and executes requests for operations under \dumps
|
||||||
|
/// </summary>
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class DumpsRequestBuilder : BaseRequestBuilder
|
||||||
|
{
|
||||||
|
/// <summary>Gets an item from the Marechai.App.dumps.item collection</summary>
|
||||||
|
/// <param name="position">Unique identifier of the item</param>
|
||||||
|
/// <returns>A <see cref="global::Marechai.App.Dumps.Item.DumpsItemRequestBuilder"/></returns>
|
||||||
|
public global::Marechai.App.Dumps.Item.DumpsItemRequestBuilder this[string position]
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
var urlTplParams = new Dictionary<string, object>(PathParameters);
|
||||||
|
urlTplParams.Add("id", position);
|
||||||
|
return new global::Marechai.App.Dumps.Item.DumpsItemRequestBuilder(urlTplParams, RequestAdapter);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Instantiates a new <see cref="global::Marechai.App.Dumps.DumpsRequestBuilder"/> and sets the default values.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="pathParameters">Path parameters for the request</param>
|
||||||
|
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||||
|
public DumpsRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/dumps", pathParameters)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Instantiates a new <see cref="global::Marechai.App.Dumps.DumpsRequestBuilder"/> and sets the default values.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||||
|
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||||
|
public DumpsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/dumps", rawUrl)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <returns>A List<global::Marechai.App.Models.DumpDto></returns>
|
||||||
|
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
|
||||||
|
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 400 status code</exception>
|
||||||
|
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||||
|
#nullable enable
|
||||||
|
public async Task<List<global::Marechai.App.Models.DumpDto>?> GetAsync(Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public async Task<List<global::Marechai.App.Models.DumpDto>> GetAsync(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
var requestInfo = ToGetRequestInformation(requestConfiguration);
|
||||||
|
var errorMapping = new Dictionary<string, ParsableFactory<IParsable>>
|
||||||
|
{
|
||||||
|
{ "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
};
|
||||||
|
var collectionResult = await RequestAdapter.SendCollectionAsync<global::Marechai.App.Models.DumpDto>(requestInfo, global::Marechai.App.Models.DumpDto.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false);
|
||||||
|
return collectionResult?.AsList();
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="UntypedNode"/></returns>
|
||||||
|
/// <param name="body">The request body</param>
|
||||||
|
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
|
||||||
|
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 400 status code</exception>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 401 status code</exception>
|
||||||
|
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||||
|
#nullable enable
|
||||||
|
public async Task<UntypedNode?> PostAsync(global::Marechai.App.Models.DumpDto body, Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public async Task<UntypedNode> PostAsync(global::Marechai.App.Models.DumpDto body, Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body));
|
||||||
|
var requestInfo = ToPostRequestInformation(body, requestConfiguration);
|
||||||
|
var errorMapping = new Dictionary<string, ParsableFactory<IParsable>>
|
||||||
|
{
|
||||||
|
{ "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
{ "401", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
};
|
||||||
|
return await RequestAdapter.SendAsync<UntypedNode>(requestInfo, UntypedNode.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false);
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="RequestInformation"/></returns>
|
||||||
|
/// <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<DefaultQueryParameters>>? requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters);
|
||||||
|
requestInfo.Configure(requestConfiguration);
|
||||||
|
requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9");
|
||||||
|
return requestInfo;
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="RequestInformation"/></returns>
|
||||||
|
/// <param name="body">The request body</param>
|
||||||
|
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||||
|
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||||
|
#nullable enable
|
||||||
|
public RequestInformation ToPostRequestInformation(global::Marechai.App.Models.DumpDto body, Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public RequestInformation ToPostRequestInformation(global::Marechai.App.Models.DumpDto body, Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body));
|
||||||
|
var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters);
|
||||||
|
requestInfo.Configure(requestConfiguration);
|
||||||
|
requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9");
|
||||||
|
requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body);
|
||||||
|
return requestInfo;
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>A <see cref="global::Marechai.App.Dumps.DumpsRequestBuilder"/></returns>
|
||||||
|
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||||
|
public global::Marechai.App.Dumps.DumpsRequestBuilder WithUrl(string rawUrl)
|
||||||
|
{
|
||||||
|
return new global::Marechai.App.Dumps.DumpsRequestBuilder(rawUrl, RequestAdapter);
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Configuration for the request such as headers, query parameters, and middleware options.
|
||||||
|
/// </summary>
|
||||||
|
[Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")]
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class DumpsRequestBuilderGetRequestConfiguration : RequestConfiguration<DefaultQueryParameters>
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Configuration for the request such as headers, query parameters, and middleware options.
|
||||||
|
/// </summary>
|
||||||
|
[Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")]
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class DumpsRequestBuilderPostRequestConfiguration : RequestConfiguration<DefaultQueryParameters>
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#pragma warning restore CS0618
|
||||||
@@ -0,0 +1,192 @@
|
|||||||
|
// <auto-generated/>
|
||||||
|
#pragma warning disable CS0618
|
||||||
|
using Marechai.App.Models;
|
||||||
|
using Microsoft.Kiota.Abstractions.Extensions;
|
||||||
|
using Microsoft.Kiota.Abstractions.Serialization;
|
||||||
|
using Microsoft.Kiota.Abstractions;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.IO;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Threading;
|
||||||
|
using System;
|
||||||
|
namespace Marechai.App.Dumps.Item
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Builds and executes requests for operations under \dumps\{id}
|
||||||
|
/// </summary>
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class DumpsItemRequestBuilder : BaseRequestBuilder
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Instantiates a new <see cref="global::Marechai.App.Dumps.Item.DumpsItemRequestBuilder"/> and sets the default values.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="pathParameters">Path parameters for the request</param>
|
||||||
|
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||||
|
public DumpsItemRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/dumps/{id}", pathParameters)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Instantiates a new <see cref="global::Marechai.App.Dumps.Item.DumpsItemRequestBuilder"/> and sets the default values.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||||
|
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||||
|
public DumpsItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/dumps/{id}", rawUrl)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="string"/></returns>
|
||||||
|
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
|
||||||
|
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 400 status code</exception>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 401 status code</exception>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 404 status code</exception>
|
||||||
|
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||||
|
#nullable enable
|
||||||
|
public async Task<string?> DeleteAsync(Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public async Task<string> DeleteAsync(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
var requestInfo = ToDeleteRequestInformation(requestConfiguration);
|
||||||
|
var errorMapping = new Dictionary<string, ParsableFactory<IParsable>>
|
||||||
|
{
|
||||||
|
{ "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
{ "401", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
{ "404", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
};
|
||||||
|
return await RequestAdapter.SendPrimitiveAsync<string>(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false);
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="global::Marechai.App.Models.DumpDto"/></returns>
|
||||||
|
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
|
||||||
|
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 400 status code</exception>
|
||||||
|
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||||
|
#nullable enable
|
||||||
|
public async Task<global::Marechai.App.Models.DumpDto?> GetAsync(Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public async Task<global::Marechai.App.Models.DumpDto> GetAsync(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
var requestInfo = ToGetRequestInformation(requestConfiguration);
|
||||||
|
var errorMapping = new Dictionary<string, ParsableFactory<IParsable>>
|
||||||
|
{
|
||||||
|
{ "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
};
|
||||||
|
return await RequestAdapter.SendAsync<global::Marechai.App.Models.DumpDto>(requestInfo, global::Marechai.App.Models.DumpDto.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false);
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="string"/></returns>
|
||||||
|
/// <param name="body">The request body</param>
|
||||||
|
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
|
||||||
|
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 400 status code</exception>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 401 status code</exception>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 404 status code</exception>
|
||||||
|
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||||
|
#nullable enable
|
||||||
|
public async Task<string?> PutAsync(global::Marechai.App.Models.DumpDto body, Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public async Task<string> PutAsync(global::Marechai.App.Models.DumpDto body, Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body));
|
||||||
|
var requestInfo = ToPutRequestInformation(body, requestConfiguration);
|
||||||
|
var errorMapping = new Dictionary<string, ParsableFactory<IParsable>>
|
||||||
|
{
|
||||||
|
{ "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
{ "401", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
{ "404", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
};
|
||||||
|
return await RequestAdapter.SendPrimitiveAsync<string>(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false);
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="RequestInformation"/></returns>
|
||||||
|
/// <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 ToDeleteRequestInformation(Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public RequestInformation ToDeleteRequestInformation(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters);
|
||||||
|
requestInfo.Configure(requestConfiguration);
|
||||||
|
requestInfo.Headers.TryAdd("Accept", "application/json, text/plain;q=0.9");
|
||||||
|
return requestInfo;
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="RequestInformation"/></returns>
|
||||||
|
/// <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<DefaultQueryParameters>>? requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters);
|
||||||
|
requestInfo.Configure(requestConfiguration);
|
||||||
|
requestInfo.Headers.TryAdd("Accept", "application/json, text/plain;q=0.9");
|
||||||
|
return requestInfo;
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="RequestInformation"/></returns>
|
||||||
|
/// <param name="body">The request body</param>
|
||||||
|
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||||
|
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||||
|
#nullable enable
|
||||||
|
public RequestInformation ToPutRequestInformation(global::Marechai.App.Models.DumpDto body, Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public RequestInformation ToPutRequestInformation(global::Marechai.App.Models.DumpDto body, Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body));
|
||||||
|
var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters);
|
||||||
|
requestInfo.Configure(requestConfiguration);
|
||||||
|
requestInfo.Headers.TryAdd("Accept", "application/json, text/plain;q=0.9");
|
||||||
|
requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body);
|
||||||
|
return requestInfo;
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>A <see cref="global::Marechai.App.Dumps.Item.DumpsItemRequestBuilder"/></returns>
|
||||||
|
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||||
|
public global::Marechai.App.Dumps.Item.DumpsItemRequestBuilder WithUrl(string rawUrl)
|
||||||
|
{
|
||||||
|
return new global::Marechai.App.Dumps.Item.DumpsItemRequestBuilder(rawUrl, RequestAdapter);
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Configuration for the request such as headers, query parameters, and middleware options.
|
||||||
|
/// </summary>
|
||||||
|
[Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")]
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class DumpsItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration<DefaultQueryParameters>
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Configuration for the request such as headers, query parameters, and middleware options.
|
||||||
|
/// </summary>
|
||||||
|
[Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")]
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class DumpsItemRequestBuilderGetRequestConfiguration : RequestConfiguration<DefaultQueryParameters>
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Configuration for the request such as headers, query parameters, and middleware options.
|
||||||
|
/// </summary>
|
||||||
|
[Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")]
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class DumpsItemRequestBuilderPutRequestConfiguration : RequestConfiguration<DefaultQueryParameters>
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#pragma warning restore CS0618
|
||||||
169
Marechai.App/Services/Client/Gpus/GpusRequestBuilder.cs
Normal file
169
Marechai.App/Services/Client/Gpus/GpusRequestBuilder.cs
Normal file
@@ -0,0 +1,169 @@
|
|||||||
|
// <auto-generated/>
|
||||||
|
#pragma warning disable CS0618
|
||||||
|
using Marechai.App.Gpus.Item;
|
||||||
|
using Marechai.App.Models;
|
||||||
|
using Microsoft.Kiota.Abstractions.Extensions;
|
||||||
|
using Microsoft.Kiota.Abstractions.Serialization;
|
||||||
|
using Microsoft.Kiota.Abstractions;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.IO;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Threading;
|
||||||
|
using System;
|
||||||
|
namespace Marechai.App.Gpus
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Builds and executes requests for operations under \gpus
|
||||||
|
/// </summary>
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class GpusRequestBuilder : BaseRequestBuilder
|
||||||
|
{
|
||||||
|
/// <summary>Gets an item from the Marechai.App.gpus.item collection</summary>
|
||||||
|
/// <param name="position">Unique identifier of the item</param>
|
||||||
|
/// <returns>A <see cref="global::Marechai.App.Gpus.Item.GpusItemRequestBuilder"/></returns>
|
||||||
|
public global::Marechai.App.Gpus.Item.GpusItemRequestBuilder this[int position]
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
var urlTplParams = new Dictionary<string, object>(PathParameters);
|
||||||
|
urlTplParams.Add("id", position);
|
||||||
|
return new global::Marechai.App.Gpus.Item.GpusItemRequestBuilder(urlTplParams, RequestAdapter);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// <summary>Gets an item from the Marechai.App.gpus.item collection</summary>
|
||||||
|
/// <param name="position">Unique identifier of the item</param>
|
||||||
|
/// <returns>A <see cref="global::Marechai.App.Gpus.Item.GpusItemRequestBuilder"/></returns>
|
||||||
|
[Obsolete("This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead.")]
|
||||||
|
public global::Marechai.App.Gpus.Item.GpusItemRequestBuilder this[string position]
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
var urlTplParams = new Dictionary<string, object>(PathParameters);
|
||||||
|
if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("id", position);
|
||||||
|
return new global::Marechai.App.Gpus.Item.GpusItemRequestBuilder(urlTplParams, RequestAdapter);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Instantiates a new <see cref="global::Marechai.App.Gpus.GpusRequestBuilder"/> and sets the default values.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="pathParameters">Path parameters for the request</param>
|
||||||
|
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||||
|
public GpusRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/gpus", pathParameters)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Instantiates a new <see cref="global::Marechai.App.Gpus.GpusRequestBuilder"/> and sets the default values.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||||
|
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||||
|
public GpusRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/gpus", rawUrl)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <returns>A List<global::Marechai.App.Models.GpuDto></returns>
|
||||||
|
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
|
||||||
|
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 400 status code</exception>
|
||||||
|
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||||
|
#nullable enable
|
||||||
|
public async Task<List<global::Marechai.App.Models.GpuDto>?> GetAsync(Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public async Task<List<global::Marechai.App.Models.GpuDto>> GetAsync(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
var requestInfo = ToGetRequestInformation(requestConfiguration);
|
||||||
|
var errorMapping = new Dictionary<string, ParsableFactory<IParsable>>
|
||||||
|
{
|
||||||
|
{ "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
};
|
||||||
|
var collectionResult = await RequestAdapter.SendCollectionAsync<global::Marechai.App.Models.GpuDto>(requestInfo, global::Marechai.App.Models.GpuDto.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false);
|
||||||
|
return collectionResult?.AsList();
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="UntypedNode"/></returns>
|
||||||
|
/// <param name="body">The request body</param>
|
||||||
|
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
|
||||||
|
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 400 status code</exception>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 401 status code</exception>
|
||||||
|
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||||
|
#nullable enable
|
||||||
|
public async Task<UntypedNode?> PostAsync(global::Marechai.App.Models.GpuDto body, Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public async Task<UntypedNode> PostAsync(global::Marechai.App.Models.GpuDto body, Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body));
|
||||||
|
var requestInfo = ToPostRequestInformation(body, requestConfiguration);
|
||||||
|
var errorMapping = new Dictionary<string, ParsableFactory<IParsable>>
|
||||||
|
{
|
||||||
|
{ "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
{ "401", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
};
|
||||||
|
return await RequestAdapter.SendAsync<UntypedNode>(requestInfo, UntypedNode.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false);
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="RequestInformation"/></returns>
|
||||||
|
/// <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<DefaultQueryParameters>>? requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters);
|
||||||
|
requestInfo.Configure(requestConfiguration);
|
||||||
|
requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9");
|
||||||
|
return requestInfo;
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="RequestInformation"/></returns>
|
||||||
|
/// <param name="body">The request body</param>
|
||||||
|
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||||
|
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||||
|
#nullable enable
|
||||||
|
public RequestInformation ToPostRequestInformation(global::Marechai.App.Models.GpuDto body, Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public RequestInformation ToPostRequestInformation(global::Marechai.App.Models.GpuDto body, Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body));
|
||||||
|
var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters);
|
||||||
|
requestInfo.Configure(requestConfiguration);
|
||||||
|
requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9");
|
||||||
|
requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body);
|
||||||
|
return requestInfo;
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>A <see cref="global::Marechai.App.Gpus.GpusRequestBuilder"/></returns>
|
||||||
|
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||||
|
public global::Marechai.App.Gpus.GpusRequestBuilder WithUrl(string rawUrl)
|
||||||
|
{
|
||||||
|
return new global::Marechai.App.Gpus.GpusRequestBuilder(rawUrl, RequestAdapter);
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Configuration for the request such as headers, query parameters, and middleware options.
|
||||||
|
/// </summary>
|
||||||
|
[Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")]
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class GpusRequestBuilderGetRequestConfiguration : RequestConfiguration<DefaultQueryParameters>
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Configuration for the request such as headers, query parameters, and middleware options.
|
||||||
|
/// </summary>
|
||||||
|
[Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")]
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class GpusRequestBuilderPostRequestConfiguration : RequestConfiguration<DefaultQueryParameters>
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#pragma warning restore CS0618
|
||||||
192
Marechai.App/Services/Client/Gpus/Item/GpusItemRequestBuilder.cs
Normal file
192
Marechai.App/Services/Client/Gpus/Item/GpusItemRequestBuilder.cs
Normal file
@@ -0,0 +1,192 @@
|
|||||||
|
// <auto-generated/>
|
||||||
|
#pragma warning disable CS0618
|
||||||
|
using Marechai.App.Models;
|
||||||
|
using Microsoft.Kiota.Abstractions.Extensions;
|
||||||
|
using Microsoft.Kiota.Abstractions.Serialization;
|
||||||
|
using Microsoft.Kiota.Abstractions;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.IO;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Threading;
|
||||||
|
using System;
|
||||||
|
namespace Marechai.App.Gpus.Item
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Builds and executes requests for operations under \gpus\{id}
|
||||||
|
/// </summary>
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class GpusItemRequestBuilder : BaseRequestBuilder
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Instantiates a new <see cref="global::Marechai.App.Gpus.Item.GpusItemRequestBuilder"/> and sets the default values.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="pathParameters">Path parameters for the request</param>
|
||||||
|
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||||
|
public GpusItemRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/gpus/{id}", pathParameters)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Instantiates a new <see cref="global::Marechai.App.Gpus.Item.GpusItemRequestBuilder"/> and sets the default values.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||||
|
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||||
|
public GpusItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/gpus/{id}", rawUrl)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="string"/></returns>
|
||||||
|
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
|
||||||
|
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 400 status code</exception>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 401 status code</exception>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 404 status code</exception>
|
||||||
|
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||||
|
#nullable enable
|
||||||
|
public async Task<string?> DeleteAsync(Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public async Task<string> DeleteAsync(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
var requestInfo = ToDeleteRequestInformation(requestConfiguration);
|
||||||
|
var errorMapping = new Dictionary<string, ParsableFactory<IParsable>>
|
||||||
|
{
|
||||||
|
{ "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
{ "401", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
{ "404", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
};
|
||||||
|
return await RequestAdapter.SendPrimitiveAsync<string>(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false);
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="global::Marechai.App.Models.GpuDto"/></returns>
|
||||||
|
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
|
||||||
|
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 400 status code</exception>
|
||||||
|
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||||
|
#nullable enable
|
||||||
|
public async Task<global::Marechai.App.Models.GpuDto?> GetAsync(Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public async Task<global::Marechai.App.Models.GpuDto> GetAsync(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
var requestInfo = ToGetRequestInformation(requestConfiguration);
|
||||||
|
var errorMapping = new Dictionary<string, ParsableFactory<IParsable>>
|
||||||
|
{
|
||||||
|
{ "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
};
|
||||||
|
return await RequestAdapter.SendAsync<global::Marechai.App.Models.GpuDto>(requestInfo, global::Marechai.App.Models.GpuDto.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false);
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="string"/></returns>
|
||||||
|
/// <param name="body">The request body</param>
|
||||||
|
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
|
||||||
|
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 400 status code</exception>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 401 status code</exception>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 404 status code</exception>
|
||||||
|
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||||
|
#nullable enable
|
||||||
|
public async Task<string?> PutAsync(global::Marechai.App.Models.GpuDto body, Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public async Task<string> PutAsync(global::Marechai.App.Models.GpuDto body, Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body));
|
||||||
|
var requestInfo = ToPutRequestInformation(body, requestConfiguration);
|
||||||
|
var errorMapping = new Dictionary<string, ParsableFactory<IParsable>>
|
||||||
|
{
|
||||||
|
{ "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
{ "401", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
{ "404", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
};
|
||||||
|
return await RequestAdapter.SendPrimitiveAsync<string>(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false);
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="RequestInformation"/></returns>
|
||||||
|
/// <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 ToDeleteRequestInformation(Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public RequestInformation ToDeleteRequestInformation(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters);
|
||||||
|
requestInfo.Configure(requestConfiguration);
|
||||||
|
requestInfo.Headers.TryAdd("Accept", "application/json, text/plain;q=0.9");
|
||||||
|
return requestInfo;
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="RequestInformation"/></returns>
|
||||||
|
/// <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<DefaultQueryParameters>>? requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters);
|
||||||
|
requestInfo.Configure(requestConfiguration);
|
||||||
|
requestInfo.Headers.TryAdd("Accept", "application/json, text/plain;q=0.9");
|
||||||
|
return requestInfo;
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="RequestInformation"/></returns>
|
||||||
|
/// <param name="body">The request body</param>
|
||||||
|
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||||
|
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||||
|
#nullable enable
|
||||||
|
public RequestInformation ToPutRequestInformation(global::Marechai.App.Models.GpuDto body, Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public RequestInformation ToPutRequestInformation(global::Marechai.App.Models.GpuDto body, Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body));
|
||||||
|
var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters);
|
||||||
|
requestInfo.Configure(requestConfiguration);
|
||||||
|
requestInfo.Headers.TryAdd("Accept", "application/json, text/plain;q=0.9");
|
||||||
|
requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body);
|
||||||
|
return requestInfo;
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>A <see cref="global::Marechai.App.Gpus.Item.GpusItemRequestBuilder"/></returns>
|
||||||
|
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||||
|
public global::Marechai.App.Gpus.Item.GpusItemRequestBuilder WithUrl(string rawUrl)
|
||||||
|
{
|
||||||
|
return new global::Marechai.App.Gpus.Item.GpusItemRequestBuilder(rawUrl, RequestAdapter);
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Configuration for the request such as headers, query parameters, and middleware options.
|
||||||
|
/// </summary>
|
||||||
|
[Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")]
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class GpusItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration<DefaultQueryParameters>
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Configuration for the request such as headers, query parameters, and middleware options.
|
||||||
|
/// </summary>
|
||||||
|
[Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")]
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class GpusItemRequestBuilderGetRequestConfiguration : RequestConfiguration<DefaultQueryParameters>
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Configuration for the request such as headers, query parameters, and middleware options.
|
||||||
|
/// </summary>
|
||||||
|
[Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")]
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class GpusItemRequestBuilderPutRequestConfiguration : RequestConfiguration<DefaultQueryParameters>
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#pragma warning restore CS0618
|
||||||
@@ -0,0 +1,175 @@
|
|||||||
|
// <auto-generated/>
|
||||||
|
#pragma warning disable CS0618
|
||||||
|
using Marechai.App.InstructionSetExtensions.Item;
|
||||||
|
using Marechai.App.InstructionSetExtensions.VerifyUnique;
|
||||||
|
using Marechai.App.Models;
|
||||||
|
using Microsoft.Kiota.Abstractions.Extensions;
|
||||||
|
using Microsoft.Kiota.Abstractions.Serialization;
|
||||||
|
using Microsoft.Kiota.Abstractions;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.IO;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Threading;
|
||||||
|
using System;
|
||||||
|
namespace Marechai.App.InstructionSetExtensions
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Builds and executes requests for operations under \instruction-set-extensions
|
||||||
|
/// </summary>
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class InstructionSetExtensionsRequestBuilder : BaseRequestBuilder
|
||||||
|
{
|
||||||
|
/// <summary>The verifyUnique property</summary>
|
||||||
|
public global::Marechai.App.InstructionSetExtensions.VerifyUnique.VerifyUniqueRequestBuilder VerifyUnique
|
||||||
|
{
|
||||||
|
get => new global::Marechai.App.InstructionSetExtensions.VerifyUnique.VerifyUniqueRequestBuilder(PathParameters, RequestAdapter);
|
||||||
|
}
|
||||||
|
/// <summary>Gets an item from the Marechai.App.instructionSetExtensions.item collection</summary>
|
||||||
|
/// <param name="position">Unique identifier of the item</param>
|
||||||
|
/// <returns>A <see cref="global::Marechai.App.InstructionSetExtensions.Item.InstructionSetExtensionsItemRequestBuilder"/></returns>
|
||||||
|
public global::Marechai.App.InstructionSetExtensions.Item.InstructionSetExtensionsItemRequestBuilder this[int position]
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
var urlTplParams = new Dictionary<string, object>(PathParameters);
|
||||||
|
urlTplParams.Add("id", position);
|
||||||
|
return new global::Marechai.App.InstructionSetExtensions.Item.InstructionSetExtensionsItemRequestBuilder(urlTplParams, RequestAdapter);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// <summary>Gets an item from the Marechai.App.instructionSetExtensions.item collection</summary>
|
||||||
|
/// <param name="position">Unique identifier of the item</param>
|
||||||
|
/// <returns>A <see cref="global::Marechai.App.InstructionSetExtensions.Item.InstructionSetExtensionsItemRequestBuilder"/></returns>
|
||||||
|
[Obsolete("This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead.")]
|
||||||
|
public global::Marechai.App.InstructionSetExtensions.Item.InstructionSetExtensionsItemRequestBuilder this[string position]
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
var urlTplParams = new Dictionary<string, object>(PathParameters);
|
||||||
|
if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("id", position);
|
||||||
|
return new global::Marechai.App.InstructionSetExtensions.Item.InstructionSetExtensionsItemRequestBuilder(urlTplParams, RequestAdapter);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Instantiates a new <see cref="global::Marechai.App.InstructionSetExtensions.InstructionSetExtensionsRequestBuilder"/> and sets the default values.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="pathParameters">Path parameters for the request</param>
|
||||||
|
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||||
|
public InstructionSetExtensionsRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/instruction-set-extensions", pathParameters)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Instantiates a new <see cref="global::Marechai.App.InstructionSetExtensions.InstructionSetExtensionsRequestBuilder"/> and sets the default values.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||||
|
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||||
|
public InstructionSetExtensionsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/instruction-set-extensions", rawUrl)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <returns>A List<global::Marechai.App.Models.InstructionSetExtensionDto></returns>
|
||||||
|
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
|
||||||
|
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 400 status code</exception>
|
||||||
|
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||||
|
#nullable enable
|
||||||
|
public async Task<List<global::Marechai.App.Models.InstructionSetExtensionDto>?> GetAsync(Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public async Task<List<global::Marechai.App.Models.InstructionSetExtensionDto>> GetAsync(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
var requestInfo = ToGetRequestInformation(requestConfiguration);
|
||||||
|
var errorMapping = new Dictionary<string, ParsableFactory<IParsable>>
|
||||||
|
{
|
||||||
|
{ "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
};
|
||||||
|
var collectionResult = await RequestAdapter.SendCollectionAsync<global::Marechai.App.Models.InstructionSetExtensionDto>(requestInfo, global::Marechai.App.Models.InstructionSetExtensionDto.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false);
|
||||||
|
return collectionResult?.AsList();
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="UntypedNode"/></returns>
|
||||||
|
/// <param name="body">The request body</param>
|
||||||
|
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
|
||||||
|
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 400 status code</exception>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 401 status code</exception>
|
||||||
|
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||||
|
#nullable enable
|
||||||
|
public async Task<UntypedNode?> PostAsync(global::Marechai.App.Models.InstructionSetExtensionDto body, Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public async Task<UntypedNode> PostAsync(global::Marechai.App.Models.InstructionSetExtensionDto body, Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body));
|
||||||
|
var requestInfo = ToPostRequestInformation(body, requestConfiguration);
|
||||||
|
var errorMapping = new Dictionary<string, ParsableFactory<IParsable>>
|
||||||
|
{
|
||||||
|
{ "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
{ "401", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
};
|
||||||
|
return await RequestAdapter.SendAsync<UntypedNode>(requestInfo, UntypedNode.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false);
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="RequestInformation"/></returns>
|
||||||
|
/// <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<DefaultQueryParameters>>? requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters);
|
||||||
|
requestInfo.Configure(requestConfiguration);
|
||||||
|
requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9");
|
||||||
|
return requestInfo;
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="RequestInformation"/></returns>
|
||||||
|
/// <param name="body">The request body</param>
|
||||||
|
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||||
|
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||||
|
#nullable enable
|
||||||
|
public RequestInformation ToPostRequestInformation(global::Marechai.App.Models.InstructionSetExtensionDto body, Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public RequestInformation ToPostRequestInformation(global::Marechai.App.Models.InstructionSetExtensionDto body, Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body));
|
||||||
|
var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters);
|
||||||
|
requestInfo.Configure(requestConfiguration);
|
||||||
|
requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9");
|
||||||
|
requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body);
|
||||||
|
return requestInfo;
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>A <see cref="global::Marechai.App.InstructionSetExtensions.InstructionSetExtensionsRequestBuilder"/></returns>
|
||||||
|
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||||
|
public global::Marechai.App.InstructionSetExtensions.InstructionSetExtensionsRequestBuilder WithUrl(string rawUrl)
|
||||||
|
{
|
||||||
|
return new global::Marechai.App.InstructionSetExtensions.InstructionSetExtensionsRequestBuilder(rawUrl, RequestAdapter);
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Configuration for the request such as headers, query parameters, and middleware options.
|
||||||
|
/// </summary>
|
||||||
|
[Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")]
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class InstructionSetExtensionsRequestBuilderGetRequestConfiguration : RequestConfiguration<DefaultQueryParameters>
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Configuration for the request such as headers, query parameters, and middleware options.
|
||||||
|
/// </summary>
|
||||||
|
[Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")]
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class InstructionSetExtensionsRequestBuilderPostRequestConfiguration : RequestConfiguration<DefaultQueryParameters>
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#pragma warning restore CS0618
|
||||||
@@ -0,0 +1,192 @@
|
|||||||
|
// <auto-generated/>
|
||||||
|
#pragma warning disable CS0618
|
||||||
|
using Marechai.App.Models;
|
||||||
|
using Microsoft.Kiota.Abstractions.Extensions;
|
||||||
|
using Microsoft.Kiota.Abstractions.Serialization;
|
||||||
|
using Microsoft.Kiota.Abstractions;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.IO;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Threading;
|
||||||
|
using System;
|
||||||
|
namespace Marechai.App.InstructionSetExtensions.Item
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Builds and executes requests for operations under \instruction-set-extensions\{id}
|
||||||
|
/// </summary>
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class InstructionSetExtensionsItemRequestBuilder : BaseRequestBuilder
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Instantiates a new <see cref="global::Marechai.App.InstructionSetExtensions.Item.InstructionSetExtensionsItemRequestBuilder"/> and sets the default values.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="pathParameters">Path parameters for the request</param>
|
||||||
|
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||||
|
public InstructionSetExtensionsItemRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/instruction-set-extensions/{id}", pathParameters)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Instantiates a new <see cref="global::Marechai.App.InstructionSetExtensions.Item.InstructionSetExtensionsItemRequestBuilder"/> and sets the default values.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||||
|
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||||
|
public InstructionSetExtensionsItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/instruction-set-extensions/{id}", rawUrl)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="string"/></returns>
|
||||||
|
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
|
||||||
|
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 400 status code</exception>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 401 status code</exception>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 404 status code</exception>
|
||||||
|
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||||
|
#nullable enable
|
||||||
|
public async Task<string?> DeleteAsync(Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public async Task<string> DeleteAsync(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
var requestInfo = ToDeleteRequestInformation(requestConfiguration);
|
||||||
|
var errorMapping = new Dictionary<string, ParsableFactory<IParsable>>
|
||||||
|
{
|
||||||
|
{ "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
{ "401", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
{ "404", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
};
|
||||||
|
return await RequestAdapter.SendPrimitiveAsync<string>(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false);
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="global::Marechai.App.Models.InstructionSetExtensionDto"/></returns>
|
||||||
|
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
|
||||||
|
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 400 status code</exception>
|
||||||
|
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||||
|
#nullable enable
|
||||||
|
public async Task<global::Marechai.App.Models.InstructionSetExtensionDto?> GetAsync(Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public async Task<global::Marechai.App.Models.InstructionSetExtensionDto> GetAsync(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
var requestInfo = ToGetRequestInformation(requestConfiguration);
|
||||||
|
var errorMapping = new Dictionary<string, ParsableFactory<IParsable>>
|
||||||
|
{
|
||||||
|
{ "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
};
|
||||||
|
return await RequestAdapter.SendAsync<global::Marechai.App.Models.InstructionSetExtensionDto>(requestInfo, global::Marechai.App.Models.InstructionSetExtensionDto.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false);
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="string"/></returns>
|
||||||
|
/// <param name="body">The request body</param>
|
||||||
|
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
|
||||||
|
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 400 status code</exception>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 401 status code</exception>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 404 status code</exception>
|
||||||
|
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||||
|
#nullable enable
|
||||||
|
public async Task<string?> PutAsync(global::Marechai.App.Models.InstructionSetExtensionDto body, Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public async Task<string> PutAsync(global::Marechai.App.Models.InstructionSetExtensionDto body, Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body));
|
||||||
|
var requestInfo = ToPutRequestInformation(body, requestConfiguration);
|
||||||
|
var errorMapping = new Dictionary<string, ParsableFactory<IParsable>>
|
||||||
|
{
|
||||||
|
{ "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
{ "401", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
{ "404", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
};
|
||||||
|
return await RequestAdapter.SendPrimitiveAsync<string>(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false);
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="RequestInformation"/></returns>
|
||||||
|
/// <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 ToDeleteRequestInformation(Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public RequestInformation ToDeleteRequestInformation(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters);
|
||||||
|
requestInfo.Configure(requestConfiguration);
|
||||||
|
requestInfo.Headers.TryAdd("Accept", "application/json, text/plain;q=0.9");
|
||||||
|
return requestInfo;
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="RequestInformation"/></returns>
|
||||||
|
/// <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<DefaultQueryParameters>>? requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters);
|
||||||
|
requestInfo.Configure(requestConfiguration);
|
||||||
|
requestInfo.Headers.TryAdd("Accept", "application/json, text/plain;q=0.9");
|
||||||
|
return requestInfo;
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="RequestInformation"/></returns>
|
||||||
|
/// <param name="body">The request body</param>
|
||||||
|
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||||
|
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||||
|
#nullable enable
|
||||||
|
public RequestInformation ToPutRequestInformation(global::Marechai.App.Models.InstructionSetExtensionDto body, Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public RequestInformation ToPutRequestInformation(global::Marechai.App.Models.InstructionSetExtensionDto body, Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body));
|
||||||
|
var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters);
|
||||||
|
requestInfo.Configure(requestConfiguration);
|
||||||
|
requestInfo.Headers.TryAdd("Accept", "application/json, text/plain;q=0.9");
|
||||||
|
requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body);
|
||||||
|
return requestInfo;
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>A <see cref="global::Marechai.App.InstructionSetExtensions.Item.InstructionSetExtensionsItemRequestBuilder"/></returns>
|
||||||
|
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||||
|
public global::Marechai.App.InstructionSetExtensions.Item.InstructionSetExtensionsItemRequestBuilder WithUrl(string rawUrl)
|
||||||
|
{
|
||||||
|
return new global::Marechai.App.InstructionSetExtensions.Item.InstructionSetExtensionsItemRequestBuilder(rawUrl, RequestAdapter);
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Configuration for the request such as headers, query parameters, and middleware options.
|
||||||
|
/// </summary>
|
||||||
|
[Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")]
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class InstructionSetExtensionsItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration<DefaultQueryParameters>
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Configuration for the request such as headers, query parameters, and middleware options.
|
||||||
|
/// </summary>
|
||||||
|
[Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")]
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class InstructionSetExtensionsItemRequestBuilderGetRequestConfiguration : RequestConfiguration<DefaultQueryParameters>
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Configuration for the request such as headers, query parameters, and middleware options.
|
||||||
|
/// </summary>
|
||||||
|
[Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")]
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class InstructionSetExtensionsItemRequestBuilderPutRequestConfiguration : RequestConfiguration<DefaultQueryParameters>
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#pragma warning restore CS0618
|
||||||
@@ -0,0 +1,91 @@
|
|||||||
|
// <auto-generated/>
|
||||||
|
#pragma warning disable CS0618
|
||||||
|
using Marechai.App.Models;
|
||||||
|
using Microsoft.Kiota.Abstractions.Extensions;
|
||||||
|
using Microsoft.Kiota.Abstractions.Serialization;
|
||||||
|
using Microsoft.Kiota.Abstractions;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.IO;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Threading;
|
||||||
|
using System;
|
||||||
|
namespace Marechai.App.InstructionSetExtensions.VerifyUnique.Item
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Builds and executes requests for operations under \instruction-set-extensions\verify-unique\{extension}
|
||||||
|
/// </summary>
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class WithExtensionItemRequestBuilder : BaseRequestBuilder
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Instantiates a new <see cref="global::Marechai.App.InstructionSetExtensions.VerifyUnique.Item.WithExtensionItemRequestBuilder"/> and sets the default values.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="pathParameters">Path parameters for the request</param>
|
||||||
|
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||||
|
public WithExtensionItemRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/instruction-set-extensions/verify-unique/{extension}", pathParameters)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Instantiates a new <see cref="global::Marechai.App.InstructionSetExtensions.VerifyUnique.Item.WithExtensionItemRequestBuilder"/> and sets the default values.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||||
|
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||||
|
public WithExtensionItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/instruction-set-extensions/verify-unique/{extension}", rawUrl)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="bool"/></returns>
|
||||||
|
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
|
||||||
|
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 400 status code</exception>
|
||||||
|
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||||
|
#nullable enable
|
||||||
|
public async Task<bool?> GetAsync(Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public async Task<bool?> GetAsync(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
var requestInfo = ToGetRequestInformation(requestConfiguration);
|
||||||
|
var errorMapping = new Dictionary<string, ParsableFactory<IParsable>>
|
||||||
|
{
|
||||||
|
{ "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
};
|
||||||
|
return await RequestAdapter.SendPrimitiveAsync<bool?>(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false);
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="RequestInformation"/></returns>
|
||||||
|
/// <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<DefaultQueryParameters>>? requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters);
|
||||||
|
requestInfo.Configure(requestConfiguration);
|
||||||
|
requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9");
|
||||||
|
return requestInfo;
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>A <see cref="global::Marechai.App.InstructionSetExtensions.VerifyUnique.Item.WithExtensionItemRequestBuilder"/></returns>
|
||||||
|
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||||
|
public global::Marechai.App.InstructionSetExtensions.VerifyUnique.Item.WithExtensionItemRequestBuilder WithUrl(string rawUrl)
|
||||||
|
{
|
||||||
|
return new global::Marechai.App.InstructionSetExtensions.VerifyUnique.Item.WithExtensionItemRequestBuilder(rawUrl, RequestAdapter);
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Configuration for the request such as headers, query parameters, and middleware options.
|
||||||
|
/// </summary>
|
||||||
|
[Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")]
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class WithExtensionItemRequestBuilderGetRequestConfiguration : RequestConfiguration<DefaultQueryParameters>
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#pragma warning restore CS0618
|
||||||
@@ -0,0 +1,48 @@
|
|||||||
|
// <auto-generated/>
|
||||||
|
#pragma warning disable CS0618
|
||||||
|
using Marechai.App.InstructionSetExtensions.VerifyUnique.Item;
|
||||||
|
using Microsoft.Kiota.Abstractions.Extensions;
|
||||||
|
using Microsoft.Kiota.Abstractions;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.IO;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System;
|
||||||
|
namespace Marechai.App.InstructionSetExtensions.VerifyUnique
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Builds and executes requests for operations under \instruction-set-extensions\verify-unique
|
||||||
|
/// </summary>
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class VerifyUniqueRequestBuilder : BaseRequestBuilder
|
||||||
|
{
|
||||||
|
/// <summary>Gets an item from the Marechai.App.instructionSetExtensions.verifyUnique.item collection</summary>
|
||||||
|
/// <param name="position">Unique identifier of the item</param>
|
||||||
|
/// <returns>A <see cref="global::Marechai.App.InstructionSetExtensions.VerifyUnique.Item.WithExtensionItemRequestBuilder"/></returns>
|
||||||
|
public global::Marechai.App.InstructionSetExtensions.VerifyUnique.Item.WithExtensionItemRequestBuilder this[string position]
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
var urlTplParams = new Dictionary<string, object>(PathParameters);
|
||||||
|
urlTplParams.Add("extension", position);
|
||||||
|
return new global::Marechai.App.InstructionSetExtensions.VerifyUnique.Item.WithExtensionItemRequestBuilder(urlTplParams, RequestAdapter);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Instantiates a new <see cref="global::Marechai.App.InstructionSetExtensions.VerifyUnique.VerifyUniqueRequestBuilder"/> and sets the default values.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="pathParameters">Path parameters for the request</param>
|
||||||
|
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||||
|
public VerifyUniqueRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/instruction-set-extensions/verify-unique", pathParameters)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Instantiates a new <see cref="global::Marechai.App.InstructionSetExtensions.VerifyUnique.VerifyUniqueRequestBuilder"/> and sets the default values.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||||
|
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||||
|
public VerifyUniqueRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/instruction-set-extensions/verify-unique", rawUrl)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#pragma warning restore CS0618
|
||||||
@@ -0,0 +1,124 @@
|
|||||||
|
// <auto-generated/>
|
||||||
|
#pragma warning disable CS0618
|
||||||
|
using Marechai.App.InstructionSetExtensionsByProcessor.Item;
|
||||||
|
using Marechai.App.Models;
|
||||||
|
using Microsoft.Kiota.Abstractions.Extensions;
|
||||||
|
using Microsoft.Kiota.Abstractions.Serialization;
|
||||||
|
using Microsoft.Kiota.Abstractions;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.IO;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Threading;
|
||||||
|
using System;
|
||||||
|
namespace Marechai.App.InstructionSetExtensionsByProcessor
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Builds and executes requests for operations under \instruction-set-extensions-by-processor
|
||||||
|
/// </summary>
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class InstructionSetExtensionsByProcessorRequestBuilder : BaseRequestBuilder
|
||||||
|
{
|
||||||
|
/// <summary>Gets an item from the Marechai.App.instructionSetExtensionsByProcessor.item collection</summary>
|
||||||
|
/// <param name="position">Unique identifier of the item</param>
|
||||||
|
/// <returns>A <see cref="global::Marechai.App.InstructionSetExtensionsByProcessor.Item.InstructionSetExtensionsByProcessorItemRequestBuilder"/></returns>
|
||||||
|
public global::Marechai.App.InstructionSetExtensionsByProcessor.Item.InstructionSetExtensionsByProcessorItemRequestBuilder this[int position]
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
var urlTplParams = new Dictionary<string, object>(PathParameters);
|
||||||
|
urlTplParams.Add("id", position);
|
||||||
|
return new global::Marechai.App.InstructionSetExtensionsByProcessor.Item.InstructionSetExtensionsByProcessorItemRequestBuilder(urlTplParams, RequestAdapter);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// <summary>Gets an item from the Marechai.App.instructionSetExtensionsByProcessor.item collection</summary>
|
||||||
|
/// <param name="position">Unique identifier of the item</param>
|
||||||
|
/// <returns>A <see cref="global::Marechai.App.InstructionSetExtensionsByProcessor.Item.InstructionSetExtensionsByProcessorItemRequestBuilder"/></returns>
|
||||||
|
[Obsolete("This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead.")]
|
||||||
|
public global::Marechai.App.InstructionSetExtensionsByProcessor.Item.InstructionSetExtensionsByProcessorItemRequestBuilder this[string position]
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
var urlTplParams = new Dictionary<string, object>(PathParameters);
|
||||||
|
if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("id", position);
|
||||||
|
return new global::Marechai.App.InstructionSetExtensionsByProcessor.Item.InstructionSetExtensionsByProcessorItemRequestBuilder(urlTplParams, RequestAdapter);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Instantiates a new <see cref="global::Marechai.App.InstructionSetExtensionsByProcessor.InstructionSetExtensionsByProcessorRequestBuilder"/> and sets the default values.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="pathParameters">Path parameters for the request</param>
|
||||||
|
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||||
|
public InstructionSetExtensionsByProcessorRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/instruction-set-extensions-by-processor", pathParameters)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Instantiates a new <see cref="global::Marechai.App.InstructionSetExtensionsByProcessor.InstructionSetExtensionsByProcessorRequestBuilder"/> and sets the default values.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||||
|
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||||
|
public InstructionSetExtensionsByProcessorRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/instruction-set-extensions-by-processor", rawUrl)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="UntypedNode"/></returns>
|
||||||
|
/// <param name="body">The request body</param>
|
||||||
|
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
|
||||||
|
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 400 status code</exception>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 401 status code</exception>
|
||||||
|
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||||
|
#nullable enable
|
||||||
|
public async Task<UntypedNode?> PostAsync(global::Marechai.App.Models.InstructionSetExtensionByProcessorDto body, Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public async Task<UntypedNode> PostAsync(global::Marechai.App.Models.InstructionSetExtensionByProcessorDto body, Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body));
|
||||||
|
var requestInfo = ToPostRequestInformation(body, requestConfiguration);
|
||||||
|
var errorMapping = new Dictionary<string, ParsableFactory<IParsable>>
|
||||||
|
{
|
||||||
|
{ "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
{ "401", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
};
|
||||||
|
return await RequestAdapter.SendAsync<UntypedNode>(requestInfo, UntypedNode.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false);
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="RequestInformation"/></returns>
|
||||||
|
/// <param name="body">The request body</param>
|
||||||
|
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||||
|
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||||
|
#nullable enable
|
||||||
|
public RequestInformation ToPostRequestInformation(global::Marechai.App.Models.InstructionSetExtensionByProcessorDto body, Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public RequestInformation ToPostRequestInformation(global::Marechai.App.Models.InstructionSetExtensionByProcessorDto body, Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body));
|
||||||
|
var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters);
|
||||||
|
requestInfo.Configure(requestConfiguration);
|
||||||
|
requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9");
|
||||||
|
requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body);
|
||||||
|
return requestInfo;
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>A <see cref="global::Marechai.App.InstructionSetExtensionsByProcessor.InstructionSetExtensionsByProcessorRequestBuilder"/></returns>
|
||||||
|
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||||
|
public global::Marechai.App.InstructionSetExtensionsByProcessor.InstructionSetExtensionsByProcessorRequestBuilder WithUrl(string rawUrl)
|
||||||
|
{
|
||||||
|
return new global::Marechai.App.InstructionSetExtensionsByProcessor.InstructionSetExtensionsByProcessorRequestBuilder(rawUrl, RequestAdapter);
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Configuration for the request such as headers, query parameters, and middleware options.
|
||||||
|
/// </summary>
|
||||||
|
[Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")]
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class InstructionSetExtensionsByProcessorRequestBuilderPostRequestConfiguration : RequestConfiguration<DefaultQueryParameters>
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#pragma warning restore CS0618
|
||||||
@@ -0,0 +1,95 @@
|
|||||||
|
// <auto-generated/>
|
||||||
|
#pragma warning disable CS0618
|
||||||
|
using Marechai.App.Models;
|
||||||
|
using Microsoft.Kiota.Abstractions.Extensions;
|
||||||
|
using Microsoft.Kiota.Abstractions.Serialization;
|
||||||
|
using Microsoft.Kiota.Abstractions;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.IO;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Threading;
|
||||||
|
using System;
|
||||||
|
namespace Marechai.App.InstructionSetExtensionsByProcessor.Item
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Builds and executes requests for operations under \instruction-set-extensions-by-processor\{id}
|
||||||
|
/// </summary>
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class InstructionSetExtensionsByProcessorItemRequestBuilder : BaseRequestBuilder
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Instantiates a new <see cref="global::Marechai.App.InstructionSetExtensionsByProcessor.Item.InstructionSetExtensionsByProcessorItemRequestBuilder"/> and sets the default values.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="pathParameters">Path parameters for the request</param>
|
||||||
|
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||||
|
public InstructionSetExtensionsByProcessorItemRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/instruction-set-extensions-by-processor/{id}", pathParameters)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Instantiates a new <see cref="global::Marechai.App.InstructionSetExtensionsByProcessor.Item.InstructionSetExtensionsByProcessorItemRequestBuilder"/> and sets the default values.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||||
|
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||||
|
public InstructionSetExtensionsByProcessorItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/instruction-set-extensions-by-processor/{id}", rawUrl)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="string"/></returns>
|
||||||
|
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
|
||||||
|
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 400 status code</exception>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 401 status code</exception>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 404 status code</exception>
|
||||||
|
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||||
|
#nullable enable
|
||||||
|
public async Task<string?> DeleteAsync(Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public async Task<string> DeleteAsync(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
var requestInfo = ToDeleteRequestInformation(requestConfiguration);
|
||||||
|
var errorMapping = new Dictionary<string, ParsableFactory<IParsable>>
|
||||||
|
{
|
||||||
|
{ "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
{ "401", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
{ "404", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
};
|
||||||
|
return await RequestAdapter.SendPrimitiveAsync<string>(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false);
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="RequestInformation"/></returns>
|
||||||
|
/// <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 ToDeleteRequestInformation(Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public RequestInformation ToDeleteRequestInformation(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters);
|
||||||
|
requestInfo.Configure(requestConfiguration);
|
||||||
|
requestInfo.Headers.TryAdd("Accept", "application/json, text/plain;q=0.9");
|
||||||
|
return requestInfo;
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>A <see cref="global::Marechai.App.InstructionSetExtensionsByProcessor.Item.InstructionSetExtensionsByProcessorItemRequestBuilder"/></returns>
|
||||||
|
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||||
|
public global::Marechai.App.InstructionSetExtensionsByProcessor.Item.InstructionSetExtensionsByProcessorItemRequestBuilder WithUrl(string rawUrl)
|
||||||
|
{
|
||||||
|
return new global::Marechai.App.InstructionSetExtensionsByProcessor.Item.InstructionSetExtensionsByProcessorItemRequestBuilder(rawUrl, RequestAdapter);
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Configuration for the request such as headers, query parameters, and middleware options.
|
||||||
|
/// </summary>
|
||||||
|
[Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")]
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class InstructionSetExtensionsByProcessorItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration<DefaultQueryParameters>
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#pragma warning restore CS0618
|
||||||
@@ -0,0 +1,175 @@
|
|||||||
|
// <auto-generated/>
|
||||||
|
#pragma warning disable CS0618
|
||||||
|
using Marechai.App.InstructionSets.Item;
|
||||||
|
using Marechai.App.InstructionSets.VerifyUnique;
|
||||||
|
using Marechai.App.Models;
|
||||||
|
using Microsoft.Kiota.Abstractions.Extensions;
|
||||||
|
using Microsoft.Kiota.Abstractions.Serialization;
|
||||||
|
using Microsoft.Kiota.Abstractions;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.IO;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Threading;
|
||||||
|
using System;
|
||||||
|
namespace Marechai.App.InstructionSets
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Builds and executes requests for operations under \instruction-sets
|
||||||
|
/// </summary>
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class InstructionSetsRequestBuilder : BaseRequestBuilder
|
||||||
|
{
|
||||||
|
/// <summary>The verifyUnique property</summary>
|
||||||
|
public global::Marechai.App.InstructionSets.VerifyUnique.VerifyUniqueRequestBuilder VerifyUnique
|
||||||
|
{
|
||||||
|
get => new global::Marechai.App.InstructionSets.VerifyUnique.VerifyUniqueRequestBuilder(PathParameters, RequestAdapter);
|
||||||
|
}
|
||||||
|
/// <summary>Gets an item from the Marechai.App.instructionSets.item collection</summary>
|
||||||
|
/// <param name="position">Unique identifier of the item</param>
|
||||||
|
/// <returns>A <see cref="global::Marechai.App.InstructionSets.Item.InstructionSetsItemRequestBuilder"/></returns>
|
||||||
|
public global::Marechai.App.InstructionSets.Item.InstructionSetsItemRequestBuilder this[int position]
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
var urlTplParams = new Dictionary<string, object>(PathParameters);
|
||||||
|
urlTplParams.Add("id", position);
|
||||||
|
return new global::Marechai.App.InstructionSets.Item.InstructionSetsItemRequestBuilder(urlTplParams, RequestAdapter);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// <summary>Gets an item from the Marechai.App.instructionSets.item collection</summary>
|
||||||
|
/// <param name="position">Unique identifier of the item</param>
|
||||||
|
/// <returns>A <see cref="global::Marechai.App.InstructionSets.Item.InstructionSetsItemRequestBuilder"/></returns>
|
||||||
|
[Obsolete("This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead.")]
|
||||||
|
public global::Marechai.App.InstructionSets.Item.InstructionSetsItemRequestBuilder this[string position]
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
var urlTplParams = new Dictionary<string, object>(PathParameters);
|
||||||
|
if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("id", position);
|
||||||
|
return new global::Marechai.App.InstructionSets.Item.InstructionSetsItemRequestBuilder(urlTplParams, RequestAdapter);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Instantiates a new <see cref="global::Marechai.App.InstructionSets.InstructionSetsRequestBuilder"/> and sets the default values.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="pathParameters">Path parameters for the request</param>
|
||||||
|
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||||
|
public InstructionSetsRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/instruction-sets", pathParameters)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Instantiates a new <see cref="global::Marechai.App.InstructionSets.InstructionSetsRequestBuilder"/> and sets the default values.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||||
|
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||||
|
public InstructionSetsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/instruction-sets", rawUrl)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <returns>A List<global::Marechai.App.Models.InstructionSetDto></returns>
|
||||||
|
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
|
||||||
|
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 400 status code</exception>
|
||||||
|
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||||
|
#nullable enable
|
||||||
|
public async Task<List<global::Marechai.App.Models.InstructionSetDto>?> GetAsync(Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public async Task<List<global::Marechai.App.Models.InstructionSetDto>> GetAsync(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
var requestInfo = ToGetRequestInformation(requestConfiguration);
|
||||||
|
var errorMapping = new Dictionary<string, ParsableFactory<IParsable>>
|
||||||
|
{
|
||||||
|
{ "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
};
|
||||||
|
var collectionResult = await RequestAdapter.SendCollectionAsync<global::Marechai.App.Models.InstructionSetDto>(requestInfo, global::Marechai.App.Models.InstructionSetDto.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false);
|
||||||
|
return collectionResult?.AsList();
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="UntypedNode"/></returns>
|
||||||
|
/// <param name="body">The request body</param>
|
||||||
|
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
|
||||||
|
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 400 status code</exception>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 401 status code</exception>
|
||||||
|
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||||
|
#nullable enable
|
||||||
|
public async Task<UntypedNode?> PostAsync(global::Marechai.App.Models.InstructionSetDto body, Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public async Task<UntypedNode> PostAsync(global::Marechai.App.Models.InstructionSetDto body, Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body));
|
||||||
|
var requestInfo = ToPostRequestInformation(body, requestConfiguration);
|
||||||
|
var errorMapping = new Dictionary<string, ParsableFactory<IParsable>>
|
||||||
|
{
|
||||||
|
{ "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
{ "401", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
};
|
||||||
|
return await RequestAdapter.SendAsync<UntypedNode>(requestInfo, UntypedNode.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false);
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="RequestInformation"/></returns>
|
||||||
|
/// <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<DefaultQueryParameters>>? requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters);
|
||||||
|
requestInfo.Configure(requestConfiguration);
|
||||||
|
requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9");
|
||||||
|
return requestInfo;
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="RequestInformation"/></returns>
|
||||||
|
/// <param name="body">The request body</param>
|
||||||
|
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||||
|
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||||
|
#nullable enable
|
||||||
|
public RequestInformation ToPostRequestInformation(global::Marechai.App.Models.InstructionSetDto body, Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public RequestInformation ToPostRequestInformation(global::Marechai.App.Models.InstructionSetDto body, Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body));
|
||||||
|
var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters);
|
||||||
|
requestInfo.Configure(requestConfiguration);
|
||||||
|
requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9");
|
||||||
|
requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body);
|
||||||
|
return requestInfo;
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>A <see cref="global::Marechai.App.InstructionSets.InstructionSetsRequestBuilder"/></returns>
|
||||||
|
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||||
|
public global::Marechai.App.InstructionSets.InstructionSetsRequestBuilder WithUrl(string rawUrl)
|
||||||
|
{
|
||||||
|
return new global::Marechai.App.InstructionSets.InstructionSetsRequestBuilder(rawUrl, RequestAdapter);
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Configuration for the request such as headers, query parameters, and middleware options.
|
||||||
|
/// </summary>
|
||||||
|
[Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")]
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class InstructionSetsRequestBuilderGetRequestConfiguration : RequestConfiguration<DefaultQueryParameters>
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Configuration for the request such as headers, query parameters, and middleware options.
|
||||||
|
/// </summary>
|
||||||
|
[Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")]
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class InstructionSetsRequestBuilderPostRequestConfiguration : RequestConfiguration<DefaultQueryParameters>
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#pragma warning restore CS0618
|
||||||
@@ -0,0 +1,192 @@
|
|||||||
|
// <auto-generated/>
|
||||||
|
#pragma warning disable CS0618
|
||||||
|
using Marechai.App.Models;
|
||||||
|
using Microsoft.Kiota.Abstractions.Extensions;
|
||||||
|
using Microsoft.Kiota.Abstractions.Serialization;
|
||||||
|
using Microsoft.Kiota.Abstractions;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.IO;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Threading;
|
||||||
|
using System;
|
||||||
|
namespace Marechai.App.InstructionSets.Item
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Builds and executes requests for operations under \instruction-sets\{id}
|
||||||
|
/// </summary>
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class InstructionSetsItemRequestBuilder : BaseRequestBuilder
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Instantiates a new <see cref="global::Marechai.App.InstructionSets.Item.InstructionSetsItemRequestBuilder"/> and sets the default values.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="pathParameters">Path parameters for the request</param>
|
||||||
|
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||||
|
public InstructionSetsItemRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/instruction-sets/{id}", pathParameters)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Instantiates a new <see cref="global::Marechai.App.InstructionSets.Item.InstructionSetsItemRequestBuilder"/> and sets the default values.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||||
|
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||||
|
public InstructionSetsItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/instruction-sets/{id}", rawUrl)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="string"/></returns>
|
||||||
|
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
|
||||||
|
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 400 status code</exception>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 401 status code</exception>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 404 status code</exception>
|
||||||
|
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||||
|
#nullable enable
|
||||||
|
public async Task<string?> DeleteAsync(Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public async Task<string> DeleteAsync(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
var requestInfo = ToDeleteRequestInformation(requestConfiguration);
|
||||||
|
var errorMapping = new Dictionary<string, ParsableFactory<IParsable>>
|
||||||
|
{
|
||||||
|
{ "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
{ "401", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
{ "404", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
};
|
||||||
|
return await RequestAdapter.SendPrimitiveAsync<string>(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false);
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="global::Marechai.App.Models.InstructionSetDto"/></returns>
|
||||||
|
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
|
||||||
|
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 400 status code</exception>
|
||||||
|
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||||
|
#nullable enable
|
||||||
|
public async Task<global::Marechai.App.Models.InstructionSetDto?> GetAsync(Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public async Task<global::Marechai.App.Models.InstructionSetDto> GetAsync(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
var requestInfo = ToGetRequestInformation(requestConfiguration);
|
||||||
|
var errorMapping = new Dictionary<string, ParsableFactory<IParsable>>
|
||||||
|
{
|
||||||
|
{ "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
};
|
||||||
|
return await RequestAdapter.SendAsync<global::Marechai.App.Models.InstructionSetDto>(requestInfo, global::Marechai.App.Models.InstructionSetDto.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false);
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="string"/></returns>
|
||||||
|
/// <param name="body">The request body</param>
|
||||||
|
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
|
||||||
|
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 400 status code</exception>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 401 status code</exception>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 404 status code</exception>
|
||||||
|
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||||
|
#nullable enable
|
||||||
|
public async Task<string?> PutAsync(global::Marechai.App.Models.InstructionSetDto body, Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public async Task<string> PutAsync(global::Marechai.App.Models.InstructionSetDto body, Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body));
|
||||||
|
var requestInfo = ToPutRequestInformation(body, requestConfiguration);
|
||||||
|
var errorMapping = new Dictionary<string, ParsableFactory<IParsable>>
|
||||||
|
{
|
||||||
|
{ "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
{ "401", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
{ "404", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
};
|
||||||
|
return await RequestAdapter.SendPrimitiveAsync<string>(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false);
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="RequestInformation"/></returns>
|
||||||
|
/// <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 ToDeleteRequestInformation(Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public RequestInformation ToDeleteRequestInformation(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters);
|
||||||
|
requestInfo.Configure(requestConfiguration);
|
||||||
|
requestInfo.Headers.TryAdd("Accept", "application/json, text/plain;q=0.9");
|
||||||
|
return requestInfo;
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="RequestInformation"/></returns>
|
||||||
|
/// <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<DefaultQueryParameters>>? requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters);
|
||||||
|
requestInfo.Configure(requestConfiguration);
|
||||||
|
requestInfo.Headers.TryAdd("Accept", "application/json, text/plain;q=0.9");
|
||||||
|
return requestInfo;
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="RequestInformation"/></returns>
|
||||||
|
/// <param name="body">The request body</param>
|
||||||
|
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||||
|
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||||
|
#nullable enable
|
||||||
|
public RequestInformation ToPutRequestInformation(global::Marechai.App.Models.InstructionSetDto body, Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public RequestInformation ToPutRequestInformation(global::Marechai.App.Models.InstructionSetDto body, Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body));
|
||||||
|
var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters);
|
||||||
|
requestInfo.Configure(requestConfiguration);
|
||||||
|
requestInfo.Headers.TryAdd("Accept", "application/json, text/plain;q=0.9");
|
||||||
|
requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body);
|
||||||
|
return requestInfo;
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>A <see cref="global::Marechai.App.InstructionSets.Item.InstructionSetsItemRequestBuilder"/></returns>
|
||||||
|
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||||
|
public global::Marechai.App.InstructionSets.Item.InstructionSetsItemRequestBuilder WithUrl(string rawUrl)
|
||||||
|
{
|
||||||
|
return new global::Marechai.App.InstructionSets.Item.InstructionSetsItemRequestBuilder(rawUrl, RequestAdapter);
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Configuration for the request such as headers, query parameters, and middleware options.
|
||||||
|
/// </summary>
|
||||||
|
[Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")]
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class InstructionSetsItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration<DefaultQueryParameters>
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Configuration for the request such as headers, query parameters, and middleware options.
|
||||||
|
/// </summary>
|
||||||
|
[Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")]
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class InstructionSetsItemRequestBuilderGetRequestConfiguration : RequestConfiguration<DefaultQueryParameters>
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Configuration for the request such as headers, query parameters, and middleware options.
|
||||||
|
/// </summary>
|
||||||
|
[Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")]
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class InstructionSetsItemRequestBuilderPutRequestConfiguration : RequestConfiguration<DefaultQueryParameters>
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#pragma warning restore CS0618
|
||||||
@@ -0,0 +1,91 @@
|
|||||||
|
// <auto-generated/>
|
||||||
|
#pragma warning disable CS0618
|
||||||
|
using Marechai.App.Models;
|
||||||
|
using Microsoft.Kiota.Abstractions.Extensions;
|
||||||
|
using Microsoft.Kiota.Abstractions.Serialization;
|
||||||
|
using Microsoft.Kiota.Abstractions;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.IO;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Threading;
|
||||||
|
using System;
|
||||||
|
namespace Marechai.App.InstructionSets.VerifyUnique.Item
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Builds and executes requests for operations under \instruction-sets\verify-unique\{name}
|
||||||
|
/// </summary>
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class WithNameItemRequestBuilder : BaseRequestBuilder
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Instantiates a new <see cref="global::Marechai.App.InstructionSets.VerifyUnique.Item.WithNameItemRequestBuilder"/> and sets the default values.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="pathParameters">Path parameters for the request</param>
|
||||||
|
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||||
|
public WithNameItemRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/instruction-sets/verify-unique/{name}", pathParameters)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Instantiates a new <see cref="global::Marechai.App.InstructionSets.VerifyUnique.Item.WithNameItemRequestBuilder"/> and sets the default values.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||||
|
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||||
|
public WithNameItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/instruction-sets/verify-unique/{name}", rawUrl)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="bool"/></returns>
|
||||||
|
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
|
||||||
|
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 400 status code</exception>
|
||||||
|
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||||
|
#nullable enable
|
||||||
|
public async Task<bool?> GetAsync(Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public async Task<bool?> GetAsync(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
var requestInfo = ToGetRequestInformation(requestConfiguration);
|
||||||
|
var errorMapping = new Dictionary<string, ParsableFactory<IParsable>>
|
||||||
|
{
|
||||||
|
{ "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
};
|
||||||
|
return await RequestAdapter.SendPrimitiveAsync<bool?>(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false);
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="RequestInformation"/></returns>
|
||||||
|
/// <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<DefaultQueryParameters>>? requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters);
|
||||||
|
requestInfo.Configure(requestConfiguration);
|
||||||
|
requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9");
|
||||||
|
return requestInfo;
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>A <see cref="global::Marechai.App.InstructionSets.VerifyUnique.Item.WithNameItemRequestBuilder"/></returns>
|
||||||
|
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||||
|
public global::Marechai.App.InstructionSets.VerifyUnique.Item.WithNameItemRequestBuilder WithUrl(string rawUrl)
|
||||||
|
{
|
||||||
|
return new global::Marechai.App.InstructionSets.VerifyUnique.Item.WithNameItemRequestBuilder(rawUrl, RequestAdapter);
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Configuration for the request such as headers, query parameters, and middleware options.
|
||||||
|
/// </summary>
|
||||||
|
[Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")]
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class WithNameItemRequestBuilderGetRequestConfiguration : RequestConfiguration<DefaultQueryParameters>
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#pragma warning restore CS0618
|
||||||
@@ -0,0 +1,48 @@
|
|||||||
|
// <auto-generated/>
|
||||||
|
#pragma warning disable CS0618
|
||||||
|
using Marechai.App.InstructionSets.VerifyUnique.Item;
|
||||||
|
using Microsoft.Kiota.Abstractions.Extensions;
|
||||||
|
using Microsoft.Kiota.Abstractions;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.IO;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System;
|
||||||
|
namespace Marechai.App.InstructionSets.VerifyUnique
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Builds and executes requests for operations under \instruction-sets\verify-unique
|
||||||
|
/// </summary>
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class VerifyUniqueRequestBuilder : BaseRequestBuilder
|
||||||
|
{
|
||||||
|
/// <summary>Gets an item from the Marechai.App.instructionSets.verifyUnique.item collection</summary>
|
||||||
|
/// <param name="position">Unique identifier of the item</param>
|
||||||
|
/// <returns>A <see cref="global::Marechai.App.InstructionSets.VerifyUnique.Item.WithNameItemRequestBuilder"/></returns>
|
||||||
|
public global::Marechai.App.InstructionSets.VerifyUnique.Item.WithNameItemRequestBuilder this[string position]
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
var urlTplParams = new Dictionary<string, object>(PathParameters);
|
||||||
|
urlTplParams.Add("name", position);
|
||||||
|
return new global::Marechai.App.InstructionSets.VerifyUnique.Item.WithNameItemRequestBuilder(urlTplParams, RequestAdapter);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Instantiates a new <see cref="global::Marechai.App.InstructionSets.VerifyUnique.VerifyUniqueRequestBuilder"/> and sets the default values.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="pathParameters">Path parameters for the request</param>
|
||||||
|
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||||
|
public VerifyUniqueRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/instruction-sets/verify-unique", pathParameters)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Instantiates a new <see cref="global::Marechai.App.InstructionSets.VerifyUnique.VerifyUniqueRequestBuilder"/> and sets the default values.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||||
|
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||||
|
public VerifyUniqueRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/instruction-sets/verify-unique", rawUrl)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#pragma warning restore CS0618
|
||||||
@@ -0,0 +1,92 @@
|
|||||||
|
// <auto-generated/>
|
||||||
|
#pragma warning disable CS0618
|
||||||
|
using Marechai.App.Models;
|
||||||
|
using Microsoft.Kiota.Abstractions.Extensions;
|
||||||
|
using Microsoft.Kiota.Abstractions.Serialization;
|
||||||
|
using Microsoft.Kiota.Abstractions;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.IO;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Threading;
|
||||||
|
using System;
|
||||||
|
namespace Marechai.App.Iso31661Numeric
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Builds and executes requests for operations under \iso31661-numeric
|
||||||
|
/// </summary>
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class Iso31661NumericRequestBuilder : BaseRequestBuilder
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Instantiates a new <see cref="global::Marechai.App.Iso31661Numeric.Iso31661NumericRequestBuilder"/> and sets the default values.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="pathParameters">Path parameters for the request</param>
|
||||||
|
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||||
|
public Iso31661NumericRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/iso31661-numeric", pathParameters)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Instantiates a new <see cref="global::Marechai.App.Iso31661Numeric.Iso31661NumericRequestBuilder"/> and sets the default values.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||||
|
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||||
|
public Iso31661NumericRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/iso31661-numeric", rawUrl)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <returns>A List<global::Marechai.App.Models.Iso31661NumericDto></returns>
|
||||||
|
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
|
||||||
|
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 400 status code</exception>
|
||||||
|
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||||
|
#nullable enable
|
||||||
|
public async Task<List<global::Marechai.App.Models.Iso31661NumericDto>?> GetAsync(Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public async Task<List<global::Marechai.App.Models.Iso31661NumericDto>> GetAsync(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
var requestInfo = ToGetRequestInformation(requestConfiguration);
|
||||||
|
var errorMapping = new Dictionary<string, ParsableFactory<IParsable>>
|
||||||
|
{
|
||||||
|
{ "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
};
|
||||||
|
var collectionResult = await RequestAdapter.SendCollectionAsync<global::Marechai.App.Models.Iso31661NumericDto>(requestInfo, global::Marechai.App.Models.Iso31661NumericDto.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false);
|
||||||
|
return collectionResult?.AsList();
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="RequestInformation"/></returns>
|
||||||
|
/// <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<DefaultQueryParameters>>? requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters);
|
||||||
|
requestInfo.Configure(requestConfiguration);
|
||||||
|
requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9");
|
||||||
|
return requestInfo;
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>A <see cref="global::Marechai.App.Iso31661Numeric.Iso31661NumericRequestBuilder"/></returns>
|
||||||
|
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||||
|
public global::Marechai.App.Iso31661Numeric.Iso31661NumericRequestBuilder WithUrl(string rawUrl)
|
||||||
|
{
|
||||||
|
return new global::Marechai.App.Iso31661Numeric.Iso31661NumericRequestBuilder(rawUrl, RequestAdapter);
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Configuration for the request such as headers, query parameters, and middleware options.
|
||||||
|
/// </summary>
|
||||||
|
[Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")]
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class Iso31661NumericRequestBuilderGetRequestConfiguration : RequestConfiguration<DefaultQueryParameters>
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#pragma warning restore CS0618
|
||||||
@@ -0,0 +1,92 @@
|
|||||||
|
// <auto-generated/>
|
||||||
|
#pragma warning disable CS0618
|
||||||
|
using Marechai.App.Models;
|
||||||
|
using Microsoft.Kiota.Abstractions.Extensions;
|
||||||
|
using Microsoft.Kiota.Abstractions.Serialization;
|
||||||
|
using Microsoft.Kiota.Abstractions;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.IO;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Threading;
|
||||||
|
using System;
|
||||||
|
namespace Marechai.App.Iso4217
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Builds and executes requests for operations under \iso4217
|
||||||
|
/// </summary>
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class Iso4217RequestBuilder : BaseRequestBuilder
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Instantiates a new <see cref="global::Marechai.App.Iso4217.Iso4217RequestBuilder"/> and sets the default values.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="pathParameters">Path parameters for the request</param>
|
||||||
|
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||||
|
public Iso4217RequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/iso4217", pathParameters)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Instantiates a new <see cref="global::Marechai.App.Iso4217.Iso4217RequestBuilder"/> and sets the default values.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||||
|
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||||
|
public Iso4217RequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/iso4217", rawUrl)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <returns>A List<global::Marechai.App.Models.Iso4217Dto></returns>
|
||||||
|
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
|
||||||
|
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 400 status code</exception>
|
||||||
|
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||||
|
#nullable enable
|
||||||
|
public async Task<List<global::Marechai.App.Models.Iso4217Dto>?> GetAsync(Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public async Task<List<global::Marechai.App.Models.Iso4217Dto>> GetAsync(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
var requestInfo = ToGetRequestInformation(requestConfiguration);
|
||||||
|
var errorMapping = new Dictionary<string, ParsableFactory<IParsable>>
|
||||||
|
{
|
||||||
|
{ "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
};
|
||||||
|
var collectionResult = await RequestAdapter.SendCollectionAsync<global::Marechai.App.Models.Iso4217Dto>(requestInfo, global::Marechai.App.Models.Iso4217Dto.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false);
|
||||||
|
return collectionResult?.AsList();
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="RequestInformation"/></returns>
|
||||||
|
/// <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<DefaultQueryParameters>>? requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters);
|
||||||
|
requestInfo.Configure(requestConfiguration);
|
||||||
|
requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9");
|
||||||
|
return requestInfo;
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>A <see cref="global::Marechai.App.Iso4217.Iso4217RequestBuilder"/></returns>
|
||||||
|
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||||
|
public global::Marechai.App.Iso4217.Iso4217RequestBuilder WithUrl(string rawUrl)
|
||||||
|
{
|
||||||
|
return new global::Marechai.App.Iso4217.Iso4217RequestBuilder(rawUrl, RequestAdapter);
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Configuration for the request such as headers, query parameters, and middleware options.
|
||||||
|
/// </summary>
|
||||||
|
[Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")]
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class Iso4217RequestBuilderGetRequestConfiguration : RequestConfiguration<DefaultQueryParameters>
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#pragma warning restore CS0618
|
||||||
@@ -0,0 +1,192 @@
|
|||||||
|
// <auto-generated/>
|
||||||
|
#pragma warning disable CS0618
|
||||||
|
using Marechai.App.Models;
|
||||||
|
using Microsoft.Kiota.Abstractions.Extensions;
|
||||||
|
using Microsoft.Kiota.Abstractions.Serialization;
|
||||||
|
using Microsoft.Kiota.Abstractions;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.IO;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Threading;
|
||||||
|
using System;
|
||||||
|
namespace Marechai.App.Licenses.Item
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Builds and executes requests for operations under \licenses\{id}
|
||||||
|
/// </summary>
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class LicensesItemRequestBuilder : BaseRequestBuilder
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Instantiates a new <see cref="global::Marechai.App.Licenses.Item.LicensesItemRequestBuilder"/> and sets the default values.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="pathParameters">Path parameters for the request</param>
|
||||||
|
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||||
|
public LicensesItemRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/licenses/{id}", pathParameters)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Instantiates a new <see cref="global::Marechai.App.Licenses.Item.LicensesItemRequestBuilder"/> and sets the default values.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||||
|
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||||
|
public LicensesItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/licenses/{id}", rawUrl)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="string"/></returns>
|
||||||
|
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
|
||||||
|
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 400 status code</exception>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 401 status code</exception>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 404 status code</exception>
|
||||||
|
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||||
|
#nullable enable
|
||||||
|
public async Task<string?> DeleteAsync(Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public async Task<string> DeleteAsync(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
var requestInfo = ToDeleteRequestInformation(requestConfiguration);
|
||||||
|
var errorMapping = new Dictionary<string, ParsableFactory<IParsable>>
|
||||||
|
{
|
||||||
|
{ "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
{ "401", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
{ "404", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
};
|
||||||
|
return await RequestAdapter.SendPrimitiveAsync<string>(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false);
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="global::Marechai.App.Models.LicenseDto"/></returns>
|
||||||
|
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
|
||||||
|
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 400 status code</exception>
|
||||||
|
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||||
|
#nullable enable
|
||||||
|
public async Task<global::Marechai.App.Models.LicenseDto?> GetAsync(Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public async Task<global::Marechai.App.Models.LicenseDto> GetAsync(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
var requestInfo = ToGetRequestInformation(requestConfiguration);
|
||||||
|
var errorMapping = new Dictionary<string, ParsableFactory<IParsable>>
|
||||||
|
{
|
||||||
|
{ "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
};
|
||||||
|
return await RequestAdapter.SendAsync<global::Marechai.App.Models.LicenseDto>(requestInfo, global::Marechai.App.Models.LicenseDto.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false);
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="string"/></returns>
|
||||||
|
/// <param name="body">The request body</param>
|
||||||
|
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
|
||||||
|
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 400 status code</exception>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 401 status code</exception>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 404 status code</exception>
|
||||||
|
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||||
|
#nullable enable
|
||||||
|
public async Task<string?> PutAsync(global::Marechai.App.Models.LicenseDto body, Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public async Task<string> PutAsync(global::Marechai.App.Models.LicenseDto body, Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body));
|
||||||
|
var requestInfo = ToPutRequestInformation(body, requestConfiguration);
|
||||||
|
var errorMapping = new Dictionary<string, ParsableFactory<IParsable>>
|
||||||
|
{
|
||||||
|
{ "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
{ "401", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
{ "404", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
};
|
||||||
|
return await RequestAdapter.SendPrimitiveAsync<string>(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false);
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="RequestInformation"/></returns>
|
||||||
|
/// <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 ToDeleteRequestInformation(Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public RequestInformation ToDeleteRequestInformation(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters);
|
||||||
|
requestInfo.Configure(requestConfiguration);
|
||||||
|
requestInfo.Headers.TryAdd("Accept", "application/json, text/plain;q=0.9");
|
||||||
|
return requestInfo;
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="RequestInformation"/></returns>
|
||||||
|
/// <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<DefaultQueryParameters>>? requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters);
|
||||||
|
requestInfo.Configure(requestConfiguration);
|
||||||
|
requestInfo.Headers.TryAdd("Accept", "application/json, text/plain;q=0.9");
|
||||||
|
return requestInfo;
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="RequestInformation"/></returns>
|
||||||
|
/// <param name="body">The request body</param>
|
||||||
|
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||||
|
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||||
|
#nullable enable
|
||||||
|
public RequestInformation ToPutRequestInformation(global::Marechai.App.Models.LicenseDto body, Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public RequestInformation ToPutRequestInformation(global::Marechai.App.Models.LicenseDto body, Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body));
|
||||||
|
var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters);
|
||||||
|
requestInfo.Configure(requestConfiguration);
|
||||||
|
requestInfo.Headers.TryAdd("Accept", "application/json, text/plain;q=0.9");
|
||||||
|
requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body);
|
||||||
|
return requestInfo;
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>A <see cref="global::Marechai.App.Licenses.Item.LicensesItemRequestBuilder"/></returns>
|
||||||
|
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||||
|
public global::Marechai.App.Licenses.Item.LicensesItemRequestBuilder WithUrl(string rawUrl)
|
||||||
|
{
|
||||||
|
return new global::Marechai.App.Licenses.Item.LicensesItemRequestBuilder(rawUrl, RequestAdapter);
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Configuration for the request such as headers, query parameters, and middleware options.
|
||||||
|
/// </summary>
|
||||||
|
[Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")]
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class LicensesItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration<DefaultQueryParameters>
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Configuration for the request such as headers, query parameters, and middleware options.
|
||||||
|
/// </summary>
|
||||||
|
[Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")]
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class LicensesItemRequestBuilderGetRequestConfiguration : RequestConfiguration<DefaultQueryParameters>
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Configuration for the request such as headers, query parameters, and middleware options.
|
||||||
|
/// </summary>
|
||||||
|
[Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")]
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class LicensesItemRequestBuilderPutRequestConfiguration : RequestConfiguration<DefaultQueryParameters>
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#pragma warning restore CS0618
|
||||||
169
Marechai.App/Services/Client/Licenses/LicensesRequestBuilder.cs
Normal file
169
Marechai.App/Services/Client/Licenses/LicensesRequestBuilder.cs
Normal file
@@ -0,0 +1,169 @@
|
|||||||
|
// <auto-generated/>
|
||||||
|
#pragma warning disable CS0618
|
||||||
|
using Marechai.App.Licenses.Item;
|
||||||
|
using Marechai.App.Models;
|
||||||
|
using Microsoft.Kiota.Abstractions.Extensions;
|
||||||
|
using Microsoft.Kiota.Abstractions.Serialization;
|
||||||
|
using Microsoft.Kiota.Abstractions;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.IO;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Threading;
|
||||||
|
using System;
|
||||||
|
namespace Marechai.App.Licenses
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Builds and executes requests for operations under \licenses
|
||||||
|
/// </summary>
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class LicensesRequestBuilder : BaseRequestBuilder
|
||||||
|
{
|
||||||
|
/// <summary>Gets an item from the Marechai.App.licenses.item collection</summary>
|
||||||
|
/// <param name="position">Unique identifier of the item</param>
|
||||||
|
/// <returns>A <see cref="global::Marechai.App.Licenses.Item.LicensesItemRequestBuilder"/></returns>
|
||||||
|
public global::Marechai.App.Licenses.Item.LicensesItemRequestBuilder this[int position]
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
var urlTplParams = new Dictionary<string, object>(PathParameters);
|
||||||
|
urlTplParams.Add("id", position);
|
||||||
|
return new global::Marechai.App.Licenses.Item.LicensesItemRequestBuilder(urlTplParams, RequestAdapter);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// <summary>Gets an item from the Marechai.App.licenses.item collection</summary>
|
||||||
|
/// <param name="position">Unique identifier of the item</param>
|
||||||
|
/// <returns>A <see cref="global::Marechai.App.Licenses.Item.LicensesItemRequestBuilder"/></returns>
|
||||||
|
[Obsolete("This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead.")]
|
||||||
|
public global::Marechai.App.Licenses.Item.LicensesItemRequestBuilder this[string position]
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
var urlTplParams = new Dictionary<string, object>(PathParameters);
|
||||||
|
if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("id", position);
|
||||||
|
return new global::Marechai.App.Licenses.Item.LicensesItemRequestBuilder(urlTplParams, RequestAdapter);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Instantiates a new <see cref="global::Marechai.App.Licenses.LicensesRequestBuilder"/> and sets the default values.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="pathParameters">Path parameters for the request</param>
|
||||||
|
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||||
|
public LicensesRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/licenses", pathParameters)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Instantiates a new <see cref="global::Marechai.App.Licenses.LicensesRequestBuilder"/> and sets the default values.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||||
|
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||||
|
public LicensesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/licenses", rawUrl)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <returns>A List<global::Marechai.App.Models.LicenseDto></returns>
|
||||||
|
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
|
||||||
|
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 400 status code</exception>
|
||||||
|
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||||
|
#nullable enable
|
||||||
|
public async Task<List<global::Marechai.App.Models.LicenseDto>?> GetAsync(Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public async Task<List<global::Marechai.App.Models.LicenseDto>> GetAsync(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
var requestInfo = ToGetRequestInformation(requestConfiguration);
|
||||||
|
var errorMapping = new Dictionary<string, ParsableFactory<IParsable>>
|
||||||
|
{
|
||||||
|
{ "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
};
|
||||||
|
var collectionResult = await RequestAdapter.SendCollectionAsync<global::Marechai.App.Models.LicenseDto>(requestInfo, global::Marechai.App.Models.LicenseDto.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false);
|
||||||
|
return collectionResult?.AsList();
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="UntypedNode"/></returns>
|
||||||
|
/// <param name="body">The request body</param>
|
||||||
|
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
|
||||||
|
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 400 status code</exception>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 401 status code</exception>
|
||||||
|
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||||
|
#nullable enable
|
||||||
|
public async Task<UntypedNode?> PostAsync(global::Marechai.App.Models.LicenseDto body, Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public async Task<UntypedNode> PostAsync(global::Marechai.App.Models.LicenseDto body, Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body));
|
||||||
|
var requestInfo = ToPostRequestInformation(body, requestConfiguration);
|
||||||
|
var errorMapping = new Dictionary<string, ParsableFactory<IParsable>>
|
||||||
|
{
|
||||||
|
{ "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
{ "401", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
};
|
||||||
|
return await RequestAdapter.SendAsync<UntypedNode>(requestInfo, UntypedNode.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false);
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="RequestInformation"/></returns>
|
||||||
|
/// <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<DefaultQueryParameters>>? requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters);
|
||||||
|
requestInfo.Configure(requestConfiguration);
|
||||||
|
requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9");
|
||||||
|
return requestInfo;
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="RequestInformation"/></returns>
|
||||||
|
/// <param name="body">The request body</param>
|
||||||
|
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||||
|
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||||
|
#nullable enable
|
||||||
|
public RequestInformation ToPostRequestInformation(global::Marechai.App.Models.LicenseDto body, Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public RequestInformation ToPostRequestInformation(global::Marechai.App.Models.LicenseDto body, Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body));
|
||||||
|
var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters);
|
||||||
|
requestInfo.Configure(requestConfiguration);
|
||||||
|
requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9");
|
||||||
|
requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body);
|
||||||
|
return requestInfo;
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>A <see cref="global::Marechai.App.Licenses.LicensesRequestBuilder"/></returns>
|
||||||
|
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||||
|
public global::Marechai.App.Licenses.LicensesRequestBuilder WithUrl(string rawUrl)
|
||||||
|
{
|
||||||
|
return new global::Marechai.App.Licenses.LicensesRequestBuilder(rawUrl, RequestAdapter);
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Configuration for the request such as headers, query parameters, and middleware options.
|
||||||
|
/// </summary>
|
||||||
|
[Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")]
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class LicensesRequestBuilderGetRequestConfiguration : RequestConfiguration<DefaultQueryParameters>
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Configuration for the request such as headers, query parameters, and middleware options.
|
||||||
|
/// </summary>
|
||||||
|
[Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")]
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class LicensesRequestBuilderPostRequestConfiguration : RequestConfiguration<DefaultQueryParameters>
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#pragma warning restore CS0618
|
||||||
@@ -0,0 +1,124 @@
|
|||||||
|
// <auto-generated/>
|
||||||
|
#pragma warning disable CS0618
|
||||||
|
using Marechai.App.MachineFamilies.Books.Item;
|
||||||
|
using Marechai.App.Models;
|
||||||
|
using Microsoft.Kiota.Abstractions.Extensions;
|
||||||
|
using Microsoft.Kiota.Abstractions.Serialization;
|
||||||
|
using Microsoft.Kiota.Abstractions;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.IO;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Threading;
|
||||||
|
using System;
|
||||||
|
namespace Marechai.App.MachineFamilies.Books
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Builds and executes requests for operations under \machine-families\books
|
||||||
|
/// </summary>
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class BooksRequestBuilder : BaseRequestBuilder
|
||||||
|
{
|
||||||
|
/// <summary>Gets an item from the Marechai.App.machineFamilies.books.item collection</summary>
|
||||||
|
/// <param name="position">Unique identifier of the item</param>
|
||||||
|
/// <returns>A <see cref="global::Marechai.App.MachineFamilies.Books.Item.BooksItemRequestBuilder"/></returns>
|
||||||
|
public global::Marechai.App.MachineFamilies.Books.Item.BooksItemRequestBuilder this[long position]
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
var urlTplParams = new Dictionary<string, object>(PathParameters);
|
||||||
|
urlTplParams.Add("id", position);
|
||||||
|
return new global::Marechai.App.MachineFamilies.Books.Item.BooksItemRequestBuilder(urlTplParams, RequestAdapter);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// <summary>Gets an item from the Marechai.App.machineFamilies.books.item collection</summary>
|
||||||
|
/// <param name="position">Unique identifier of the item</param>
|
||||||
|
/// <returns>A <see cref="global::Marechai.App.MachineFamilies.Books.Item.BooksItemRequestBuilder"/></returns>
|
||||||
|
[Obsolete("This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead.")]
|
||||||
|
public global::Marechai.App.MachineFamilies.Books.Item.BooksItemRequestBuilder this[string position]
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
var urlTplParams = new Dictionary<string, object>(PathParameters);
|
||||||
|
if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("id", position);
|
||||||
|
return new global::Marechai.App.MachineFamilies.Books.Item.BooksItemRequestBuilder(urlTplParams, RequestAdapter);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Instantiates a new <see cref="global::Marechai.App.MachineFamilies.Books.BooksRequestBuilder"/> and sets the default values.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="pathParameters">Path parameters for the request</param>
|
||||||
|
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||||
|
public BooksRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/machine-families/books", pathParameters)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Instantiates a new <see cref="global::Marechai.App.MachineFamilies.Books.BooksRequestBuilder"/> and sets the default values.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||||
|
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||||
|
public BooksRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/machine-families/books", rawUrl)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="UntypedNode"/></returns>
|
||||||
|
/// <param name="body">The request body</param>
|
||||||
|
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
|
||||||
|
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 400 status code</exception>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 401 status code</exception>
|
||||||
|
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||||
|
#nullable enable
|
||||||
|
public async Task<UntypedNode?> PostAsync(global::Marechai.App.Models.BookByMachineFamilyDto body, Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public async Task<UntypedNode> PostAsync(global::Marechai.App.Models.BookByMachineFamilyDto body, Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body));
|
||||||
|
var requestInfo = ToPostRequestInformation(body, requestConfiguration);
|
||||||
|
var errorMapping = new Dictionary<string, ParsableFactory<IParsable>>
|
||||||
|
{
|
||||||
|
{ "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
{ "401", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
};
|
||||||
|
return await RequestAdapter.SendAsync<UntypedNode>(requestInfo, UntypedNode.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false);
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="RequestInformation"/></returns>
|
||||||
|
/// <param name="body">The request body</param>
|
||||||
|
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||||
|
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||||
|
#nullable enable
|
||||||
|
public RequestInformation ToPostRequestInformation(global::Marechai.App.Models.BookByMachineFamilyDto body, Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public RequestInformation ToPostRequestInformation(global::Marechai.App.Models.BookByMachineFamilyDto body, Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body));
|
||||||
|
var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters);
|
||||||
|
requestInfo.Configure(requestConfiguration);
|
||||||
|
requestInfo.Headers.TryAdd("Accept", "application/json");
|
||||||
|
requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body);
|
||||||
|
return requestInfo;
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>A <see cref="global::Marechai.App.MachineFamilies.Books.BooksRequestBuilder"/></returns>
|
||||||
|
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||||
|
public global::Marechai.App.MachineFamilies.Books.BooksRequestBuilder WithUrl(string rawUrl)
|
||||||
|
{
|
||||||
|
return new global::Marechai.App.MachineFamilies.Books.BooksRequestBuilder(rawUrl, RequestAdapter);
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Configuration for the request such as headers, query parameters, and middleware options.
|
||||||
|
/// </summary>
|
||||||
|
[Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")]
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class BooksRequestBuilderPostRequestConfiguration : RequestConfiguration<DefaultQueryParameters>
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#pragma warning restore CS0618
|
||||||
@@ -0,0 +1,95 @@
|
|||||||
|
// <auto-generated/>
|
||||||
|
#pragma warning disable CS0618
|
||||||
|
using Marechai.App.Models;
|
||||||
|
using Microsoft.Kiota.Abstractions.Extensions;
|
||||||
|
using Microsoft.Kiota.Abstractions.Serialization;
|
||||||
|
using Microsoft.Kiota.Abstractions;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.IO;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Threading;
|
||||||
|
using System;
|
||||||
|
namespace Marechai.App.MachineFamilies.Books.Item
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Builds and executes requests for operations under \machine-families\books\{id}
|
||||||
|
/// </summary>
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class BooksItemRequestBuilder : BaseRequestBuilder
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Instantiates a new <see cref="global::Marechai.App.MachineFamilies.Books.Item.BooksItemRequestBuilder"/> and sets the default values.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="pathParameters">Path parameters for the request</param>
|
||||||
|
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||||
|
public BooksItemRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/machine-families/books/{id}", pathParameters)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Instantiates a new <see cref="global::Marechai.App.MachineFamilies.Books.Item.BooksItemRequestBuilder"/> and sets the default values.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||||
|
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||||
|
public BooksItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/machine-families/books/{id}", rawUrl)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="string"/></returns>
|
||||||
|
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
|
||||||
|
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 400 status code</exception>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 401 status code</exception>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 404 status code</exception>
|
||||||
|
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||||
|
#nullable enable
|
||||||
|
public async Task<string?> DeleteAsync(Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public async Task<string> DeleteAsync(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
var requestInfo = ToDeleteRequestInformation(requestConfiguration);
|
||||||
|
var errorMapping = new Dictionary<string, ParsableFactory<IParsable>>
|
||||||
|
{
|
||||||
|
{ "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
{ "401", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
{ "404", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
};
|
||||||
|
return await RequestAdapter.SendPrimitiveAsync<string>(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false);
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="RequestInformation"/></returns>
|
||||||
|
/// <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 ToDeleteRequestInformation(Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public RequestInformation ToDeleteRequestInformation(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters);
|
||||||
|
requestInfo.Configure(requestConfiguration);
|
||||||
|
requestInfo.Headers.TryAdd("Accept", "application/json, text/plain;q=0.9");
|
||||||
|
return requestInfo;
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>A <see cref="global::Marechai.App.MachineFamilies.Books.Item.BooksItemRequestBuilder"/></returns>
|
||||||
|
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||||
|
public global::Marechai.App.MachineFamilies.Books.Item.BooksItemRequestBuilder WithUrl(string rawUrl)
|
||||||
|
{
|
||||||
|
return new global::Marechai.App.MachineFamilies.Books.Item.BooksItemRequestBuilder(rawUrl, RequestAdapter);
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Configuration for the request such as headers, query parameters, and middleware options.
|
||||||
|
/// </summary>
|
||||||
|
[Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")]
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class BooksItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration<DefaultQueryParameters>
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#pragma warning restore CS0618
|
||||||
@@ -0,0 +1,124 @@
|
|||||||
|
// <auto-generated/>
|
||||||
|
#pragma warning disable CS0618
|
||||||
|
using Marechai.App.MachineFamilies.Documents.Item;
|
||||||
|
using Marechai.App.Models;
|
||||||
|
using Microsoft.Kiota.Abstractions.Extensions;
|
||||||
|
using Microsoft.Kiota.Abstractions.Serialization;
|
||||||
|
using Microsoft.Kiota.Abstractions;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.IO;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Threading;
|
||||||
|
using System;
|
||||||
|
namespace Marechai.App.MachineFamilies.Documents
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Builds and executes requests for operations under \machine-families\documents
|
||||||
|
/// </summary>
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class DocumentsRequestBuilder : BaseRequestBuilder
|
||||||
|
{
|
||||||
|
/// <summary>Gets an item from the Marechai.App.machineFamilies.documents.item collection</summary>
|
||||||
|
/// <param name="position">Unique identifier of the item</param>
|
||||||
|
/// <returns>A <see cref="global::Marechai.App.MachineFamilies.Documents.Item.DocumentsItemRequestBuilder"/></returns>
|
||||||
|
public global::Marechai.App.MachineFamilies.Documents.Item.DocumentsItemRequestBuilder this[long position]
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
var urlTplParams = new Dictionary<string, object>(PathParameters);
|
||||||
|
urlTplParams.Add("id", position);
|
||||||
|
return new global::Marechai.App.MachineFamilies.Documents.Item.DocumentsItemRequestBuilder(urlTplParams, RequestAdapter);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// <summary>Gets an item from the Marechai.App.machineFamilies.documents.item collection</summary>
|
||||||
|
/// <param name="position">Unique identifier of the item</param>
|
||||||
|
/// <returns>A <see cref="global::Marechai.App.MachineFamilies.Documents.Item.DocumentsItemRequestBuilder"/></returns>
|
||||||
|
[Obsolete("This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead.")]
|
||||||
|
public global::Marechai.App.MachineFamilies.Documents.Item.DocumentsItemRequestBuilder this[string position]
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
var urlTplParams = new Dictionary<string, object>(PathParameters);
|
||||||
|
if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("id", position);
|
||||||
|
return new global::Marechai.App.MachineFamilies.Documents.Item.DocumentsItemRequestBuilder(urlTplParams, RequestAdapter);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Instantiates a new <see cref="global::Marechai.App.MachineFamilies.Documents.DocumentsRequestBuilder"/> and sets the default values.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="pathParameters">Path parameters for the request</param>
|
||||||
|
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||||
|
public DocumentsRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/machine-families/documents", pathParameters)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Instantiates a new <see cref="global::Marechai.App.MachineFamilies.Documents.DocumentsRequestBuilder"/> and sets the default values.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||||
|
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||||
|
public DocumentsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/machine-families/documents", rawUrl)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="UntypedNode"/></returns>
|
||||||
|
/// <param name="body">The request body</param>
|
||||||
|
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
|
||||||
|
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 400 status code</exception>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 401 status code</exception>
|
||||||
|
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||||
|
#nullable enable
|
||||||
|
public async Task<UntypedNode?> PostAsync(global::Marechai.App.Models.DocumentByMachineFamilyDto body, Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public async Task<UntypedNode> PostAsync(global::Marechai.App.Models.DocumentByMachineFamilyDto body, Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body));
|
||||||
|
var requestInfo = ToPostRequestInformation(body, requestConfiguration);
|
||||||
|
var errorMapping = new Dictionary<string, ParsableFactory<IParsable>>
|
||||||
|
{
|
||||||
|
{ "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
{ "401", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
};
|
||||||
|
return await RequestAdapter.SendAsync<UntypedNode>(requestInfo, UntypedNode.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false);
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="RequestInformation"/></returns>
|
||||||
|
/// <param name="body">The request body</param>
|
||||||
|
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||||
|
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||||
|
#nullable enable
|
||||||
|
public RequestInformation ToPostRequestInformation(global::Marechai.App.Models.DocumentByMachineFamilyDto body, Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public RequestInformation ToPostRequestInformation(global::Marechai.App.Models.DocumentByMachineFamilyDto body, Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body));
|
||||||
|
var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters);
|
||||||
|
requestInfo.Configure(requestConfiguration);
|
||||||
|
requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9");
|
||||||
|
requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body);
|
||||||
|
return requestInfo;
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>A <see cref="global::Marechai.App.MachineFamilies.Documents.DocumentsRequestBuilder"/></returns>
|
||||||
|
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||||
|
public global::Marechai.App.MachineFamilies.Documents.DocumentsRequestBuilder WithUrl(string rawUrl)
|
||||||
|
{
|
||||||
|
return new global::Marechai.App.MachineFamilies.Documents.DocumentsRequestBuilder(rawUrl, RequestAdapter);
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Configuration for the request such as headers, query parameters, and middleware options.
|
||||||
|
/// </summary>
|
||||||
|
[Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")]
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class DocumentsRequestBuilderPostRequestConfiguration : RequestConfiguration<DefaultQueryParameters>
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#pragma warning restore CS0618
|
||||||
@@ -0,0 +1,93 @@
|
|||||||
|
// <auto-generated/>
|
||||||
|
#pragma warning disable CS0618
|
||||||
|
using Marechai.App.Models;
|
||||||
|
using Microsoft.Kiota.Abstractions.Extensions;
|
||||||
|
using Microsoft.Kiota.Abstractions.Serialization;
|
||||||
|
using Microsoft.Kiota.Abstractions;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.IO;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Threading;
|
||||||
|
using System;
|
||||||
|
namespace Marechai.App.MachineFamilies.Documents.Item
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Builds and executes requests for operations under \machine-families\documents\{id}
|
||||||
|
/// </summary>
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class DocumentsItemRequestBuilder : BaseRequestBuilder
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Instantiates a new <see cref="global::Marechai.App.MachineFamilies.Documents.Item.DocumentsItemRequestBuilder"/> and sets the default values.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="pathParameters">Path parameters for the request</param>
|
||||||
|
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||||
|
public DocumentsItemRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/machine-families/documents/{id}", pathParameters)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Instantiates a new <see cref="global::Marechai.App.MachineFamilies.Documents.Item.DocumentsItemRequestBuilder"/> and sets the default values.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||||
|
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||||
|
public DocumentsItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/machine-families/documents/{id}", rawUrl)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="string"/></returns>
|
||||||
|
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
|
||||||
|
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 400 status code</exception>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 401 status code</exception>
|
||||||
|
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||||
|
#nullable enable
|
||||||
|
public async Task<string?> DeleteAsync(Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public async Task<string> DeleteAsync(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
var requestInfo = ToDeleteRequestInformation(requestConfiguration);
|
||||||
|
var errorMapping = new Dictionary<string, ParsableFactory<IParsable>>
|
||||||
|
{
|
||||||
|
{ "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
{ "401", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
};
|
||||||
|
return await RequestAdapter.SendPrimitiveAsync<string>(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false);
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="RequestInformation"/></returns>
|
||||||
|
/// <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 ToDeleteRequestInformation(Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public RequestInformation ToDeleteRequestInformation(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters);
|
||||||
|
requestInfo.Configure(requestConfiguration);
|
||||||
|
requestInfo.Headers.TryAdd("Accept", "application/json, text/plain;q=0.9");
|
||||||
|
return requestInfo;
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>A <see cref="global::Marechai.App.MachineFamilies.Documents.Item.DocumentsItemRequestBuilder"/></returns>
|
||||||
|
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||||
|
public global::Marechai.App.MachineFamilies.Documents.Item.DocumentsItemRequestBuilder WithUrl(string rawUrl)
|
||||||
|
{
|
||||||
|
return new global::Marechai.App.MachineFamilies.Documents.Item.DocumentsItemRequestBuilder(rawUrl, RequestAdapter);
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Configuration for the request such as headers, query parameters, and middleware options.
|
||||||
|
/// </summary>
|
||||||
|
[Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")]
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class DocumentsItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration<DefaultQueryParameters>
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#pragma warning restore CS0618
|
||||||
@@ -0,0 +1,192 @@
|
|||||||
|
// <auto-generated/>
|
||||||
|
#pragma warning disable CS0618
|
||||||
|
using Marechai.App.Models;
|
||||||
|
using Microsoft.Kiota.Abstractions.Extensions;
|
||||||
|
using Microsoft.Kiota.Abstractions.Serialization;
|
||||||
|
using Microsoft.Kiota.Abstractions;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.IO;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Threading;
|
||||||
|
using System;
|
||||||
|
namespace Marechai.App.MachineFamilies.Item
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Builds and executes requests for operations under \machine-families\{id}
|
||||||
|
/// </summary>
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class MachineFamiliesItemRequestBuilder : BaseRequestBuilder
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Instantiates a new <see cref="global::Marechai.App.MachineFamilies.Item.MachineFamiliesItemRequestBuilder"/> and sets the default values.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="pathParameters">Path parameters for the request</param>
|
||||||
|
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||||
|
public MachineFamiliesItemRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/machine-families/{id}", pathParameters)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Instantiates a new <see cref="global::Marechai.App.MachineFamilies.Item.MachineFamiliesItemRequestBuilder"/> and sets the default values.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||||
|
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||||
|
public MachineFamiliesItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/machine-families/{id}", rawUrl)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="string"/></returns>
|
||||||
|
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
|
||||||
|
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 400 status code</exception>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 401 status code</exception>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 404 status code</exception>
|
||||||
|
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||||
|
#nullable enable
|
||||||
|
public async Task<string?> DeleteAsync(Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public async Task<string> DeleteAsync(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
var requestInfo = ToDeleteRequestInformation(requestConfiguration);
|
||||||
|
var errorMapping = new Dictionary<string, ParsableFactory<IParsable>>
|
||||||
|
{
|
||||||
|
{ "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
{ "401", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
{ "404", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
};
|
||||||
|
return await RequestAdapter.SendPrimitiveAsync<string>(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false);
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="global::Marechai.App.Models.MachineFamilyDto"/></returns>
|
||||||
|
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
|
||||||
|
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 400 status code</exception>
|
||||||
|
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||||
|
#nullable enable
|
||||||
|
public async Task<global::Marechai.App.Models.MachineFamilyDto?> GetAsync(Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public async Task<global::Marechai.App.Models.MachineFamilyDto> GetAsync(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
var requestInfo = ToGetRequestInformation(requestConfiguration);
|
||||||
|
var errorMapping = new Dictionary<string, ParsableFactory<IParsable>>
|
||||||
|
{
|
||||||
|
{ "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
};
|
||||||
|
return await RequestAdapter.SendAsync<global::Marechai.App.Models.MachineFamilyDto>(requestInfo, global::Marechai.App.Models.MachineFamilyDto.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false);
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="string"/></returns>
|
||||||
|
/// <param name="body">The request body</param>
|
||||||
|
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
|
||||||
|
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 400 status code</exception>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 401 status code</exception>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 404 status code</exception>
|
||||||
|
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||||
|
#nullable enable
|
||||||
|
public async Task<string?> PutAsync(global::Marechai.App.Models.MachineFamilyDto body, Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public async Task<string> PutAsync(global::Marechai.App.Models.MachineFamilyDto body, Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body));
|
||||||
|
var requestInfo = ToPutRequestInformation(body, requestConfiguration);
|
||||||
|
var errorMapping = new Dictionary<string, ParsableFactory<IParsable>>
|
||||||
|
{
|
||||||
|
{ "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
{ "401", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
{ "404", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
};
|
||||||
|
return await RequestAdapter.SendPrimitiveAsync<string>(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false);
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="RequestInformation"/></returns>
|
||||||
|
/// <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 ToDeleteRequestInformation(Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public RequestInformation ToDeleteRequestInformation(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters);
|
||||||
|
requestInfo.Configure(requestConfiguration);
|
||||||
|
requestInfo.Headers.TryAdd("Accept", "application/json, text/plain;q=0.9");
|
||||||
|
return requestInfo;
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="RequestInformation"/></returns>
|
||||||
|
/// <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<DefaultQueryParameters>>? requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters);
|
||||||
|
requestInfo.Configure(requestConfiguration);
|
||||||
|
requestInfo.Headers.TryAdd("Accept", "application/json, text/plain;q=0.9");
|
||||||
|
return requestInfo;
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="RequestInformation"/></returns>
|
||||||
|
/// <param name="body">The request body</param>
|
||||||
|
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||||
|
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||||
|
#nullable enable
|
||||||
|
public RequestInformation ToPutRequestInformation(global::Marechai.App.Models.MachineFamilyDto body, Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public RequestInformation ToPutRequestInformation(global::Marechai.App.Models.MachineFamilyDto body, Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body));
|
||||||
|
var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters);
|
||||||
|
requestInfo.Configure(requestConfiguration);
|
||||||
|
requestInfo.Headers.TryAdd("Accept", "application/json, text/plain;q=0.9");
|
||||||
|
requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body);
|
||||||
|
return requestInfo;
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>A <see cref="global::Marechai.App.MachineFamilies.Item.MachineFamiliesItemRequestBuilder"/></returns>
|
||||||
|
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||||
|
public global::Marechai.App.MachineFamilies.Item.MachineFamiliesItemRequestBuilder WithUrl(string rawUrl)
|
||||||
|
{
|
||||||
|
return new global::Marechai.App.MachineFamilies.Item.MachineFamiliesItemRequestBuilder(rawUrl, RequestAdapter);
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Configuration for the request such as headers, query parameters, and middleware options.
|
||||||
|
/// </summary>
|
||||||
|
[Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")]
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class MachineFamiliesItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration<DefaultQueryParameters>
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Configuration for the request such as headers, query parameters, and middleware options.
|
||||||
|
/// </summary>
|
||||||
|
[Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")]
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class MachineFamiliesItemRequestBuilderGetRequestConfiguration : RequestConfiguration<DefaultQueryParameters>
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Configuration for the request such as headers, query parameters, and middleware options.
|
||||||
|
/// </summary>
|
||||||
|
[Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")]
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class MachineFamiliesItemRequestBuilderPutRequestConfiguration : RequestConfiguration<DefaultQueryParameters>
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#pragma warning restore CS0618
|
||||||
@@ -0,0 +1,181 @@
|
|||||||
|
// <auto-generated/>
|
||||||
|
#pragma warning disable CS0618
|
||||||
|
using Marechai.App.MachineFamilies.Books;
|
||||||
|
using Marechai.App.MachineFamilies.Documents;
|
||||||
|
using Marechai.App.MachineFamilies.Item;
|
||||||
|
using Marechai.App.Models;
|
||||||
|
using Microsoft.Kiota.Abstractions.Extensions;
|
||||||
|
using Microsoft.Kiota.Abstractions.Serialization;
|
||||||
|
using Microsoft.Kiota.Abstractions;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.IO;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Threading;
|
||||||
|
using System;
|
||||||
|
namespace Marechai.App.MachineFamilies
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Builds and executes requests for operations under \machine-families
|
||||||
|
/// </summary>
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class MachineFamiliesRequestBuilder : BaseRequestBuilder
|
||||||
|
{
|
||||||
|
/// <summary>The books property</summary>
|
||||||
|
public global::Marechai.App.MachineFamilies.Books.BooksRequestBuilder Books
|
||||||
|
{
|
||||||
|
get => new global::Marechai.App.MachineFamilies.Books.BooksRequestBuilder(PathParameters, RequestAdapter);
|
||||||
|
}
|
||||||
|
/// <summary>The documents property</summary>
|
||||||
|
public global::Marechai.App.MachineFamilies.Documents.DocumentsRequestBuilder Documents
|
||||||
|
{
|
||||||
|
get => new global::Marechai.App.MachineFamilies.Documents.DocumentsRequestBuilder(PathParameters, RequestAdapter);
|
||||||
|
}
|
||||||
|
/// <summary>Gets an item from the Marechai.App.machineFamilies.item collection</summary>
|
||||||
|
/// <param name="position">Unique identifier of the item</param>
|
||||||
|
/// <returns>A <see cref="global::Marechai.App.MachineFamilies.Item.MachineFamiliesItemRequestBuilder"/></returns>
|
||||||
|
public global::Marechai.App.MachineFamilies.Item.MachineFamiliesItemRequestBuilder this[int position]
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
var urlTplParams = new Dictionary<string, object>(PathParameters);
|
||||||
|
urlTplParams.Add("id", position);
|
||||||
|
return new global::Marechai.App.MachineFamilies.Item.MachineFamiliesItemRequestBuilder(urlTplParams, RequestAdapter);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// <summary>Gets an item from the Marechai.App.machineFamilies.item collection</summary>
|
||||||
|
/// <param name="position">Unique identifier of the item</param>
|
||||||
|
/// <returns>A <see cref="global::Marechai.App.MachineFamilies.Item.MachineFamiliesItemRequestBuilder"/></returns>
|
||||||
|
[Obsolete("This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead.")]
|
||||||
|
public global::Marechai.App.MachineFamilies.Item.MachineFamiliesItemRequestBuilder this[string position]
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
var urlTplParams = new Dictionary<string, object>(PathParameters);
|
||||||
|
if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("id", position);
|
||||||
|
return new global::Marechai.App.MachineFamilies.Item.MachineFamiliesItemRequestBuilder(urlTplParams, RequestAdapter);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Instantiates a new <see cref="global::Marechai.App.MachineFamilies.MachineFamiliesRequestBuilder"/> and sets the default values.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="pathParameters">Path parameters for the request</param>
|
||||||
|
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||||
|
public MachineFamiliesRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/machine-families", pathParameters)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Instantiates a new <see cref="global::Marechai.App.MachineFamilies.MachineFamiliesRequestBuilder"/> and sets the default values.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||||
|
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||||
|
public MachineFamiliesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/machine-families", rawUrl)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <returns>A List<global::Marechai.App.Models.MachineFamilyDto></returns>
|
||||||
|
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
|
||||||
|
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 400 status code</exception>
|
||||||
|
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||||
|
#nullable enable
|
||||||
|
public async Task<List<global::Marechai.App.Models.MachineFamilyDto>?> GetAsync(Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public async Task<List<global::Marechai.App.Models.MachineFamilyDto>> GetAsync(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
var requestInfo = ToGetRequestInformation(requestConfiguration);
|
||||||
|
var errorMapping = new Dictionary<string, ParsableFactory<IParsable>>
|
||||||
|
{
|
||||||
|
{ "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
};
|
||||||
|
var collectionResult = await RequestAdapter.SendCollectionAsync<global::Marechai.App.Models.MachineFamilyDto>(requestInfo, global::Marechai.App.Models.MachineFamilyDto.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false);
|
||||||
|
return collectionResult?.AsList();
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="UntypedNode"/></returns>
|
||||||
|
/// <param name="body">The request body</param>
|
||||||
|
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
|
||||||
|
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 400 status code</exception>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 401 status code</exception>
|
||||||
|
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||||
|
#nullable enable
|
||||||
|
public async Task<UntypedNode?> PostAsync(global::Marechai.App.Models.MachineFamilyDto body, Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public async Task<UntypedNode> PostAsync(global::Marechai.App.Models.MachineFamilyDto body, Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body));
|
||||||
|
var requestInfo = ToPostRequestInformation(body, requestConfiguration);
|
||||||
|
var errorMapping = new Dictionary<string, ParsableFactory<IParsable>>
|
||||||
|
{
|
||||||
|
{ "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
{ "401", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
};
|
||||||
|
return await RequestAdapter.SendAsync<UntypedNode>(requestInfo, UntypedNode.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false);
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="RequestInformation"/></returns>
|
||||||
|
/// <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<DefaultQueryParameters>>? requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters);
|
||||||
|
requestInfo.Configure(requestConfiguration);
|
||||||
|
requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9");
|
||||||
|
return requestInfo;
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="RequestInformation"/></returns>
|
||||||
|
/// <param name="body">The request body</param>
|
||||||
|
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||||
|
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||||
|
#nullable enable
|
||||||
|
public RequestInformation ToPostRequestInformation(global::Marechai.App.Models.MachineFamilyDto body, Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public RequestInformation ToPostRequestInformation(global::Marechai.App.Models.MachineFamilyDto body, Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body));
|
||||||
|
var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters);
|
||||||
|
requestInfo.Configure(requestConfiguration);
|
||||||
|
requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9");
|
||||||
|
requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body);
|
||||||
|
return requestInfo;
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>A <see cref="global::Marechai.App.MachineFamilies.MachineFamiliesRequestBuilder"/></returns>
|
||||||
|
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||||
|
public global::Marechai.App.MachineFamilies.MachineFamiliesRequestBuilder WithUrl(string rawUrl)
|
||||||
|
{
|
||||||
|
return new global::Marechai.App.MachineFamilies.MachineFamiliesRequestBuilder(rawUrl, RequestAdapter);
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Configuration for the request such as headers, query parameters, and middleware options.
|
||||||
|
/// </summary>
|
||||||
|
[Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")]
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class MachineFamiliesRequestBuilderGetRequestConfiguration : RequestConfiguration<DefaultQueryParameters>
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Configuration for the request such as headers, query parameters, and middleware options.
|
||||||
|
/// </summary>
|
||||||
|
[Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")]
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class MachineFamiliesRequestBuilderPostRequestConfiguration : RequestConfiguration<DefaultQueryParameters>
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#pragma warning restore CS0618
|
||||||
@@ -0,0 +1,124 @@
|
|||||||
|
// <auto-generated/>
|
||||||
|
#pragma warning disable CS0618
|
||||||
|
using Marechai.App.Machines.Books.Item;
|
||||||
|
using Marechai.App.Models;
|
||||||
|
using Microsoft.Kiota.Abstractions.Extensions;
|
||||||
|
using Microsoft.Kiota.Abstractions.Serialization;
|
||||||
|
using Microsoft.Kiota.Abstractions;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.IO;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Threading;
|
||||||
|
using System;
|
||||||
|
namespace Marechai.App.Machines.Books
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Builds and executes requests for operations under \machines\books
|
||||||
|
/// </summary>
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class BooksRequestBuilder : BaseRequestBuilder
|
||||||
|
{
|
||||||
|
/// <summary>Gets an item from the Marechai.App.machines.books.item collection</summary>
|
||||||
|
/// <param name="position">Unique identifier of the item</param>
|
||||||
|
/// <returns>A <see cref="global::Marechai.App.Machines.Books.Item.BooksItemRequestBuilder"/></returns>
|
||||||
|
public global::Marechai.App.Machines.Books.Item.BooksItemRequestBuilder this[long position]
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
var urlTplParams = new Dictionary<string, object>(PathParameters);
|
||||||
|
urlTplParams.Add("id", position);
|
||||||
|
return new global::Marechai.App.Machines.Books.Item.BooksItemRequestBuilder(urlTplParams, RequestAdapter);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// <summary>Gets an item from the Marechai.App.machines.books.item collection</summary>
|
||||||
|
/// <param name="position">Unique identifier of the item</param>
|
||||||
|
/// <returns>A <see cref="global::Marechai.App.Machines.Books.Item.BooksItemRequestBuilder"/></returns>
|
||||||
|
[Obsolete("This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead.")]
|
||||||
|
public global::Marechai.App.Machines.Books.Item.BooksItemRequestBuilder this[string position]
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
var urlTplParams = new Dictionary<string, object>(PathParameters);
|
||||||
|
if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("id", position);
|
||||||
|
return new global::Marechai.App.Machines.Books.Item.BooksItemRequestBuilder(urlTplParams, RequestAdapter);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Instantiates a new <see cref="global::Marechai.App.Machines.Books.BooksRequestBuilder"/> and sets the default values.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="pathParameters">Path parameters for the request</param>
|
||||||
|
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||||
|
public BooksRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/machines/books", pathParameters)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Instantiates a new <see cref="global::Marechai.App.Machines.Books.BooksRequestBuilder"/> and sets the default values.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||||
|
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||||
|
public BooksRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/machines/books", rawUrl)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="UntypedNode"/></returns>
|
||||||
|
/// <param name="body">The request body</param>
|
||||||
|
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
|
||||||
|
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 400 status code</exception>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 401 status code</exception>
|
||||||
|
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||||
|
#nullable enable
|
||||||
|
public async Task<UntypedNode?> PostAsync(global::Marechai.App.Models.BookByMachineDto body, Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public async Task<UntypedNode> PostAsync(global::Marechai.App.Models.BookByMachineDto body, Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body));
|
||||||
|
var requestInfo = ToPostRequestInformation(body, requestConfiguration);
|
||||||
|
var errorMapping = new Dictionary<string, ParsableFactory<IParsable>>
|
||||||
|
{
|
||||||
|
{ "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
{ "401", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
};
|
||||||
|
return await RequestAdapter.SendAsync<UntypedNode>(requestInfo, UntypedNode.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false);
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="RequestInformation"/></returns>
|
||||||
|
/// <param name="body">The request body</param>
|
||||||
|
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||||
|
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||||
|
#nullable enable
|
||||||
|
public RequestInformation ToPostRequestInformation(global::Marechai.App.Models.BookByMachineDto body, Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public RequestInformation ToPostRequestInformation(global::Marechai.App.Models.BookByMachineDto body, Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body));
|
||||||
|
var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters);
|
||||||
|
requestInfo.Configure(requestConfiguration);
|
||||||
|
requestInfo.Headers.TryAdd("Accept", "application/json");
|
||||||
|
requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body);
|
||||||
|
return requestInfo;
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>A <see cref="global::Marechai.App.Machines.Books.BooksRequestBuilder"/></returns>
|
||||||
|
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||||
|
public global::Marechai.App.Machines.Books.BooksRequestBuilder WithUrl(string rawUrl)
|
||||||
|
{
|
||||||
|
return new global::Marechai.App.Machines.Books.BooksRequestBuilder(rawUrl, RequestAdapter);
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Configuration for the request such as headers, query parameters, and middleware options.
|
||||||
|
/// </summary>
|
||||||
|
[Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")]
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class BooksRequestBuilderPostRequestConfiguration : RequestConfiguration<DefaultQueryParameters>
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#pragma warning restore CS0618
|
||||||
@@ -0,0 +1,95 @@
|
|||||||
|
// <auto-generated/>
|
||||||
|
#pragma warning disable CS0618
|
||||||
|
using Marechai.App.Models;
|
||||||
|
using Microsoft.Kiota.Abstractions.Extensions;
|
||||||
|
using Microsoft.Kiota.Abstractions.Serialization;
|
||||||
|
using Microsoft.Kiota.Abstractions;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.IO;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Threading;
|
||||||
|
using System;
|
||||||
|
namespace Marechai.App.Machines.Books.Item
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Builds and executes requests for operations under \machines\books\{id}
|
||||||
|
/// </summary>
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class BooksItemRequestBuilder : BaseRequestBuilder
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Instantiates a new <see cref="global::Marechai.App.Machines.Books.Item.BooksItemRequestBuilder"/> and sets the default values.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="pathParameters">Path parameters for the request</param>
|
||||||
|
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||||
|
public BooksItemRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/machines/books/{id}", pathParameters)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Instantiates a new <see cref="global::Marechai.App.Machines.Books.Item.BooksItemRequestBuilder"/> and sets the default values.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||||
|
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||||
|
public BooksItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/machines/books/{id}", rawUrl)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="string"/></returns>
|
||||||
|
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
|
||||||
|
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 400 status code</exception>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 401 status code</exception>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 404 status code</exception>
|
||||||
|
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||||
|
#nullable enable
|
||||||
|
public async Task<string?> DeleteAsync(Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public async Task<string> DeleteAsync(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
var requestInfo = ToDeleteRequestInformation(requestConfiguration);
|
||||||
|
var errorMapping = new Dictionary<string, ParsableFactory<IParsable>>
|
||||||
|
{
|
||||||
|
{ "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
{ "401", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
{ "404", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
};
|
||||||
|
return await RequestAdapter.SendPrimitiveAsync<string>(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false);
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="RequestInformation"/></returns>
|
||||||
|
/// <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 ToDeleteRequestInformation(Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public RequestInformation ToDeleteRequestInformation(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters);
|
||||||
|
requestInfo.Configure(requestConfiguration);
|
||||||
|
requestInfo.Headers.TryAdd("Accept", "application/json, text/plain;q=0.9");
|
||||||
|
return requestInfo;
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>A <see cref="global::Marechai.App.Machines.Books.Item.BooksItemRequestBuilder"/></returns>
|
||||||
|
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||||
|
public global::Marechai.App.Machines.Books.Item.BooksItemRequestBuilder WithUrl(string rawUrl)
|
||||||
|
{
|
||||||
|
return new global::Marechai.App.Machines.Books.Item.BooksItemRequestBuilder(rawUrl, RequestAdapter);
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Configuration for the request such as headers, query parameters, and middleware options.
|
||||||
|
/// </summary>
|
||||||
|
[Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")]
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class BooksItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration<DefaultQueryParameters>
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#pragma warning restore CS0618
|
||||||
@@ -0,0 +1,124 @@
|
|||||||
|
// <auto-generated/>
|
||||||
|
#pragma warning disable CS0618
|
||||||
|
using Marechai.App.Machines.Documents.Item;
|
||||||
|
using Marechai.App.Models;
|
||||||
|
using Microsoft.Kiota.Abstractions.Extensions;
|
||||||
|
using Microsoft.Kiota.Abstractions.Serialization;
|
||||||
|
using Microsoft.Kiota.Abstractions;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.IO;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Threading;
|
||||||
|
using System;
|
||||||
|
namespace Marechai.App.Machines.Documents
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Builds and executes requests for operations under \machines\documents
|
||||||
|
/// </summary>
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class DocumentsRequestBuilder : BaseRequestBuilder
|
||||||
|
{
|
||||||
|
/// <summary>Gets an item from the Marechai.App.machines.documents.item collection</summary>
|
||||||
|
/// <param name="position">Unique identifier of the item</param>
|
||||||
|
/// <returns>A <see cref="global::Marechai.App.Machines.Documents.Item.DocumentsItemRequestBuilder"/></returns>
|
||||||
|
public global::Marechai.App.Machines.Documents.Item.DocumentsItemRequestBuilder this[long position]
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
var urlTplParams = new Dictionary<string, object>(PathParameters);
|
||||||
|
urlTplParams.Add("id", position);
|
||||||
|
return new global::Marechai.App.Machines.Documents.Item.DocumentsItemRequestBuilder(urlTplParams, RequestAdapter);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// <summary>Gets an item from the Marechai.App.machines.documents.item collection</summary>
|
||||||
|
/// <param name="position">Unique identifier of the item</param>
|
||||||
|
/// <returns>A <see cref="global::Marechai.App.Machines.Documents.Item.DocumentsItemRequestBuilder"/></returns>
|
||||||
|
[Obsolete("This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead.")]
|
||||||
|
public global::Marechai.App.Machines.Documents.Item.DocumentsItemRequestBuilder this[string position]
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
var urlTplParams = new Dictionary<string, object>(PathParameters);
|
||||||
|
if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("id", position);
|
||||||
|
return new global::Marechai.App.Machines.Documents.Item.DocumentsItemRequestBuilder(urlTplParams, RequestAdapter);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Instantiates a new <see cref="global::Marechai.App.Machines.Documents.DocumentsRequestBuilder"/> and sets the default values.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="pathParameters">Path parameters for the request</param>
|
||||||
|
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||||
|
public DocumentsRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/machines/documents", pathParameters)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Instantiates a new <see cref="global::Marechai.App.Machines.Documents.DocumentsRequestBuilder"/> and sets the default values.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||||
|
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||||
|
public DocumentsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/machines/documents", rawUrl)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="UntypedNode"/></returns>
|
||||||
|
/// <param name="body">The request body</param>
|
||||||
|
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
|
||||||
|
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 400 status code</exception>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 401 status code</exception>
|
||||||
|
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||||
|
#nullable enable
|
||||||
|
public async Task<UntypedNode?> PostAsync(global::Marechai.App.Models.DocumentByMachineDto body, Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public async Task<UntypedNode> PostAsync(global::Marechai.App.Models.DocumentByMachineDto body, Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body));
|
||||||
|
var requestInfo = ToPostRequestInformation(body, requestConfiguration);
|
||||||
|
var errorMapping = new Dictionary<string, ParsableFactory<IParsable>>
|
||||||
|
{
|
||||||
|
{ "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
{ "401", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
};
|
||||||
|
return await RequestAdapter.SendAsync<UntypedNode>(requestInfo, UntypedNode.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false);
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="RequestInformation"/></returns>
|
||||||
|
/// <param name="body">The request body</param>
|
||||||
|
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||||
|
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||||
|
#nullable enable
|
||||||
|
public RequestInformation ToPostRequestInformation(global::Marechai.App.Models.DocumentByMachineDto body, Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public RequestInformation ToPostRequestInformation(global::Marechai.App.Models.DocumentByMachineDto body, Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
if(ReferenceEquals(body, null)) throw new ArgumentNullException(nameof(body));
|
||||||
|
var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters);
|
||||||
|
requestInfo.Configure(requestConfiguration);
|
||||||
|
requestInfo.Headers.TryAdd("Accept", "text/plain;q=0.9");
|
||||||
|
requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body);
|
||||||
|
return requestInfo;
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>A <see cref="global::Marechai.App.Machines.Documents.DocumentsRequestBuilder"/></returns>
|
||||||
|
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||||
|
public global::Marechai.App.Machines.Documents.DocumentsRequestBuilder WithUrl(string rawUrl)
|
||||||
|
{
|
||||||
|
return new global::Marechai.App.Machines.Documents.DocumentsRequestBuilder(rawUrl, RequestAdapter);
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Configuration for the request such as headers, query parameters, and middleware options.
|
||||||
|
/// </summary>
|
||||||
|
[Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")]
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class DocumentsRequestBuilderPostRequestConfiguration : RequestConfiguration<DefaultQueryParameters>
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#pragma warning restore CS0618
|
||||||
@@ -0,0 +1,95 @@
|
|||||||
|
// <auto-generated/>
|
||||||
|
#pragma warning disable CS0618
|
||||||
|
using Marechai.App.Models;
|
||||||
|
using Microsoft.Kiota.Abstractions.Extensions;
|
||||||
|
using Microsoft.Kiota.Abstractions.Serialization;
|
||||||
|
using Microsoft.Kiota.Abstractions;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.IO;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System.Threading;
|
||||||
|
using System;
|
||||||
|
namespace Marechai.App.Machines.Documents.Item
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Builds and executes requests for operations under \machines\documents\{id}
|
||||||
|
/// </summary>
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class DocumentsItemRequestBuilder : BaseRequestBuilder
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Instantiates a new <see cref="global::Marechai.App.Machines.Documents.Item.DocumentsItemRequestBuilder"/> and sets the default values.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="pathParameters">Path parameters for the request</param>
|
||||||
|
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||||
|
public DocumentsItemRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/machines/documents/{id}", pathParameters)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Instantiates a new <see cref="global::Marechai.App.Machines.Documents.Item.DocumentsItemRequestBuilder"/> and sets the default values.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||||
|
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||||
|
public DocumentsItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/machines/documents/{id}", rawUrl)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="string"/></returns>
|
||||||
|
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
|
||||||
|
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 400 status code</exception>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 401 status code</exception>
|
||||||
|
/// <exception cref="global::Marechai.App.Models.ProblemDetails">When receiving a 404 status code</exception>
|
||||||
|
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||||
|
#nullable enable
|
||||||
|
public async Task<string?> DeleteAsync(Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public async Task<string> DeleteAsync(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
var requestInfo = ToDeleteRequestInformation(requestConfiguration);
|
||||||
|
var errorMapping = new Dictionary<string, ParsableFactory<IParsable>>
|
||||||
|
{
|
||||||
|
{ "400", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
{ "401", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
{ "404", global::Marechai.App.Models.ProblemDetails.CreateFromDiscriminatorValue },
|
||||||
|
};
|
||||||
|
return await RequestAdapter.SendPrimitiveAsync<string>(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false);
|
||||||
|
}
|
||||||
|
/// <returns>A <see cref="RequestInformation"/></returns>
|
||||||
|
/// <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 ToDeleteRequestInformation(Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#nullable restore
|
||||||
|
#else
|
||||||
|
public RequestInformation ToDeleteRequestInformation(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default)
|
||||||
|
{
|
||||||
|
#endif
|
||||||
|
var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters);
|
||||||
|
requestInfo.Configure(requestConfiguration);
|
||||||
|
requestInfo.Headers.TryAdd("Accept", "application/json, text/plain;q=0.9");
|
||||||
|
return requestInfo;
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>A <see cref="global::Marechai.App.Machines.Documents.Item.DocumentsItemRequestBuilder"/></returns>
|
||||||
|
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||||
|
public global::Marechai.App.Machines.Documents.Item.DocumentsItemRequestBuilder WithUrl(string rawUrl)
|
||||||
|
{
|
||||||
|
return new global::Marechai.App.Machines.Documents.Item.DocumentsItemRequestBuilder(rawUrl, RequestAdapter);
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Configuration for the request such as headers, query parameters, and middleware options.
|
||||||
|
/// </summary>
|
||||||
|
[Obsolete("This class is deprecated. Please use the generic RequestConfiguration class generated by the generator.")]
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class DocumentsItemRequestBuilderDeleteRequestConfiguration : RequestConfiguration<DefaultQueryParameters>
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#pragma warning restore CS0618
|
||||||
@@ -0,0 +1,61 @@
|
|||||||
|
// <auto-generated/>
|
||||||
|
#pragma warning disable CS0618
|
||||||
|
using Marechai.App.Machines.Gpus.ByMachine.Item;
|
||||||
|
using Microsoft.Kiota.Abstractions.Extensions;
|
||||||
|
using Microsoft.Kiota.Abstractions;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.IO;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using System;
|
||||||
|
namespace Marechai.App.Machines.Gpus.ByMachine
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Builds and executes requests for operations under \machines\gpus\by-machine
|
||||||
|
/// </summary>
|
||||||
|
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
|
||||||
|
public partial class ByMachineRequestBuilder : BaseRequestBuilder
|
||||||
|
{
|
||||||
|
/// <summary>Gets an item from the Marechai.App.machines.gpus.byMachine.item collection</summary>
|
||||||
|
/// <param name="position">Unique identifier of the item</param>
|
||||||
|
/// <returns>A <see cref="global::Marechai.App.Machines.Gpus.ByMachine.Item.WithMachineItemRequestBuilder"/></returns>
|
||||||
|
public global::Marechai.App.Machines.Gpus.ByMachine.Item.WithMachineItemRequestBuilder this[int position]
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
var urlTplParams = new Dictionary<string, object>(PathParameters);
|
||||||
|
urlTplParams.Add("machineId", position);
|
||||||
|
return new global::Marechai.App.Machines.Gpus.ByMachine.Item.WithMachineItemRequestBuilder(urlTplParams, RequestAdapter);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// <summary>Gets an item from the Marechai.App.machines.gpus.byMachine.item collection</summary>
|
||||||
|
/// <param name="position">Unique identifier of the item</param>
|
||||||
|
/// <returns>A <see cref="global::Marechai.App.Machines.Gpus.ByMachine.Item.WithMachineItemRequestBuilder"/></returns>
|
||||||
|
[Obsolete("This indexer is deprecated and will be removed in the next major version. Use the one with the typed parameter instead.")]
|
||||||
|
public global::Marechai.App.Machines.Gpus.ByMachine.Item.WithMachineItemRequestBuilder this[string position]
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
var urlTplParams = new Dictionary<string, object>(PathParameters);
|
||||||
|
if (!string.IsNullOrWhiteSpace(position)) urlTplParams.Add("machineId", position);
|
||||||
|
return new global::Marechai.App.Machines.Gpus.ByMachine.Item.WithMachineItemRequestBuilder(urlTplParams, RequestAdapter);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Instantiates a new <see cref="global::Marechai.App.Machines.Gpus.ByMachine.ByMachineRequestBuilder"/> and sets the default values.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="pathParameters">Path parameters for the request</param>
|
||||||
|
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||||
|
public ByMachineRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/machines/gpus/by-machine", pathParameters)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Instantiates a new <see cref="global::Marechai.App.Machines.Gpus.ByMachine.ByMachineRequestBuilder"/> and sets the default values.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
|
||||||
|
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
|
||||||
|
public ByMachineRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/machines/gpus/by-machine", rawUrl)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#pragma warning restore CS0618
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user