Skip to content

Commit

Permalink
Changes in generated code (#115)
Browse files Browse the repository at this point in the history
* New updates to generated code

* New updates to generated code
  • Loading branch information
octokitbot authored Aug 30, 2024
1 parent 791dde4 commit 3cdade9
Show file tree
Hide file tree
Showing 2,449 changed files with 40,180 additions and 35,177 deletions.
16 changes: 8 additions & 8 deletions src/GitHub.Octokit.SDK.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,14 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.IdentityModel.JsonWebTokens" Version="8.0.1" />
<PackageReference Include="Microsoft.Kiota.Abstractions" Version="1.8.4" />
<PackageReference Include="Microsoft.Kiota.Http.HttpClientLibrary" Version="1.4.0" />
<PackageReference Include="Microsoft.Kiota.Serialization.Form" Version="1.1.6" />
<PackageReference Include="Microsoft.Kiota.Serialization.Json" Version="1.2.3" />
<PackageReference Include="Microsoft.Kiota.Serialization.Multipart" Version="1.1.4" />
<PackageReference Include="Microsoft.Kiota.Serialization.Text" Version="1.1.5" />
<PackageReference Include="Microsoft.Kiota.Authentication.Azure" Version="1.1.5" />
<PackageReference Include="Microsoft.IdentityModel.JsonWebTokens" Version="8.0.2" />
<PackageReference Include="Microsoft.Kiota.Abstractions" Version="1.11.0" />
<PackageReference Include="Microsoft.Kiota.Http.HttpClientLibrary" Version="1.11.0" />
<PackageReference Include="Microsoft.Kiota.Serialization.Form" Version="1.11.0" />
<PackageReference Include="Microsoft.Kiota.Serialization.Json" Version="1.11.0" />
<PackageReference Include="Microsoft.Kiota.Serialization.Multipart" Version="1.11.0" />
<PackageReference Include="Microsoft.Kiota.Serialization.Text" Version="1.11.0" />
<PackageReference Include="Microsoft.Kiota.Authentication.Azure" Version="1.11.0" />
<None Include="NugetREADME.md" Pack="true" PackagePath="\" />
<None Include="octokit.png" Pack="true" PackagePath="\" />
</ItemGroup>
Expand Down
83 changes: 53 additions & 30 deletions src/GitHub/Advisories/AdvisoriesRequestBuilder.cs
Original file line number Diff line number Diff line change
@@ -1,74 +1,76 @@
// <auto-generated/>
using GitHub.Advisories.Item;
using GitHub.Models;
using Microsoft.Kiota.Abstractions.Extensions;
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.Advisories {
namespace GitHub.Advisories
{
/// <summary>
/// Builds and executes requests for operations under \advisories
/// </summary>
public class AdvisoriesRequestBuilder : BaseRequestBuilder
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.17.0")]
public partial class AdvisoriesRequestBuilder : BaseRequestBuilder
{
/// <summary>Gets an item from the GitHub.advisories.item collection</summary>
/// <param name="position">The GHSA (GitHub Security Advisory) identifier of the advisory.</param>
/// <returns>A <see cref="WithGhsa_ItemRequestBuilder"/></returns>
public WithGhsa_ItemRequestBuilder this[string position]
/// <returns>A <see cref="global::GitHub.Advisories.Item.WithGhsa_ItemRequestBuilder"/></returns>
public global::GitHub.Advisories.Item.WithGhsa_ItemRequestBuilder this[string position]
{
get
{
var urlTplParams = new Dictionary<string, object>(PathParameters);
urlTplParams.Add("ghsa_id", position);
return new WithGhsa_ItemRequestBuilder(urlTplParams, RequestAdapter);
return new global::GitHub.Advisories.Item.WithGhsa_ItemRequestBuilder(urlTplParams, RequestAdapter);
}
}
/// <summary>
/// Instantiates a new <see cref="AdvisoriesRequestBuilder"/> and sets the default values.
/// Instantiates a new <see cref="global::GitHub.Advisories.AdvisoriesRequestBuilder"/> 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 AdvisoriesRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/advisories{?affects*,after*,before*,cve_id*,cwes*,direction*,ecosystem*,ghsa_id*,is_withdrawn*,modified*,per_page*,published*,severity*,sort*,type*,updated*}", pathParameters)
public AdvisoriesRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/advisories{?affects*,after*,before*,cve_id*,cwes*,direction*,ecosystem*,epss_percentage*,epss_percentile*,ghsa_id*,is_withdrawn*,modified*,per_page*,published*,severity*,sort*,type*,updated*}", pathParameters)
{
}
/// <summary>
/// Instantiates a new <see cref="AdvisoriesRequestBuilder"/> and sets the default values.
/// Instantiates a new <see cref="global::GitHub.Advisories.AdvisoriesRequestBuilder"/> 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 AdvisoriesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/advisories{?affects*,after*,before*,cve_id*,cwes*,direction*,ecosystem*,ghsa_id*,is_withdrawn*,modified*,per_page*,published*,severity*,sort*,type*,updated*}", rawUrl)
public AdvisoriesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/advisories{?affects*,after*,before*,cve_id*,cwes*,direction*,ecosystem*,epss_percentage*,epss_percentile*,ghsa_id*,is_withdrawn*,modified*,per_page*,published*,severity*,sort*,type*,updated*}", rawUrl)
{
}
/// <summary>
/// Lists all global security advisories that match the specified parameters. If no other parameters are defined, the request will return only GitHub-reviewed advisories that are not malware.By default, all responses will exclude advisories for malware, because malware are not standard vulnerabilities. To list advisories for malware, you must include the `type` parameter in your request, with the value `malware`. For more information about the different types of security advisories, see &quot;[About the GitHub Advisory database](https://docs.github.com/code-security/security-advisories/global-security-advisories/about-the-github-advisory-database#about-types-of-security-advisories).&quot;
/// API method documentation <see href="https://docs.github.com/rest/security-advisories/global-advisories#list-global-security-advisories" />
/// </summary>
/// <returns>A List&lt;GlobalAdvisory&gt;</returns>
/// <returns>A List&lt;global::GitHub.Models.GlobalAdvisory&gt;</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="ValidationErrorSimple">When receiving a 422 status code</exception>
/// <exception cref="BasicError">When receiving a 429 status code</exception>
/// <exception cref="global::GitHub.Models.ValidationErrorSimple">When receiving a 422 status code</exception>
/// <exception cref="global::GitHub.Models.BasicError">When receiving a 429 status code</exception>
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
public async Task<List<GlobalAdvisory>?> GetAsync(Action<RequestConfiguration<AdvisoriesRequestBuilderGetQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default)
public async Task<List<global::GitHub.Models.GlobalAdvisory>?> GetAsync(Action<RequestConfiguration<global::GitHub.Advisories.AdvisoriesRequestBuilder.AdvisoriesRequestBuilderGetQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default)
{
#nullable restore
#else
public async Task<List<GlobalAdvisory>> GetAsync(Action<RequestConfiguration<AdvisoriesRequestBuilderGetQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default)
public async Task<List<global::GitHub.Models.GlobalAdvisory>> GetAsync(Action<RequestConfiguration<global::GitHub.Advisories.AdvisoriesRequestBuilder.AdvisoriesRequestBuilderGetQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default)
{
#endif
var requestInfo = ToGetRequestInformation(requestConfiguration);
var errorMapping = new Dictionary<string, ParsableFactory<IParsable>>
{
{"422", ValidationErrorSimple.CreateFromDiscriminatorValue},
{"429", BasicError.CreateFromDiscriminatorValue},
{ "422", global::GitHub.Models.ValidationErrorSimple.CreateFromDiscriminatorValue },
{ "429", global::GitHub.Models.BasicError.CreateFromDiscriminatorValue },
};
var collectionResult = await RequestAdapter.SendCollectionAsync<GlobalAdvisory>(requestInfo, GlobalAdvisory.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false);
return collectionResult?.ToList();
var collectionResult = await RequestAdapter.SendCollectionAsync<global::GitHub.Models.GlobalAdvisory>(requestInfo, global::GitHub.Models.GlobalAdvisory.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false);
return collectionResult?.AsList();
}
/// <summary>
/// Lists all global security advisories that match the specified parameters. If no other parameters are defined, the request will return only GitHub-reviewed advisories that are not malware.By default, all responses will exclude advisories for malware, because malware are not standard vulnerabilities. To list advisories for malware, you must include the `type` parameter in your request, with the value `malware`. For more information about the different types of security advisories, see &quot;[About the GitHub Advisory database](https://docs.github.com/code-security/security-advisories/global-security-advisories/about-the-github-advisory-database#about-types-of-security-advisories).&quot;
Expand All @@ -77,11 +79,11 @@ public async Task<List<GlobalAdvisory>> GetAsync(Action<RequestConfiguration<Adv
/// <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<AdvisoriesRequestBuilderGetQueryParameters>>? requestConfiguration = default)
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<global::GitHub.Advisories.AdvisoriesRequestBuilder.AdvisoriesRequestBuilderGetQueryParameters>>? requestConfiguration = default)
{
#nullable restore
#else
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<AdvisoriesRequestBuilderGetQueryParameters>> requestConfiguration = default)
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<global::GitHub.Advisories.AdvisoriesRequestBuilder.AdvisoriesRequestBuilderGetQueryParameters>> requestConfiguration = default)
{
#endif
var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters);
Expand All @@ -92,16 +94,17 @@ public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<Ad
/// <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="AdvisoriesRequestBuilder"/></returns>
/// <returns>A <see cref="global::GitHub.Advisories.AdvisoriesRequestBuilder"/></returns>
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
public AdvisoriesRequestBuilder WithUrl(string rawUrl)
public global::GitHub.Advisories.AdvisoriesRequestBuilder WithUrl(string rawUrl)
{
return new AdvisoriesRequestBuilder(rawUrl, RequestAdapter);
return new global::GitHub.Advisories.AdvisoriesRequestBuilder(rawUrl, RequestAdapter);
}
/// <summary>
/// Lists all global security advisories that match the specified parameters. If no other parameters are defined, the request will return only GitHub-reviewed advisories that are not malware.By default, all responses will exclude advisories for malware, because malware are not standard vulnerabilities. To list advisories for malware, you must include the `type` parameter in your request, with the value `malware`. For more information about the different types of security advisories, see &quot;[About the GitHub Advisory database](https://docs.github.com/code-security/security-advisories/global-security-advisories/about-the-github-advisory-database#about-types-of-security-advisories).&quot;
/// </summary>
public class AdvisoriesRequestBuilderGetQueryParameters
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.17.0")]
public partial class AdvisoriesRequestBuilderGetQueryParameters
{
/// <summary>If specified, only return advisories that affect any of `package` or `package@version`. A maximum of 1000 packages can be specified.If the query parameter causes the URL to exceed the maximum URL length supported by your client, you must specify fewer packages.Example: `affects=package1,package2@1.0.0,package3@^2.0.0` or `affects[]=package1&amp;affects[]=package2@1.0.0`</summary>
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
Expand Down Expand Up @@ -155,10 +158,30 @@ public class AdvisoriesRequestBuilderGetQueryParameters
#endif
/// <summary>The direction to sort the results by.</summary>
[QueryParameter("direction")]
public GetDirectionQueryParameterType? Direction { get; set; }
public global::GitHub.Advisories.GetDirectionQueryParameterType? Direction { get; set; }
/// <summary>If specified, only advisories for these ecosystems will be returned.</summary>
[QueryParameter("ecosystem")]
public SecurityAdvisoryEcosystems? Ecosystem { get; set; }
public global::GitHub.Models.SecurityAdvisoryEcosystems? Ecosystem { get; set; }
/// <summary>If specified, only return advisories that have an EPSS percentage score that matches the provided value.The EPSS percentage represents the likelihood of a CVE being exploited.</summary>
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
[QueryParameter("epss_percentage")]
public string? EpssPercentage { get; set; }
#nullable restore
#else
[QueryParameter("epss_percentage")]
public string EpssPercentage { get; set; }
#endif
/// <summary>If specified, only return advisories that have an EPSS percentile score that matches the provided value.The EPSS percentile represents the relative rank of the CVE&apos;s likelihood of being exploited compared to other CVEs.</summary>
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
[QueryParameter("epss_percentile")]
public string? EpssPercentile { get; set; }
#nullable restore
#else
[QueryParameter("epss_percentile")]
public string EpssPercentile { get; set; }
#endif
/// <summary>If specified, only advisories with this GHSA (GitHub Security Advisory) identifier will be returned.</summary>
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
Expand Down Expand Up @@ -197,13 +220,13 @@ public class AdvisoriesRequestBuilderGetQueryParameters
#endif
/// <summary>If specified, only advisories with these severities will be returned.</summary>
[QueryParameter("severity")]
public GetSeverityQueryParameterType? Severity { get; set; }
public global::GitHub.Advisories.GetSeverityQueryParameterType? Severity { get; set; }
/// <summary>The property to sort the results by.</summary>
[QueryParameter("sort")]
public GetSortQueryParameterType? Sort { get; set; }
public global::GitHub.Advisories.GetSortQueryParameterType? Sort { get; set; }
/// <summary>If specified, only advisories of this type will be returned. By default, a request with no other parameters defined will only return reviewed advisories that are not malware.</summary>
[QueryParameter("type")]
public GetTypeQueryParameterType? Type { get; set; }
public global::GitHub.Advisories.GetTypeQueryParameterType? Type { get; set; }
/// <summary>If specified, only return advisories that were updated on a date or date range.For more information on the syntax of the date range, see &quot;[Understanding the search syntax](https://docs.github.com/search-github/getting-started-with-searching-on-github/understanding-the-search-syntax#query-for-dates).&quot;</summary>
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
Expand Down
4 changes: 3 additions & 1 deletion src/GitHub/Advisories/GetDirectionQueryParameterType.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
// <auto-generated/>
using System.Runtime.Serialization;
using System;
namespace GitHub.Advisories {
namespace GitHub.Advisories
{
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.17.0")]
#pragma warning disable CS1591
public enum GetDirectionQueryParameterType
#pragma warning restore CS1591
Expand Down
4 changes: 3 additions & 1 deletion src/GitHub/Advisories/GetSeverityQueryParameterType.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
// <auto-generated/>
using System.Runtime.Serialization;
using System;
namespace GitHub.Advisories {
namespace GitHub.Advisories
{
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.17.0")]
#pragma warning disable CS1591
public enum GetSeverityQueryParameterType
#pragma warning restore CS1591
Expand Down
4 changes: 3 additions & 1 deletion src/GitHub/Advisories/GetSortQueryParameterType.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
// <auto-generated/>
using System.Runtime.Serialization;
using System;
namespace GitHub.Advisories {
namespace GitHub.Advisories
{
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.17.0")]
#pragma warning disable CS1591
public enum GetSortQueryParameterType
#pragma warning restore CS1591
Expand Down
4 changes: 3 additions & 1 deletion src/GitHub/Advisories/GetTypeQueryParameterType.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
// <auto-generated/>
using System.Runtime.Serialization;
using System;
namespace GitHub.Advisories {
namespace GitHub.Advisories
{
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.17.0")]
#pragma warning disable CS1591
public enum GetTypeQueryParameterType
#pragma warning restore CS1591
Expand Down
Loading

0 comments on commit 3cdade9

Please sign in to comment.