Skip to content

Commit

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

* New updates to generated code

* New updates to generated code

* New updates to generated code
  • Loading branch information
octokitbot authored Jul 29, 2024
1 parent ceadf39 commit ad9e32d
Show file tree
Hide file tree
Showing 21 changed files with 430 additions and 28 deletions.
2 changes: 1 addition & 1 deletion src/GitHub/Models/File_extension_restriction.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
using System;
namespace GitHub.Models {
/// <summary>
/// Note: file_extension_restriction is in beta and subject to change.Prevent commits that include files with specified file extensions from being pushed to the commit graph.
/// &gt; [!NOTE]&gt; `file_extension_restriction` is in beta and subject to change.Prevent commits that include files with specified file extensions from being pushed to the commit graph.
/// </summary>
public class File_extension_restriction : IAdditionalDataHolder, IParsable
{
Expand Down
2 changes: 1 addition & 1 deletion src/GitHub/Models/File_path_restriction.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
using System;
namespace GitHub.Models {
/// <summary>
/// Note: file_path_restriction is in beta and subject to change.Prevent commits that include changes in specified file paths from being pushed to the commit graph.
/// &gt; [!NOTE]&gt; `file_path_restriction` is in beta and subject to change.Prevent commits that include changes in specified file paths from being pushed to the commit graph.
/// </summary>
public class File_path_restriction : IAdditionalDataHolder, IParsable
{
Expand Down
6 changes: 3 additions & 3 deletions src/GitHub/Models/Label.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,17 @@ public class Label : IAdditionalDataHolder, IParsable
#else
public string Color { get; set; }
#endif
/// <summary>The default property</summary>
/// <summary>Whether this label comes by default in a new repository.</summary>
public bool? Default { get; set; }
/// <summary>The description property</summary>
/// <summary>Optional description of the label, such as its purpose.</summary>
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
public string? Description { get; set; }
#nullable restore
#else
public string Description { get; set; }
#endif
/// <summary>The id property</summary>
/// <summary>Unique identifier for the label.</summary>
public long? Id { get; set; }
/// <summary>The name of the label.</summary>
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
Expand Down
2 changes: 1 addition & 1 deletion src/GitHub/Models/Max_file_path_length.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
using System;
namespace GitHub.Models {
/// <summary>
/// Note: max_file_path_length is in beta and subject to change.Prevent commits that include file paths that exceed a specified character limit from being pushed to the commit graph.
/// &gt; [!NOTE]&gt; `max_file_path_length` is in beta and subject to change.Prevent commits that include file paths that exceed a specified character limit from being pushed to the commit graph.
/// </summary>
public class Max_file_path_length : IAdditionalDataHolder, IParsable
{
Expand Down
2 changes: 1 addition & 1 deletion src/GitHub/Models/Max_file_size.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
using System;
namespace GitHub.Models {
/// <summary>
/// Note: max_file_size is in beta and subject to change.Prevent commits that exceed a specified file size limit from being pushed to the commit.
/// &gt; [!NOTE]&gt; `max_file_size` is in beta and subject to change.Prevent commits that exceed a specified file size limit from being pushed to the commit.
/// </summary>
public class Max_file_size : IAdditionalDataHolder, IParsable
{
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="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"/>
/// 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="RepositoryRuleMergeQueue"/>, <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 @@ -226,6 +226,14 @@ public class RepositoryRule : IComposedTypeWrapper, IParsable
#nullable restore
#else
public Max_file_size RepositoryRuleMaxFileSize2 { get; set; }
#endif
/// <summary>Composed type representation for type <see cref="GitHub.Models.RepositoryRuleMergeQueue"/></summary>
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
public GitHub.Models.RepositoryRuleMergeQueue? RepositoryRuleMergeQueue { get; set; }
#nullable restore
#else
public GitHub.Models.RepositoryRuleMergeQueue RepositoryRuleMergeQueue { get; set; }
#endif
/// <summary>Composed type representation for type <see cref="GitHub.Models.RepositoryRuleNonFastForward"/></summary>
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
Expand Down Expand Up @@ -466,6 +474,38 @@ public class RepositoryRule : IComposedTypeWrapper, IParsable
#nullable restore
#else
public GitHub.Models.RepositoryRuleDeletion RepositoryRuleRepositoryRuleDeletion2 { get; set; }
#endif
/// <summary>Composed type representation for type <see cref="GitHub.Models.RepositoryRuleMergeQueue"/></summary>
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
public GitHub.Models.RepositoryRuleMergeQueue? RepositoryRuleRepositoryRuleMergeQueue { get; set; }
#nullable restore
#else
public GitHub.Models.RepositoryRuleMergeQueue RepositoryRuleRepositoryRuleMergeQueue { get; set; }
#endif
/// <summary>Composed type representation for type <see cref="GitHub.Models.RepositoryRuleMergeQueue"/></summary>
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
public GitHub.Models.RepositoryRuleMergeQueue? RepositoryRuleRepositoryRuleMergeQueue0 { get; set; }
#nullable restore
#else
public GitHub.Models.RepositoryRuleMergeQueue RepositoryRuleRepositoryRuleMergeQueue0 { get; set; }
#endif
/// <summary>Composed type representation for type <see cref="GitHub.Models.RepositoryRuleMergeQueue"/></summary>
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
public GitHub.Models.RepositoryRuleMergeQueue? RepositoryRuleRepositoryRuleMergeQueue1 { get; set; }
#nullable restore
#else
public GitHub.Models.RepositoryRuleMergeQueue RepositoryRuleRepositoryRuleMergeQueue1 { get; set; }
#endif
/// <summary>Composed type representation for type <see cref="GitHub.Models.RepositoryRuleMergeQueue"/></summary>
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
public GitHub.Models.RepositoryRuleMergeQueue? RepositoryRuleRepositoryRuleMergeQueue2 { get; set; }
#nullable restore
#else
public GitHub.Models.RepositoryRuleMergeQueue RepositoryRuleRepositoryRuleMergeQueue2 { get; set; }
#endif
/// <summary>Composed type representation for type <see cref="GitHub.Models.RepositoryRuleNonFastForward"/></summary>
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
Expand Down Expand Up @@ -929,6 +969,10 @@ public static RepositoryRule CreateFromDiscriminatorValue(IParseNode parseNode)
{
result.RepositoryRuleMaxFileSize2 = new Max_file_size();
}
else if("repository-rule-merge-queue".Equals(mappingValue, StringComparison.OrdinalIgnoreCase))
{
result.RepositoryRuleMergeQueue = new GitHub.Models.RepositoryRuleMergeQueue();
}
else if("repository-rule-non-fast-forward".Equals(mappingValue, StringComparison.OrdinalIgnoreCase))
{
result.RepositoryRuleNonFastForward = new GitHub.Models.RepositoryRuleNonFastForward();
Expand Down Expand Up @@ -1049,6 +1093,22 @@ public static RepositoryRule CreateFromDiscriminatorValue(IParseNode parseNode)
{
result.RepositoryRuleRepositoryRuleDeletion2 = new GitHub.Models.RepositoryRuleDeletion();
}
else if("repository-rule-merge-queue".Equals(mappingValue, StringComparison.OrdinalIgnoreCase))
{
result.RepositoryRuleRepositoryRuleMergeQueue = new GitHub.Models.RepositoryRuleMergeQueue();
}
else if("repository-rule-merge-queue".Equals(mappingValue, StringComparison.OrdinalIgnoreCase))
{
result.RepositoryRuleRepositoryRuleMergeQueue0 = new GitHub.Models.RepositoryRuleMergeQueue();
}
else if("repository-rule-merge-queue".Equals(mappingValue, StringComparison.OrdinalIgnoreCase))
{
result.RepositoryRuleRepositoryRuleMergeQueue1 = new GitHub.Models.RepositoryRuleMergeQueue();
}
else if("repository-rule-merge-queue".Equals(mappingValue, StringComparison.OrdinalIgnoreCase))
{
result.RepositoryRuleRepositoryRuleMergeQueue2 = new GitHub.Models.RepositoryRuleMergeQueue();
}
else if("repository-rule-non-fast-forward".Equals(mappingValue, StringComparison.OrdinalIgnoreCase))
{
result.RepositoryRuleRepositoryRuleNonFastForward = new GitHub.Models.RepositoryRuleNonFastForward();
Expand Down Expand Up @@ -1337,6 +1397,10 @@ public virtual IDictionary<string, Action<IParseNode>> GetFieldDeserializers()
{
return RepositoryRuleMaxFileSize2.GetFieldDeserializers();
}
else if(RepositoryRuleMergeQueue != null)
{
return RepositoryRuleMergeQueue.GetFieldDeserializers();
}
else if(RepositoryRuleNonFastForward != null)
{
return RepositoryRuleNonFastForward.GetFieldDeserializers();
Expand Down Expand Up @@ -1457,6 +1521,22 @@ public virtual IDictionary<string, Action<IParseNode>> GetFieldDeserializers()
{
return RepositoryRuleRepositoryRuleDeletion2.GetFieldDeserializers();
}
else if(RepositoryRuleRepositoryRuleMergeQueue != null)
{
return RepositoryRuleRepositoryRuleMergeQueue.GetFieldDeserializers();
}
else if(RepositoryRuleRepositoryRuleMergeQueue0 != null)
{
return RepositoryRuleRepositoryRuleMergeQueue0.GetFieldDeserializers();
}
else if(RepositoryRuleRepositoryRuleMergeQueue1 != null)
{
return RepositoryRuleRepositoryRuleMergeQueue1.GetFieldDeserializers();
}
else if(RepositoryRuleRepositoryRuleMergeQueue2 != null)
{
return RepositoryRuleRepositoryRuleMergeQueue2.GetFieldDeserializers();
}
else if(RepositoryRuleRepositoryRuleNonFastForward != null)
{
return RepositoryRuleRepositoryRuleNonFastForward.GetFieldDeserializers();
Expand Down Expand Up @@ -1746,6 +1826,10 @@ public virtual void Serialize(ISerializationWriter writer)
{
writer.WriteObjectValue<Max_file_size>(null, RepositoryRuleMaxFileSize2);
}
else if(RepositoryRuleMergeQueue != null)
{
writer.WriteObjectValue<GitHub.Models.RepositoryRuleMergeQueue>(null, RepositoryRuleMergeQueue);
}
else if(RepositoryRuleNonFastForward != null)
{
writer.WriteObjectValue<GitHub.Models.RepositoryRuleNonFastForward>(null, RepositoryRuleNonFastForward);
Expand Down Expand Up @@ -1866,6 +1950,22 @@ public virtual void Serialize(ISerializationWriter writer)
{
writer.WriteObjectValue<GitHub.Models.RepositoryRuleDeletion>(null, RepositoryRuleRepositoryRuleDeletion2);
}
else if(RepositoryRuleRepositoryRuleMergeQueue != null)
{
writer.WriteObjectValue<GitHub.Models.RepositoryRuleMergeQueue>(null, RepositoryRuleRepositoryRuleMergeQueue);
}
else if(RepositoryRuleRepositoryRuleMergeQueue0 != null)
{
writer.WriteObjectValue<GitHub.Models.RepositoryRuleMergeQueue>(null, RepositoryRuleRepositoryRuleMergeQueue0);
}
else if(RepositoryRuleRepositoryRuleMergeQueue1 != null)
{
writer.WriteObjectValue<GitHub.Models.RepositoryRuleMergeQueue>(null, RepositoryRuleRepositoryRuleMergeQueue1);
}
else if(RepositoryRuleRepositoryRuleMergeQueue2 != null)
{
writer.WriteObjectValue<GitHub.Models.RepositoryRuleMergeQueue>(null, RepositoryRuleRepositoryRuleMergeQueue2);
}
else if(RepositoryRuleRepositoryRuleNonFastForward != null)
{
writer.WriteObjectValue<GitHub.Models.RepositoryRuleNonFastForward>(null, RepositoryRuleRepositoryRuleNonFastForward);
Expand Down
66 changes: 66 additions & 0 deletions src/GitHub/Models/RepositoryRuleMergeQueue.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>
/// Merges must be performed via a merge queue.
/// </summary>
public class RepositoryRuleMergeQueue : 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 RepositoryRuleMergeQueue_parameters? Parameters { get; set; }
#nullable restore
#else
public RepositoryRuleMergeQueue_parameters Parameters { get; set; }
#endif
/// <summary>The type property</summary>
public RepositoryRuleMergeQueue_type? Type { get; set; }
/// <summary>
/// Instantiates a new <see cref="RepositoryRuleMergeQueue"/> and sets the default values.
/// </summary>
public RepositoryRuleMergeQueue()
{
AdditionalData = new Dictionary<string, object>();
}
/// <summary>
/// Creates a new instance of the appropriate class based on discriminator value
/// </summary>
/// <returns>A <see cref="RepositoryRuleMergeQueue"/></returns>
/// <param name="parseNode">The parse node to use to read the discriminator value and create the object</param>
public static RepositoryRuleMergeQueue CreateFromDiscriminatorValue(IParseNode parseNode)
{
_ = parseNode ?? throw new ArgumentNullException(nameof(parseNode));
return new RepositoryRuleMergeQueue();
}
/// <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<RepositoryRuleMergeQueue_parameters>(RepositoryRuleMergeQueue_parameters.CreateFromDiscriminatorValue); } },
{"type", n => { Type = n.GetEnumValue<RepositoryRuleMergeQueue_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<RepositoryRuleMergeQueue_parameters>("parameters", Parameters);
writer.WriteEnumValue<RepositoryRuleMergeQueue_type>("type", Type);
writer.WriteAdditionalData(AdditionalData);
}
}
}
Loading

0 comments on commit ad9e32d

Please sign in to comment.