2025-11-14 13:33:27 +00:00
// <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.ResolutionsByGpu.Gpus.Item.Resolutions
{
/// <summary>
2025-11-16 04:56:16 +00:00
/// Builds and executes requests for operations under \resolutions-by-gpu\gpus\{gpuId}\resolutions
2025-11-14 13:33:27 +00:00
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.0.0")]
public partial class ResolutionsRequestBuilder : BaseRequestBuilder
{
/// <summary>
/// Instantiates a new <see cref="global::Marechai.App.ResolutionsByGpu.Gpus.Item.Resolutions.ResolutionsRequestBuilder"/> 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>
2025-11-16 04:56:16 +00:00
public ResolutionsRequestBuilder ( Dictionary < string , object > pathParameters , IRequestAdapter requestAdapter ) : base ( requestAdapter , "{+baseurl}/resolutions-by-gpu/gpus/{gpuId}/resolutions" , pathParameters )
2025-11-14 13:33:27 +00:00
{
}
/// <summary>
/// Instantiates a new <see cref="global::Marechai.App.ResolutionsByGpu.Gpus.Item.Resolutions.ResolutionsRequestBuilder"/> 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>
2025-11-16 04:56:16 +00:00
public ResolutionsRequestBuilder ( string rawUrl , IRequestAdapter requestAdapter ) : base ( requestAdapter , "{+baseurl}/resolutions-by-gpu/gpus/{gpuId}/resolutions" , rawUrl )
2025-11-14 13:33:27 +00:00
{
}
/// <returns>A List<global::Marechai.App.Models.ResolutionByGpuDto></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 . ResolutionByGpuDto > ? > GetAsync ( Action < RequestConfiguration < DefaultQueryParameters > > ? requestConfiguration = default , CancellationToken cancellationToken = default )
{
#nullable restore
#else
public async Task < List < global :: Marechai . App . Models . ResolutionByGpuDto > > 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 . ResolutionByGpuDto > ( requestInfo , global :: Marechai . App . Models . ResolutionByGpuDto . 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.ResolutionsByGpu.Gpus.Item.Resolutions.ResolutionsRequestBuilder"/></returns>
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
public global :: Marechai . App . ResolutionsByGpu . Gpus . Item . Resolutions . ResolutionsRequestBuilder WithUrl ( string rawUrl )
{
return new global :: Marechai . App . ResolutionsByGpu . Gpus . Item . Resolutions . ResolutionsRequestBuilder ( 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 ResolutionsRequestBuilderGetRequestConfiguration : RequestConfiguration < DefaultQueryParameters >
{
}
}
}
#pragma warning restore CS0618