diff --git a/src/GitHub/Models/ApiOverview.cs b/src/GitHub/Models/ApiOverview.cs index 46783ad06..e7bc374d1 100644 --- a/src/GitHub/Models/ApiOverview.cs +++ b/src/GitHub/Models/ApiOverview.cs @@ -38,6 +38,14 @@ public partial class ApiOverview : IAdditionalDataHolder, IParsable #nullable restore #else public List Api { get; set; } +#endif + /// The codespaces property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Codespaces { get; set; } +#nullable restore +#else + public List Codespaces { get; set; } #endif /// The copilot property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -165,6 +173,7 @@ public virtual IDictionary> GetFieldDeserializers() { "actions", n => { Actions = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, { "actions_macos", n => { ActionsMacos = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, { "api", n => { Api = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "codespaces", n => { Codespaces = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, { "copilot", n => { Copilot = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, { "dependabot", n => { Dependabot = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, { "domains", n => { Domains = n.GetObjectValue(global::GitHub.Models.ApiOverview_domains.CreateFromDiscriminatorValue); } }, @@ -190,6 +199,7 @@ public virtual void Serialize(ISerializationWriter writer) writer.WriteCollectionOfPrimitiveValues("actions", Actions); writer.WriteCollectionOfPrimitiveValues("actions_macos", ActionsMacos); writer.WriteCollectionOfPrimitiveValues("api", Api); + writer.WriteCollectionOfPrimitiveValues("codespaces", Codespaces); writer.WriteCollectionOfPrimitiveValues("copilot", Copilot); writer.WriteCollectionOfPrimitiveValues("dependabot", Dependabot); writer.WriteObjectValue("domains", Domains); diff --git a/src/GitHub/Models/CvssSeverities.cs b/src/GitHub/Models/CvssSeverities.cs new file mode 100644 index 000000000..6c27af082 --- /dev/null +++ b/src/GitHub/Models/CvssSeverities.cs @@ -0,0 +1,75 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace GitHub.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.18.0")] + #pragma warning disable CS1591 + public partial class CvssSeverities : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The cvss_v3 property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::GitHub.Models.CvssSeverities_cvss_v3? CvssV3 { get; set; } +#nullable restore +#else + public global::GitHub.Models.CvssSeverities_cvss_v3 CvssV3 { get; set; } +#endif + /// The cvss_v4 property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::GitHub.Models.CvssSeverities_cvss_v4? CvssV4 { get; set; } +#nullable restore +#else + public global::GitHub.Models.CvssSeverities_cvss_v4 CvssV4 { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public CvssSeverities() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::GitHub.Models.CvssSeverities CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::GitHub.Models.CvssSeverities(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "cvss_v3", n => { CvssV3 = n.GetObjectValue(global::GitHub.Models.CvssSeverities_cvss_v3.CreateFromDiscriminatorValue); } }, + { "cvss_v4", n => { CvssV4 = n.GetObjectValue(global::GitHub.Models.CvssSeverities_cvss_v4.CreateFromDiscriminatorValue); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("cvss_v3", CvssV3); + writer.WriteObjectValue("cvss_v4", CvssV4); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/GitHub/Models/CvssSeverities_cvss_v3.cs b/src/GitHub/Models/CvssSeverities_cvss_v3.cs new file mode 100644 index 000000000..a0f595b3f --- /dev/null +++ b/src/GitHub/Models/CvssSeverities_cvss_v3.cs @@ -0,0 +1,68 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace GitHub.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.18.0")] + #pragma warning disable CS1591 + public partial class CvssSeverities_cvss_v3 : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The CVSS 3 score. + public double? Score { get; private set; } + /// The CVSS 3 vector string. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? VectorString { get; set; } +#nullable restore +#else + public string VectorString { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public CvssSeverities_cvss_v3() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::GitHub.Models.CvssSeverities_cvss_v3 CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::GitHub.Models.CvssSeverities_cvss_v3(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "score", n => { Score = n.GetDoubleValue(); } }, + { "vector_string", n => { VectorString = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("vector_string", VectorString); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/GitHub/Models/CvssSeverities_cvss_v4.cs b/src/GitHub/Models/CvssSeverities_cvss_v4.cs new file mode 100644 index 000000000..15f8f6999 --- /dev/null +++ b/src/GitHub/Models/CvssSeverities_cvss_v4.cs @@ -0,0 +1,68 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace GitHub.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.18.0")] + #pragma warning disable CS1591 + public partial class CvssSeverities_cvss_v4 : IAdditionalDataHolder, IParsable + #pragma warning restore CS1591 + { + /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. + public IDictionary AdditionalData { get; set; } + /// The CVSS 4 score. + public double? Score { get; private set; } + /// The CVSS 4 vector string. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? VectorString { get; set; } +#nullable restore +#else + public string VectorString { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public CvssSeverities_cvss_v4() + { + AdditionalData = new Dictionary(); + } + /// + /// Creates a new instance of the appropriate class based on discriminator value + /// + /// A + /// The parse node to use to read the discriminator value and create the object + public static global::GitHub.Models.CvssSeverities_cvss_v4 CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::GitHub.Models.CvssSeverities_cvss_v4(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "score", n => { Score = n.GetDoubleValue(); } }, + { "vector_string", n => { VectorString = n.GetStringValue(); } }, + }; + } + /// + /// Serializes information the current object + /// + /// Serialization writer to use to serialize this model + public virtual void Serialize(ISerializationWriter writer) + { + _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("vector_string", VectorString); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/GitHub/Models/DependabotAlertSecurityAdvisory.cs b/src/GitHub/Models/DependabotAlertSecurityAdvisory.cs index 6c02634fb..07fd54af4 100644 --- a/src/GitHub/Models/DependabotAlertSecurityAdvisory.cs +++ b/src/GitHub/Models/DependabotAlertSecurityAdvisory.cs @@ -28,6 +28,14 @@ public partial class DependabotAlertSecurityAdvisory : IParsable #nullable restore #else public global::GitHub.Models.DependabotAlertSecurityAdvisory_cvss Cvss { get; private set; } +#endif + /// The cvss_severities property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::GitHub.Models.CvssSeverities? CvssSeverities { get; set; } +#nullable restore +#else + public global::GitHub.Models.CvssSeverities CvssSeverities { get; set; } #endif /// Details for the advisory pertaining to Common Weakness Enumeration. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -113,6 +121,7 @@ public virtual IDictionary> GetFieldDeserializers() { { "cve_id", n => { CveId = n.GetStringValue(); } }, { "cvss", n => { Cvss = n.GetObjectValue(global::GitHub.Models.DependabotAlertSecurityAdvisory_cvss.CreateFromDiscriminatorValue); } }, + { "cvss_severities", n => { CvssSeverities = n.GetObjectValue(global::GitHub.Models.CvssSeverities.CreateFromDiscriminatorValue); } }, { "cwes", n => { Cwes = n.GetCollectionOfObjectValues(global::GitHub.Models.DependabotAlertSecurityAdvisory_cwes.CreateFromDiscriminatorValue)?.AsList(); } }, { "description", n => { Description = n.GetStringValue(); } }, { "ghsa_id", n => { GhsaId = n.GetStringValue(); } }, @@ -133,6 +142,7 @@ public virtual IDictionary> GetFieldDeserializers() public virtual void Serialize(ISerializationWriter writer) { _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteObjectValue("cvss_severities", CvssSeverities); } } } diff --git a/src/GitHub/Models/GlobalAdvisory.cs b/src/GitHub/Models/GlobalAdvisory.cs index 8ed59d8dc..8e7d1c1ee 100644 --- a/src/GitHub/Models/GlobalAdvisory.cs +++ b/src/GitHub/Models/GlobalAdvisory.cs @@ -36,6 +36,14 @@ public partial class GlobalAdvisory : IParsable #nullable restore #else public global::GitHub.Models.GlobalAdvisory_cvss Cvss { get; set; } +#endif + /// The cvss_severities property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::GitHub.Models.CvssSeverities? CvssSeverities { get; set; } +#nullable restore +#else + public global::GitHub.Models.CvssSeverities CvssSeverities { get; set; } #endif /// The cwes property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -168,6 +176,7 @@ public virtual IDictionary> GetFieldDeserializers() { "credits", n => { Credits = n.GetCollectionOfObjectValues(global::GitHub.Models.GlobalAdvisory_credits.CreateFromDiscriminatorValue)?.AsList(); } }, { "cve_id", n => { CveId = n.GetStringValue(); } }, { "cvss", n => { Cvss = n.GetObjectValue(global::GitHub.Models.GlobalAdvisory_cvss.CreateFromDiscriminatorValue); } }, + { "cvss_severities", n => { CvssSeverities = n.GetObjectValue(global::GitHub.Models.CvssSeverities.CreateFromDiscriminatorValue); } }, { "cwes", n => { Cwes = n.GetCollectionOfObjectValues(global::GitHub.Models.GlobalAdvisory_cwes.CreateFromDiscriminatorValue)?.AsList(); } }, { "description", n => { Description = n.GetStringValue(); } }, { "epss", n => { Epss = n.GetObjectValue(global::GitHub.Models.GlobalAdvisory_epss.CreateFromDiscriminatorValue); } }, @@ -197,6 +206,7 @@ public virtual void Serialize(ISerializationWriter writer) { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("cvss", Cvss); + writer.WriteObjectValue("cvss_severities", CvssSeverities); writer.WriteCollectionOfObjectValues("cwes", Cwes); writer.WriteStringValue("description", Description); writer.WriteObjectValue("epss", Epss); diff --git a/src/GitHub/Models/RepositoryAdvisory.cs b/src/GitHub/Models/RepositoryAdvisory.cs index 482ffa829..1f908adc4 100644 --- a/src/GitHub/Models/RepositoryAdvisory.cs +++ b/src/GitHub/Models/RepositoryAdvisory.cs @@ -72,6 +72,14 @@ public partial class RepositoryAdvisory : IParsable #nullable restore #else public global::GitHub.Models.RepositoryAdvisory_cvss Cvss { get; set; } +#endif + /// The cvss_severities property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::GitHub.Models.CvssSeverities? CvssSeverities { get; set; } +#nullable restore +#else + public global::GitHub.Models.CvssSeverities CvssSeverities { get; set; } #endif /// A list of only the CWE IDs. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -206,6 +214,7 @@ public virtual IDictionary> GetFieldDeserializers() { "credits_detailed", n => { CreditsDetailed = n.GetCollectionOfObjectValues(global::GitHub.Models.RepositoryAdvisoryCredit.CreateFromDiscriminatorValue)?.AsList(); } }, { "cve_id", n => { CveId = n.GetStringValue(); } }, { "cvss", n => { Cvss = n.GetObjectValue(global::GitHub.Models.RepositoryAdvisory_cvss.CreateFromDiscriminatorValue); } }, + { "cvss_severities", n => { CvssSeverities = n.GetObjectValue(global::GitHub.Models.CvssSeverities.CreateFromDiscriminatorValue); } }, { "cwe_ids", n => { CweIds = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, { "cwes", n => { Cwes = n.GetCollectionOfObjectValues(global::GitHub.Models.RepositoryAdvisory_cwes.CreateFromDiscriminatorValue)?.AsList(); } }, { "description", n => { Description = n.GetStringValue(); } }, @@ -237,6 +246,7 @@ public virtual void Serialize(ISerializationWriter writer) writer.WriteCollectionOfObjectValues("credits", Credits); writer.WriteStringValue("cve_id", CveId); writer.WriteObjectValue("cvss", Cvss); + writer.WriteObjectValue("cvss_severities", CvssSeverities); writer.WriteCollectionOfPrimitiveValues("cwe_ids", CweIds); writer.WriteStringValue("description", Description); writer.WriteEnumValue("severity", Severity); diff --git a/src/GitHub/Repos/Item/Item/Attestations/AttestationsRequestBuilder.cs b/src/GitHub/Repos/Item/Item/Attestations/AttestationsRequestBuilder.cs index 368af25de..ae33d4b3f 100644 --- a/src/GitHub/Repos/Item/Item/Attestations/AttestationsRequestBuilder.cs +++ b/src/GitHub/Repos/Item/Item/Attestations/AttestationsRequestBuilder.cs @@ -47,7 +47,7 @@ public AttestationsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) { } /// - /// Store an artifact attestation and associate it with a repository.The authenticated user must have write permission to the repository and, if using a fine-grained access token the `attestations:write` permission is required.Artifact attestations are meant to be created using the [attest action](https://github.com/actions/attest). For amore information, see our guide on [using artifact attestations to establish a build's provenance](https://docs.github.com/actions/security-guides/using-artifact-attestations-to-establish-provenance-for-builds). + /// Store an artifact attestation and associate it with a repository.The authenticated user must have write permission to the repository and, if using a fine-grained access token, the `attestations:write` permission is required.Artifact attestations are meant to be created using the [attest action](https://github.com/actions/attest). For more information, see our guide on [using artifact attestations to establish a build's provenance](https://docs.github.com/actions/security-guides/using-artifact-attestations-to-establish-provenance-for-builds). /// API method documentation /// /// A @@ -75,7 +75,7 @@ public AttestationsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) return await RequestAdapter.SendAsync(requestInfo, global::GitHub.Repos.Item.Item.Attestations.AttestationsPostResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } /// - /// Store an artifact attestation and associate it with a repository.The authenticated user must have write permission to the repository and, if using a fine-grained access token the `attestations:write` permission is required.Artifact attestations are meant to be created using the [attest action](https://github.com/actions/attest). For amore information, see our guide on [using artifact attestations to establish a build's provenance](https://docs.github.com/actions/security-guides/using-artifact-attestations-to-establish-provenance-for-builds). + /// Store an artifact attestation and associate it with a repository.The authenticated user must have write permission to the repository and, if using a fine-grained access token, the `attestations:write` permission is required.Artifact attestations are meant to be created using the [attest action](https://github.com/actions/attest). For more information, see our guide on [using artifact attestations to establish a build's provenance](https://docs.github.com/actions/security-guides/using-artifact-attestations-to-establish-provenance-for-builds). /// /// A /// The request body diff --git a/src/GitHub/kiota-lock.json b/src/GitHub/kiota-lock.json index 3a9c8c8d8..1f10ef7ee 100644 --- a/src/GitHub/kiota-lock.json +++ b/src/GitHub/kiota-lock.json @@ -1,5 +1,5 @@ { - "descriptionHash": "BA91C3BB1A23F684E1870FA204C6ABF31758D58516ADD382643A069304EEB9DF171AC3937CBC7331DBAC5C862CA34022EC31D7C8DE0D6081994CF0CAE918E79B", + "descriptionHash": "A70F835CD26420D828FA7EA37F5DF890C843914085A9BA22F3E6BE4029BD88B7EBBF31EEFB7E3EAA9081998B3BF1C6F6C0FBD3CB63930AF0002F36F092E48990", "descriptionLocation": "../../../../../schemas/api.github.com.json", "lockFileVersion": "1.0.0", "kiotaVersion": "1.18.0",