Skip to content

Commit

Permalink
fix: adds missing files
Browse files Browse the repository at this point in the history
  • Loading branch information
baywet committed Jun 21, 2024
1 parent 52ef08f commit 7c45bd0
Show file tree
Hide file tree
Showing 2 changed files with 138 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
// <auto-generated/>
using GitHub.ApiClient.Models;
using Microsoft.Kiota.Abstractions.Serialization;
using Microsoft.Kiota.Abstractions;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Threading.Tasks;
using System.Threading;
using System;
namespace GitHub.ApiClient.Repos.Item.Item.Releases.Item
{
/// <summary>
/// Builds and executes requests for operations under \repos\{owner}\{repo}\releases\{releaseName}
/// </summary>
public class WithReleaseNameItemRequestBuilder : BaseRequestBuilder
{
/// <summary>
/// Instantiates a new <see cref="GitHub.ApiClient.Repos.Item.Item.Releases.Item.WithReleaseNameItemRequestBuilder"/> 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 WithReleaseNameItemRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner}/{repo}/releases/{releaseName}", pathParameters)
{
}
/// <summary>
/// Instantiates a new <see cref="GitHub.ApiClient.Repos.Item.Item.Releases.Item.WithReleaseNameItemRequestBuilder"/> 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 WithReleaseNameItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner}/{repo}/releases/{releaseName}", rawUrl)
{
}
/// <summary>
/// Get the latest release
/// </summary>
/// <returns>A <see cref="GitHub.ApiClient.Models.Release"/></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="GitHub.ApiClient.Models.Error">When receiving a 404 status code</exception>
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
public async Task<GitHub.ApiClient.Models.Release?> GetAsync(Action<RequestConfiguration<DefaultQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default)
{
#nullable restore
#else
public async Task<GitHub.ApiClient.Models.Release> GetAsync(Action<RequestConfiguration<DefaultQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default)
{
#endif
var requestInfo = ToGetRequestInformation(requestConfiguration);
var errorMapping = new Dictionary<string, ParsableFactory<IParsable>>
{
{ "404", GitHub.ApiClient.Models.Error.CreateFromDiscriminatorValue },
};
return await RequestAdapter.SendAsync<GitHub.ApiClient.Models.Release>(requestInfo, GitHub.ApiClient.Models.Release.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false);
}
/// <summary>
/// Get the latest release
/// </summary>
/// <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");
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="GitHub.ApiClient.Repos.Item.Item.Releases.Item.WithReleaseNameItemRequestBuilder"/></returns>
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
public GitHub.ApiClient.Repos.Item.Item.Releases.Item.WithReleaseNameItemRequestBuilder WithUrl(string rawUrl)
{
return new GitHub.ApiClient.Repos.Item.Item.Releases.Item.WithReleaseNameItemRequestBuilder(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.")]
public class WithReleaseNameItemRequestBuilderGetRequestConfiguration : RequestConfiguration<DefaultQueryParameters>
{
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
// <auto-generated/>
using GitHub.ApiClient.Repos.Item.Item.Releases.Item;
using Microsoft.Kiota.Abstractions;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Threading.Tasks;
using System;
namespace GitHub.ApiClient.Repos.Item.Item.Releases
{
/// <summary>
/// Builds and executes requests for operations under \repos\{owner}\{repo}\releases
/// </summary>
public class ReleasesRequestBuilder : BaseRequestBuilder
{
/// <summary>Gets an item from the GitHub.ApiClient.repos.item.item.releases.item collection</summary>
/// <param name="position">The name of the release</param>
/// <returns>A <see cref="GitHub.ApiClient.Repos.Item.Item.Releases.Item.WithReleaseNameItemRequestBuilder"/></returns>
public GitHub.ApiClient.Repos.Item.Item.Releases.Item.WithReleaseNameItemRequestBuilder this[string position]
{
get
{
var urlTplParams = new Dictionary<string, object>(PathParameters);
urlTplParams.Add("releaseName", position);
return new GitHub.ApiClient.Repos.Item.Item.Releases.Item.WithReleaseNameItemRequestBuilder(urlTplParams, RequestAdapter);
}
}
/// <summary>
/// Instantiates a new <see cref="GitHub.ApiClient.Repos.Item.Item.Releases.ReleasesRequestBuilder"/> 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 ReleasesRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner}/{repo}/releases", pathParameters)
{
}
/// <summary>
/// Instantiates a new <see cref="GitHub.ApiClient.Repos.Item.Item.Releases.ReleasesRequestBuilder"/> 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 ReleasesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner}/{repo}/releases", rawUrl)
{
}
}
}

0 comments on commit 7c45bd0

Please sign in to comment.