diff --git a/src/GitHub.Octokit.GHEC.SDK.csproj b/src/GitHub.Octokit.GHEC.SDK.csproj index 196c8894..878899fb 100644 --- a/src/GitHub.Octokit.GHEC.SDK.csproj +++ b/src/GitHub.Octokit.GHEC.SDK.csproj @@ -33,7 +33,7 @@ - + diff --git a/src/GitHub/Models/OrganizationFull.cs b/src/GitHub/Models/OrganizationFull.cs index 072bdf33..01c06907 100644 --- a/src/GitHub/Models/OrganizationFull.cs +++ b/src/GitHub/Models/OrganizationFull.cs @@ -44,8 +44,6 @@ public partial class OrganizationFull : IAdditionalDataHolder, IParsable #else public string Blog { get; set; } #endif - /// The collaborators property - public int? Collaborators { get; set; } /// The company property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -312,7 +310,6 @@ public virtual IDictionary> GetFieldDeserializers() { "avatar_url", n => { AvatarUrl = n.GetStringValue(); } }, { "billing_email", n => { BillingEmail = n.GetStringValue(); } }, { "blog", n => { Blog = n.GetStringValue(); } }, - { "collaborators", n => { Collaborators = n.GetIntValue(); } }, { "company", n => { Company = n.GetStringValue(); } }, { "created_at", n => { CreatedAt = n.GetDateTimeOffsetValue(); } }, { "default_repository_permission", n => { DefaultRepositoryPermission = n.GetStringValue(); } }, @@ -379,7 +376,6 @@ public virtual void Serialize(ISerializationWriter writer) writer.WriteStringValue("avatar_url", AvatarUrl); writer.WriteStringValue("billing_email", BillingEmail); writer.WriteStringValue("blog", Blog); - writer.WriteIntValue("collaborators", Collaborators); writer.WriteStringValue("company", Company); writer.WriteDateTimeOffsetValue("created_at", CreatedAt); writer.WriteStringValue("default_repository_permission", DefaultRepositoryPermission); diff --git a/src/GitHub/Models/Users.cs b/src/GitHub/Models/Users.cs index ee1970b9..1353411f 100644 --- a/src/GitHub/Models/Users.cs +++ b/src/GitHub/Models/Users.cs @@ -14,45 +14,23 @@ public partial class Users : IAdditionalDataHolder, IParsable { /// 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 fragment property + /// Whether this email address is the primary address. + public bool? Primary { get; set; } + /// The type of email address. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public string? Fragment { get; set; } + public string? Type { get; set; } #nullable restore #else - public string Fragment { get; set; } + public string Type { get; set; } #endif - /// The matches property + /// The email address. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? Matches { get; set; } + public string? Value { get; set; } #nullable restore #else - public List Matches { get; set; } -#endif - /// The object_type property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable - public string? ObjectType { get; set; } -#nullable restore -#else - public string ObjectType { get; set; } -#endif - /// The object_url property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable - public string? ObjectUrl { get; set; } -#nullable restore -#else - public string ObjectUrl { get; set; } -#endif - /// The property property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable - public string? Property { get; set; } -#nullable restore -#else - public string Property { get; set; } + public string Value { get; set; } #endif /// /// Instantiates a new and sets the default values. @@ -79,11 +57,9 @@ public virtual IDictionary> GetFieldDeserializers() { return new Dictionary> { - { "fragment", n => { Fragment = n.GetStringValue(); } }, - { "matches", n => { Matches = n.GetCollectionOfObjectValues(global::GitHub.Models.Users_matches.CreateFromDiscriminatorValue)?.AsList(); } }, - { "object_type", n => { ObjectType = n.GetStringValue(); } }, - { "object_url", n => { ObjectUrl = n.GetStringValue(); } }, - { "property", n => { Property = n.GetStringValue(); } }, + { "primary", n => { Primary = n.GetBoolValue(); } }, + { "type", n => { Type = n.GetStringValue(); } }, + { "value", n => { Value = n.GetStringValue(); } }, }; } /// @@ -93,11 +69,9 @@ public virtual IDictionary> GetFieldDeserializers() public virtual void Serialize(ISerializationWriter writer) { _ = writer ?? throw new ArgumentNullException(nameof(writer)); - writer.WriteStringValue("fragment", Fragment); - writer.WriteCollectionOfObjectValues("matches", Matches); - writer.WriteStringValue("object_type", ObjectType); - writer.WriteStringValue("object_url", ObjectUrl); - writer.WriteStringValue("property", Property); + writer.WriteBoolValue("primary", Primary); + writer.WriteStringValue("type", Type); + writer.WriteStringValue("value", Value); writer.WriteAdditionalData(AdditionalData); } } diff --git a/src/GitHub/Models/Users_matches.cs b/src/GitHub/Models/Users_matches.cs deleted file mode 100644 index 02c4f2f4..00000000 --- a/src/GitHub/Models/Users_matches.cs +++ /dev/null @@ -1,75 +0,0 @@ -// -#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.19.0")] - #pragma warning disable CS1591 - public partial class Users_matches : 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 indices property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable - public List? Indices { get; set; } -#nullable restore -#else - public List Indices { get; set; } -#endif - /// The text property -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable - public string? Text { get; set; } -#nullable restore -#else - public string Text { get; set; } -#endif - /// - /// Instantiates a new and sets the default values. - /// - public Users_matches() - { - 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.Users_matches CreateFromDiscriminatorValue(IParseNode parseNode) - { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new global::GitHub.Models.Users_matches(); - } - /// - /// The deserialization information for the current model - /// - /// A IDictionary<string, Action<IParseNode>> - public virtual IDictionary> GetFieldDeserializers() - { - return new Dictionary> - { - { "indices", n => { Indices = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, - { "text", n => { Text = 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.WriteCollectionOfPrimitiveValues("indices", Indices); - writer.WriteStringValue("text", Text); - writer.WriteAdditionalData(AdditionalData); - } - } -} -#pragma warning restore CS0618 diff --git a/src/GitHub/Orgs/Item/Rulesets/RulesetsRequestBuilder.cs b/src/GitHub/Orgs/Item/Rulesets/RulesetsRequestBuilder.cs index ffcce7eb..812a8a22 100644 --- a/src/GitHub/Orgs/Item/Rulesets/RulesetsRequestBuilder.cs +++ b/src/GitHub/Orgs/Item/Rulesets/RulesetsRequestBuilder.cs @@ -41,7 +41,7 @@ public partial class RulesetsRequestBuilder : BaseRequestBuilder /// /// Path parameters for the request /// The request adapter to use to execute the requests. - public RulesetsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/rulesets{?page*,per_page*}", pathParameters) + public RulesetsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/rulesets{?page*,per_page*,targets*}", pathParameters) { } /// @@ -49,7 +49,7 @@ public RulesetsRequestBuilder(Dictionary pathParameters, IReques /// /// The raw URL to use for the request builder. /// The request adapter to use to execute the requests. - public RulesetsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/rulesets{?page*,per_page*}", rawUrl) + public RulesetsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/rulesets{?page*,per_page*,targets*}", rawUrl) { } /// @@ -169,6 +169,16 @@ public partial class RulesetsRequestBuilderGetQueryParameters /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." [QueryParameter("per_page")] public int? PerPage { get; set; } + /// A comma-separated list of rule targets to filter by.If provided, only rulesets that apply to the specified targets will be returned.For example, `branch,tag,push`. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("targets")] + public string? Targets { get; set; } +#nullable restore +#else + [QueryParameter("targets")] + public string Targets { get; set; } +#endif } } } diff --git a/src/GitHub/Repos/Item/Item/Rulesets/RulesetsRequestBuilder.cs b/src/GitHub/Repos/Item/Item/Rulesets/RulesetsRequestBuilder.cs index af6a2f0d..3a9db860 100644 --- a/src/GitHub/Repos/Item/Item/Rulesets/RulesetsRequestBuilder.cs +++ b/src/GitHub/Repos/Item/Item/Rulesets/RulesetsRequestBuilder.cs @@ -41,7 +41,7 @@ public partial class RulesetsRequestBuilder : BaseRequestBuilder /// /// Path parameters for the request /// The request adapter to use to execute the requests. - public RulesetsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/rulesets{?includes_parents*,page*,per_page*}", pathParameters) + public RulesetsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/rulesets{?includes_parents*,page*,per_page*,targets*}", pathParameters) { } /// @@ -49,7 +49,7 @@ public RulesetsRequestBuilder(Dictionary pathParameters, IReques /// /// The raw URL to use for the request builder. /// The request adapter to use to execute the requests. - public RulesetsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/rulesets{?includes_parents*,page*,per_page*}", rawUrl) + public RulesetsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/rulesets{?includes_parents*,page*,per_page*,targets*}", rawUrl) { } /// @@ -172,6 +172,16 @@ public partial class RulesetsRequestBuilderGetQueryParameters /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." [QueryParameter("per_page")] public int? PerPage { get; set; } + /// A comma-separated list of rule targets to filter by.If provided, only rulesets that apply to the specified targets will be returned.For example, `branch,tag,push`. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("targets")] + public string? Targets { get; set; } +#nullable restore +#else + [QueryParameter("targets")] + public string Targets { get; set; } +#endif } } } diff --git a/src/GitHub/kiota-lock.json b/src/GitHub/kiota-lock.json index 07f8fa0d..2b620f26 100644 --- a/src/GitHub/kiota-lock.json +++ b/src/GitHub/kiota-lock.json @@ -1,5 +1,5 @@ { - "descriptionHash": "78E960D62E4977D7C0590CFB9F19215F0D810ACA39F64862C52E2D17758BE492D45635B01CC02DDA49AB89ABB9688B3996719F5A57DEF299897C71D6436F4F66", + "descriptionHash": "567AA037AA6B2D60BC67F7C46971EE22943D5837F6871E22096D9537BD31048C7703006F6D979F2827CB5241DAD76AC628E34B8FB65D4C3E70CFD12013A0E2DE", "descriptionLocation": "../../../../../schemas/ghec.json", "lockFileVersion": "1.0.0", "kiotaVersion": "1.19.0",