Skip to content

Commit

Permalink
FEAT:| Added/Updated [string, GitHub, class, IDictionary, RepositoryR…
Browse files Browse the repository at this point in the history
…uleCodeScanning_parameters, RepositoryRuleCodeScanning_type, RepositoryRuleCodeScanning, static, virtual, List, enum, RepositoryRuleParamsCodeScanningTool_alerts_threshold, RepositoryRuleParamsCodeScanningTool_security_alerts_threshold, RepositoryRuleParamsCodeScanningTool, repositories]| Removed [repositories] (#68)

* New updates to generated code

* New updates to generated code

* New updates to generated code

---------

Co-authored-by: Octokit Bot <octokitbot@martynus.net>
  • Loading branch information
octokitbot and Octokit Bot committed May 3, 2024
1 parent 1ea21b0 commit 239513d
Show file tree
Hide file tree
Showing 11 changed files with 390 additions and 5 deletions.
10 changes: 10 additions & 0 deletions src/GitHub/Models/PrivateUser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,14 @@ public class PrivateUser : IAdditionalDataHolder, IParsable
#nullable restore
#else
public string NodeId { get; set; }
#endif
/// <summary>The notification_email property</summary>
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
public string? NotificationEmail { get; set; }
#nullable restore
#else
public string NotificationEmail { get; set; }
#endif
/// <summary>The organizations_url property</summary>
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
Expand Down Expand Up @@ -295,6 +303,7 @@ public static PrivateUser CreateFromDiscriminatorValue(IParseNode parseNode)
{"login", n => { Login = n.GetStringValue(); } },
{"name", n => { Name = n.GetStringValue(); } },
{"node_id", n => { NodeId = n.GetStringValue(); } },
{"notification_email", n => { NotificationEmail = n.GetStringValue(); } },
{"organizations_url", n => { OrganizationsUrl = n.GetStringValue(); } },
{"owned_private_repos", n => { OwnedPrivateRepos = n.GetIntValue(); } },
{"plan", n => { Plan = n.GetObjectValue<PrivateUser_plan>(PrivateUser_plan.CreateFromDiscriminatorValue); } },
Expand Down Expand Up @@ -346,6 +355,7 @@ public virtual void Serialize(ISerializationWriter writer)
writer.WriteStringValue("login", Login);
writer.WriteStringValue("name", Name);
writer.WriteStringValue("node_id", NodeId);
writer.WriteStringValue("notification_email", NotificationEmail);
writer.WriteStringValue("organizations_url", OrganizationsUrl);
writer.WriteIntValue("owned_private_repos", OwnedPrivateRepos);
writer.WriteObjectValue<PrivateUser_plan>("plan", Plan);
Expand Down
10 changes: 10 additions & 0 deletions src/GitHub/Models/PublicUser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,14 @@ public class PublicUser : IParsable
#nullable restore
#else
public string NodeId { get; set; }
#endif
/// <summary>The notification_email property</summary>
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
public string? NotificationEmail { get; set; }
#nullable restore
#else
public string NotificationEmail { get; set; }
#endif
/// <summary>The organizations_url property</summary>
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
Expand Down Expand Up @@ -272,6 +280,7 @@ public static PublicUser CreateFromDiscriminatorValue(IParseNode parseNode)
{"login", n => { Login = n.GetStringValue(); } },
{"name", n => { Name = n.GetStringValue(); } },
{"node_id", n => { NodeId = n.GetStringValue(); } },
{"notification_email", n => { NotificationEmail = n.GetStringValue(); } },
{"organizations_url", n => { OrganizationsUrl = n.GetStringValue(); } },
{"owned_private_repos", n => { OwnedPrivateRepos = n.GetIntValue(); } },
{"plan", n => { Plan = n.GetObjectValue<PublicUser_plan>(PublicUser_plan.CreateFromDiscriminatorValue); } },
Expand Down Expand Up @@ -320,6 +329,7 @@ public virtual void Serialize(ISerializationWriter writer)
writer.WriteStringValue("login", Login);
writer.WriteStringValue("name", Name);
writer.WriteStringValue("node_id", NodeId);
writer.WriteStringValue("notification_email", NotificationEmail);
writer.WriteStringValue("organizations_url", OrganizationsUrl);
writer.WriteIntValue("owned_private_repos", OwnedPrivateRepos);
writer.WriteObjectValue<PublicUser_plan>("plan", Plan);
Expand Down
102 changes: 101 additions & 1 deletion src/GitHub/Models/RepositoryRule.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
using System;
namespace GitHub.Models {
/// <summary>
/// Composed type wrapper for classes <see cref="File_extension_restriction"/>, <see cref="File_path_restriction"/>, <see cref="Max_file_path_length"/>, <see cref="Max_file_size"/>, <see cref="RepositoryRuleBranchNamePattern"/>, <see cref="RepositoryRuleCommitAuthorEmailPattern"/>, <see cref="RepositoryRuleCommitMessagePattern"/>, <see cref="RepositoryRuleCommitterEmailPattern"/>, <see cref="RepositoryRuleCreation"/>, <see cref="RepositoryRuleDeletion"/>, <see cref="RepositoryRuleNonFastForward"/>, <see cref="RepositoryRulePullRequest"/>, <see cref="RepositoryRuleRequiredDeployments"/>, <see cref="RepositoryRuleRequiredLinearHistory"/>, <see cref="RepositoryRuleRequiredSignatures"/>, <see cref="RepositoryRuleRequiredStatusChecks"/>, <see cref="RepositoryRuleTagNamePattern"/>, <see cref="RepositoryRuleUpdate"/>, <see cref="RepositoryRuleWorkflows"/>
/// Composed type wrapper for classes <see cref="File_extension_restriction"/>, <see cref="File_path_restriction"/>, <see cref="Max_file_path_length"/>, <see cref="Max_file_size"/>, <see cref="RepositoryRuleBranchNamePattern"/>, <see cref="RepositoryRuleCodeScanning"/>, <see cref="RepositoryRuleCommitAuthorEmailPattern"/>, <see cref="RepositoryRuleCommitMessagePattern"/>, <see cref="RepositoryRuleCommitterEmailPattern"/>, <see cref="RepositoryRuleCreation"/>, <see cref="RepositoryRuleDeletion"/>, <see cref="RepositoryRuleNonFastForward"/>, <see cref="RepositoryRulePullRequest"/>, <see cref="RepositoryRuleRequiredDeployments"/>, <see cref="RepositoryRuleRequiredLinearHistory"/>, <see cref="RepositoryRuleRequiredSignatures"/>, <see cref="RepositoryRuleRequiredStatusChecks"/>, <see cref="RepositoryRuleTagNamePattern"/>, <see cref="RepositoryRuleUpdate"/>, <see cref="RepositoryRuleWorkflows"/>
/// </summary>
public class RepositoryRule : IComposedTypeWrapper, IParsable
{
Expand Down Expand Up @@ -50,6 +50,14 @@ public class RepositoryRule : IComposedTypeWrapper, IParsable
#nullable restore
#else
public GitHub.Models.RepositoryRuleBranchNamePattern RepositoryRuleBranchNamePattern { get; set; }
#endif
/// <summary>Composed type representation for type <see cref="GitHub.Models.RepositoryRuleCodeScanning"/></summary>
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
public GitHub.Models.RepositoryRuleCodeScanning? RepositoryRuleCodeScanning { get; set; }
#nullable restore
#else
public GitHub.Models.RepositoryRuleCodeScanning RepositoryRuleCodeScanning { get; set; }
#endif
/// <summary>Composed type representation for type <see cref="GitHub.Models.RepositoryRuleCommitAuthorEmailPattern"/></summary>
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
Expand Down Expand Up @@ -266,6 +274,38 @@ public class RepositoryRule : IComposedTypeWrapper, IParsable
#nullable restore
#else
public GitHub.Models.RepositoryRuleBranchNamePattern RepositoryRuleRepositoryRuleBranchNamePattern2 { get; set; }
#endif
/// <summary>Composed type representation for type <see cref="GitHub.Models.RepositoryRuleCodeScanning"/></summary>
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
public GitHub.Models.RepositoryRuleCodeScanning? RepositoryRuleRepositoryRuleCodeScanning { get; set; }
#nullable restore
#else
public GitHub.Models.RepositoryRuleCodeScanning RepositoryRuleRepositoryRuleCodeScanning { get; set; }
#endif
/// <summary>Composed type representation for type <see cref="GitHub.Models.RepositoryRuleCodeScanning"/></summary>
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
public GitHub.Models.RepositoryRuleCodeScanning? RepositoryRuleRepositoryRuleCodeScanning0 { get; set; }
#nullable restore
#else
public GitHub.Models.RepositoryRuleCodeScanning RepositoryRuleRepositoryRuleCodeScanning0 { get; set; }
#endif
/// <summary>Composed type representation for type <see cref="GitHub.Models.RepositoryRuleCodeScanning"/></summary>
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
public GitHub.Models.RepositoryRuleCodeScanning? RepositoryRuleRepositoryRuleCodeScanning1 { get; set; }
#nullable restore
#else
public GitHub.Models.RepositoryRuleCodeScanning RepositoryRuleRepositoryRuleCodeScanning1 { get; set; }
#endif
/// <summary>Composed type representation for type <see cref="GitHub.Models.RepositoryRuleCodeScanning"/></summary>
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
public GitHub.Models.RepositoryRuleCodeScanning? RepositoryRuleRepositoryRuleCodeScanning2 { get; set; }
#nullable restore
#else
public GitHub.Models.RepositoryRuleCodeScanning RepositoryRuleRepositoryRuleCodeScanning2 { get; set; }
#endif
/// <summary>Composed type representation for type <see cref="GitHub.Models.RepositoryRuleCommitAuthorEmailPattern"/></summary>
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
Expand Down Expand Up @@ -801,6 +841,10 @@ public static RepositoryRule CreateFromDiscriminatorValue(IParseNode parseNode)
{
result.RepositoryRuleBranchNamePattern = new GitHub.Models.RepositoryRuleBranchNamePattern();
}
else if("repository-rule-code-scanning".Equals(mappingValue, StringComparison.OrdinalIgnoreCase))
{
result.RepositoryRuleCodeScanning = new GitHub.Models.RepositoryRuleCodeScanning();
}
else if("repository-rule-commit-author-email-pattern".Equals(mappingValue, StringComparison.OrdinalIgnoreCase))
{
result.RepositoryRuleCommitAuthorEmailPattern = new GitHub.Models.RepositoryRuleCommitAuthorEmailPattern();
Expand Down Expand Up @@ -909,6 +953,22 @@ public static RepositoryRule CreateFromDiscriminatorValue(IParseNode parseNode)
{
result.RepositoryRuleRepositoryRuleBranchNamePattern2 = new GitHub.Models.RepositoryRuleBranchNamePattern();
}
else if("repository-rule-code-scanning".Equals(mappingValue, StringComparison.OrdinalIgnoreCase))
{
result.RepositoryRuleRepositoryRuleCodeScanning = new GitHub.Models.RepositoryRuleCodeScanning();
}
else if("repository-rule-code-scanning".Equals(mappingValue, StringComparison.OrdinalIgnoreCase))
{
result.RepositoryRuleRepositoryRuleCodeScanning0 = new GitHub.Models.RepositoryRuleCodeScanning();
}
else if("repository-rule-code-scanning".Equals(mappingValue, StringComparison.OrdinalIgnoreCase))
{
result.RepositoryRuleRepositoryRuleCodeScanning1 = new GitHub.Models.RepositoryRuleCodeScanning();
}
else if("repository-rule-code-scanning".Equals(mappingValue, StringComparison.OrdinalIgnoreCase))
{
result.RepositoryRuleRepositoryRuleCodeScanning2 = new GitHub.Models.RepositoryRuleCodeScanning();
}
else if("repository-rule-commit-author-email-pattern".Equals(mappingValue, StringComparison.OrdinalIgnoreCase))
{
result.RepositoryRuleRepositoryRuleCommitAuthorEmailPattern = new GitHub.Models.RepositoryRuleCommitAuthorEmailPattern();
Expand Down Expand Up @@ -1189,6 +1249,10 @@ public static RepositoryRule CreateFromDiscriminatorValue(IParseNode parseNode)
{
return RepositoryRuleBranchNamePattern.GetFieldDeserializers();
}
else if(RepositoryRuleCodeScanning != null)
{
return RepositoryRuleCodeScanning.GetFieldDeserializers();
}
else if(RepositoryRuleCommitAuthorEmailPattern != null)
{
return RepositoryRuleCommitAuthorEmailPattern.GetFieldDeserializers();
Expand Down Expand Up @@ -1297,6 +1361,22 @@ public static RepositoryRule CreateFromDiscriminatorValue(IParseNode parseNode)
{
return RepositoryRuleRepositoryRuleBranchNamePattern2.GetFieldDeserializers();
}
else if(RepositoryRuleRepositoryRuleCodeScanning != null)
{
return RepositoryRuleRepositoryRuleCodeScanning.GetFieldDeserializers();
}
else if(RepositoryRuleRepositoryRuleCodeScanning0 != null)
{
return RepositoryRuleRepositoryRuleCodeScanning0.GetFieldDeserializers();
}
else if(RepositoryRuleRepositoryRuleCodeScanning1 != null)
{
return RepositoryRuleRepositoryRuleCodeScanning1.GetFieldDeserializers();
}
else if(RepositoryRuleRepositoryRuleCodeScanning2 != null)
{
return RepositoryRuleRepositoryRuleCodeScanning2.GetFieldDeserializers();
}
else if(RepositoryRuleRepositoryRuleCommitAuthorEmailPattern != null)
{
return RepositoryRuleRepositoryRuleCommitAuthorEmailPattern.GetFieldDeserializers();
Expand Down Expand Up @@ -1578,6 +1658,10 @@ public virtual void Serialize(ISerializationWriter writer)
{
writer.WriteObjectValue<GitHub.Models.RepositoryRuleBranchNamePattern>(null, RepositoryRuleBranchNamePattern);
}
else if(RepositoryRuleCodeScanning != null)
{
writer.WriteObjectValue<GitHub.Models.RepositoryRuleCodeScanning>(null, RepositoryRuleCodeScanning);
}
else if(RepositoryRuleCommitAuthorEmailPattern != null)
{
writer.WriteObjectValue<GitHub.Models.RepositoryRuleCommitAuthorEmailPattern>(null, RepositoryRuleCommitAuthorEmailPattern);
Expand Down Expand Up @@ -1686,6 +1770,22 @@ public virtual void Serialize(ISerializationWriter writer)
{
writer.WriteObjectValue<GitHub.Models.RepositoryRuleBranchNamePattern>(null, RepositoryRuleRepositoryRuleBranchNamePattern2);
}
else if(RepositoryRuleRepositoryRuleCodeScanning != null)
{
writer.WriteObjectValue<GitHub.Models.RepositoryRuleCodeScanning>(null, RepositoryRuleRepositoryRuleCodeScanning);
}
else if(RepositoryRuleRepositoryRuleCodeScanning0 != null)
{
writer.WriteObjectValue<GitHub.Models.RepositoryRuleCodeScanning>(null, RepositoryRuleRepositoryRuleCodeScanning0);
}
else if(RepositoryRuleRepositoryRuleCodeScanning1 != null)
{
writer.WriteObjectValue<GitHub.Models.RepositoryRuleCodeScanning>(null, RepositoryRuleRepositoryRuleCodeScanning1);
}
else if(RepositoryRuleRepositoryRuleCodeScanning2 != null)
{
writer.WriteObjectValue<GitHub.Models.RepositoryRuleCodeScanning>(null, RepositoryRuleRepositoryRuleCodeScanning2);
}
else if(RepositoryRuleRepositoryRuleCommitAuthorEmailPattern != null)
{
writer.WriteObjectValue<GitHub.Models.RepositoryRuleCommitAuthorEmailPattern>(null, RepositoryRuleRepositoryRuleCommitAuthorEmailPattern);
Expand Down
66 changes: 66 additions & 0 deletions src/GitHub/Models/RepositoryRuleCodeScanning.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
// <auto-generated/>
using Microsoft.Kiota.Abstractions.Serialization;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System;
namespace GitHub.Models {
/// <summary>
/// Choose which tools must provide code scanning results before the reference is updated. When configured, code scanning must be enabled and have results for both the commit and the reference being updated.
/// </summary>
public class RepositoryRuleCodeScanning : IAdditionalDataHolder, IParsable
{
/// <summary>Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.</summary>
public IDictionary<string, object> AdditionalData { get; set; }
/// <summary>The parameters property</summary>
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
public RepositoryRuleCodeScanning_parameters? Parameters { get; set; }
#nullable restore
#else
public RepositoryRuleCodeScanning_parameters Parameters { get; set; }
#endif
/// <summary>The type property</summary>
public RepositoryRuleCodeScanning_type? Type { get; set; }
/// <summary>
/// Instantiates a new <see cref="RepositoryRuleCodeScanning"/> and sets the default values.
/// </summary>
public RepositoryRuleCodeScanning()
{
AdditionalData = new Dictionary<string, object>();
}
/// <summary>
/// Creates a new instance of the appropriate class based on discriminator value
/// </summary>
/// <returns>A <see cref="RepositoryRuleCodeScanning"/></returns>
/// <param name="parseNode">The parse node to use to read the discriminator value and create the object</param>
public static RepositoryRuleCodeScanning CreateFromDiscriminatorValue(IParseNode parseNode)
{
_ = parseNode ?? throw new ArgumentNullException(nameof(parseNode));
return new RepositoryRuleCodeScanning();
}
/// <summary>
/// The deserialization information for the current model
/// </summary>
/// <returns>A IDictionary&lt;string, Action&lt;IParseNode&gt;&gt;</returns>
public virtual IDictionary<string, Action<IParseNode>> GetFieldDeserializers()
{
return new Dictionary<string, Action<IParseNode>>
{
{"parameters", n => { Parameters = n.GetObjectValue<RepositoryRuleCodeScanning_parameters>(RepositoryRuleCodeScanning_parameters.CreateFromDiscriminatorValue); } },
{"type", n => { Type = n.GetEnumValue<RepositoryRuleCodeScanning_type>(); } },
};
}
/// <summary>
/// Serializes information the current object
/// </summary>
/// <param name="writer">Serialization writer to use to serialize this model</param>
public virtual void Serialize(ISerializationWriter writer)
{
_ = writer ?? throw new ArgumentNullException(nameof(writer));
writer.WriteObjectValue<RepositoryRuleCodeScanning_parameters>("parameters", Parameters);
writer.WriteEnumValue<RepositoryRuleCodeScanning_type>("type", Type);
writer.WriteAdditionalData(AdditionalData);
}
}
}
Loading

0 comments on commit 239513d

Please sign in to comment.