Skip to content

Commit

Permalink
feat: Updates to generated code
Browse files Browse the repository at this point in the history
  • Loading branch information
octokitbot authored Dec 23, 2024
1 parent 7b33f42 commit 0cdcf2f
Show file tree
Hide file tree
Showing 22 changed files with 1,115 additions and 58 deletions.
4 changes: 4 additions & 0 deletions src/GitHub/Models/CodeScanningDefaultSetupUpdate_languages.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ namespace GitHub.Models
public enum CodeScanningDefaultSetupUpdate_languages
#pragma warning restore CS1591
{
[EnumMember(Value = "actions")]
#pragma warning disable CS1591
Actions,
#pragma warning restore CS1591
[EnumMember(Value = "c-cpp")]
#pragma warning disable CS1591
CCpp,
Expand Down
4 changes: 4 additions & 0 deletions src/GitHub/Models/CodeScanningDefaultSetup_languages.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ namespace GitHub.Models
public enum CodeScanningDefaultSetup_languages
#pragma warning restore CS1591
{
[EnumMember(Value = "actions")]
#pragma warning disable CS1591
Actions,
#pragma warning restore CS1591
[EnumMember(Value = "c-cpp")]
#pragma warning disable CS1591
CCpp,
Expand Down
92 changes: 92 additions & 0 deletions src/GitHub/Models/OrgPrivateRegistryConfiguration.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
// <auto-generated/>
#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
{
/// <summary>
/// Private registry configuration for an organization
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.19.0")]
public partial class OrgPrivateRegistryConfiguration : 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 created_at property</summary>
public DateTimeOffset? CreatedAt { get; set; }
/// <summary>The name of the private registry configuration.</summary>
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
public string? Name { get; set; }
#nullable restore
#else
public string Name { get; set; }
#endif
/// <summary>The registry type.</summary>
public global::GitHub.Models.OrgPrivateRegistryConfiguration_registry_type? RegistryType { get; set; }
/// <summary>The updated_at property</summary>
public DateTimeOffset? UpdatedAt { get; set; }
/// <summary>The username to use when authenticating with the private registry.</summary>
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
public string? Username { get; set; }
#nullable restore
#else
public string Username { get; set; }
#endif
/// <summary>Which type of organization repositories have access to the private registry.</summary>
public global::GitHub.Models.OrgPrivateRegistryConfiguration_visibility? Visibility { get; set; }
/// <summary>
/// Instantiates a new <see cref="global::GitHub.Models.OrgPrivateRegistryConfiguration"/> and sets the default values.
/// </summary>
public OrgPrivateRegistryConfiguration()
{
AdditionalData = new Dictionary<string, object>();
}
/// <summary>
/// Creates a new instance of the appropriate class based on discriminator value
/// </summary>
/// <returns>A <see cref="global::GitHub.Models.OrgPrivateRegistryConfiguration"/></returns>
/// <param name="parseNode">The parse node to use to read the discriminator value and create the object</param>
public static global::GitHub.Models.OrgPrivateRegistryConfiguration CreateFromDiscriminatorValue(IParseNode parseNode)
{
_ = parseNode ?? throw new ArgumentNullException(nameof(parseNode));
return new global::GitHub.Models.OrgPrivateRegistryConfiguration();
}
/// <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>>
{
{ "created_at", n => { CreatedAt = n.GetDateTimeOffsetValue(); } },
{ "name", n => { Name = n.GetStringValue(); } },
{ "registry_type", n => { RegistryType = n.GetEnumValue<global::GitHub.Models.OrgPrivateRegistryConfiguration_registry_type>(); } },
{ "updated_at", n => { UpdatedAt = n.GetDateTimeOffsetValue(); } },
{ "username", n => { Username = n.GetStringValue(); } },
{ "visibility", n => { Visibility = n.GetEnumValue<global::GitHub.Models.OrgPrivateRegistryConfiguration_visibility>(); } },
};
}
/// <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.WriteDateTimeOffsetValue("created_at", CreatedAt);
writer.WriteStringValue("name", Name);
writer.WriteEnumValue<global::GitHub.Models.OrgPrivateRegistryConfiguration_registry_type>("registry_type", RegistryType);
writer.WriteDateTimeOffsetValue("updated_at", UpdatedAt);
writer.WriteStringValue("username", Username);
writer.WriteEnumValue<global::GitHub.Models.OrgPrivateRegistryConfiguration_visibility>("visibility", Visibility);
writer.WriteAdditionalData(AdditionalData);
}
}
}
#pragma warning restore CS0618
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
// <auto-generated/>
#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
{
/// <summary>
/// Private registry configuration for an organization
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.19.0")]
public partial class OrgPrivateRegistryConfigurationWithSelectedRepositories : 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 created_at property</summary>
public DateTimeOffset? CreatedAt { get; set; }
/// <summary>The name of the private registry configuration.</summary>
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
public string? Name { get; set; }
#nullable restore
#else
public string Name { get; set; }
#endif
/// <summary>The registry type.</summary>
public global::GitHub.Models.OrgPrivateRegistryConfigurationWithSelectedRepositories_registry_type? RegistryType { get; set; }
/// <summary>An array of repository IDs that can access the organization private registry when `visibility` is set to `selected`.</summary>
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
public List<int?>? SelectedRepositoryIds { get; set; }
#nullable restore
#else
public List<int?> SelectedRepositoryIds { get; set; }
#endif
/// <summary>The updated_at property</summary>
public DateTimeOffset? UpdatedAt { get; set; }
/// <summary>The username to use when authenticating with the private registry.</summary>
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
public string? Username { get; set; }
#nullable restore
#else
public string Username { get; set; }
#endif
/// <summary>Which type of organization repositories have access to the private registry. `selected` means only the repositories specified by `selected_repository_ids` can access the private registry.</summary>
public global::GitHub.Models.OrgPrivateRegistryConfigurationWithSelectedRepositories_visibility? Visibility { get; set; }
/// <summary>
/// Instantiates a new <see cref="global::GitHub.Models.OrgPrivateRegistryConfigurationWithSelectedRepositories"/> and sets the default values.
/// </summary>
public OrgPrivateRegistryConfigurationWithSelectedRepositories()
{
AdditionalData = new Dictionary<string, object>();
}
/// <summary>
/// Creates a new instance of the appropriate class based on discriminator value
/// </summary>
/// <returns>A <see cref="global::GitHub.Models.OrgPrivateRegistryConfigurationWithSelectedRepositories"/></returns>
/// <param name="parseNode">The parse node to use to read the discriminator value and create the object</param>
public static global::GitHub.Models.OrgPrivateRegistryConfigurationWithSelectedRepositories CreateFromDiscriminatorValue(IParseNode parseNode)
{
_ = parseNode ?? throw new ArgumentNullException(nameof(parseNode));
return new global::GitHub.Models.OrgPrivateRegistryConfigurationWithSelectedRepositories();
}
/// <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>>
{
{ "created_at", n => { CreatedAt = n.GetDateTimeOffsetValue(); } },
{ "name", n => { Name = n.GetStringValue(); } },
{ "registry_type", n => { RegistryType = n.GetEnumValue<global::GitHub.Models.OrgPrivateRegistryConfigurationWithSelectedRepositories_registry_type>(); } },
{ "selected_repository_ids", n => { SelectedRepositoryIds = n.GetCollectionOfPrimitiveValues<int?>()?.AsList(); } },
{ "updated_at", n => { UpdatedAt = n.GetDateTimeOffsetValue(); } },
{ "username", n => { Username = n.GetStringValue(); } },
{ "visibility", n => { Visibility = n.GetEnumValue<global::GitHub.Models.OrgPrivateRegistryConfigurationWithSelectedRepositories_visibility>(); } },
};
}
/// <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.WriteDateTimeOffsetValue("created_at", CreatedAt);
writer.WriteStringValue("name", Name);
writer.WriteEnumValue<global::GitHub.Models.OrgPrivateRegistryConfigurationWithSelectedRepositories_registry_type>("registry_type", RegistryType);
writer.WriteCollectionOfPrimitiveValues<int?>("selected_repository_ids", SelectedRepositoryIds);
writer.WriteDateTimeOffsetValue("updated_at", UpdatedAt);
writer.WriteStringValue("username", Username);
writer.WriteEnumValue<global::GitHub.Models.OrgPrivateRegistryConfigurationWithSelectedRepositories_visibility>("visibility", Visibility);
writer.WriteAdditionalData(AdditionalData);
}
}
}
#pragma warning restore CS0618
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// <auto-generated/>
using System.Runtime.Serialization;
using System;
namespace GitHub.Models
{
/// <summary>The registry type.</summary>
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.19.0")]
public enum OrgPrivateRegistryConfigurationWithSelectedRepositories_registry_type
{
[EnumMember(Value = "maven_repository")]
#pragma warning disable CS1591
Maven_repository,
#pragma warning restore CS1591
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
// <auto-generated/>
using System.Runtime.Serialization;
using System;
namespace GitHub.Models
{
/// <summary>Which type of organization repositories have access to the private registry. `selected` means only the repositories specified by `selected_repository_ids` can access the private registry.</summary>
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.19.0")]
public enum OrgPrivateRegistryConfigurationWithSelectedRepositories_visibility
{
[EnumMember(Value = "all")]
#pragma warning disable CS1591
All,
#pragma warning restore CS1591
[EnumMember(Value = "private")]
#pragma warning disable CS1591
Private,
#pragma warning restore CS1591
[EnumMember(Value = "selected")]
#pragma warning disable CS1591
Selected,
#pragma warning restore CS1591
}
}
15 changes: 15 additions & 0 deletions src/GitHub/Models/OrgPrivateRegistryConfiguration_registry_type.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// <auto-generated/>
using System.Runtime.Serialization;
using System;
namespace GitHub.Models
{
/// <summary>The registry type.</summary>
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.19.0")]
public enum OrgPrivateRegistryConfiguration_registry_type
{
[EnumMember(Value = "maven_repository")]
#pragma warning disable CS1591
Maven_repository,
#pragma warning restore CS1591
}
}
23 changes: 23 additions & 0 deletions src/GitHub/Models/OrgPrivateRegistryConfiguration_visibility.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
// <auto-generated/>
using System.Runtime.Serialization;
using System;
namespace GitHub.Models
{
/// <summary>Which type of organization repositories have access to the private registry.</summary>
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.19.0")]
public enum OrgPrivateRegistryConfiguration_visibility
{
[EnumMember(Value = "all")]
#pragma warning disable CS1591
All,
#pragma warning restore CS1591
[EnumMember(Value = "private")]
#pragma warning disable CS1591
Private,
#pragma warning restore CS1591
[EnumMember(Value = "selected")]
#pragma warning disable CS1591
Selected,
#pragma warning restore CS1591
}
}
54 changes: 14 additions & 40 deletions src/GitHub/Models/Users.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,45 +14,23 @@ public partial class Users : 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 fragment property</summary>
/// <summary>Whether this email address is the primary address.</summary>
public bool? Primary { get; set; }
/// <summary>The type of email address.</summary>
#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
/// <summary>The matches property</summary>
/// <summary>The email address.</summary>
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
public List<global::GitHub.Models.Users_matches>? Matches { get; set; }
public string? Value { get; set; }
#nullable restore
#else
public List<global::GitHub.Models.Users_matches> Matches { get; set; }
#endif
/// <summary>The object_type property</summary>
#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
/// <summary>The object_url property</summary>
#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
/// <summary>The property property</summary>
#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
/// <summary>
/// Instantiates a new <see cref="global::GitHub.Models.Users"/> and sets the default values.
Expand All @@ -79,11 +57,9 @@ public virtual IDictionary<string, Action<IParseNode>> GetFieldDeserializers()
{
return new Dictionary<string, Action<IParseNode>>
{
{ "fragment", n => { Fragment = n.GetStringValue(); } },
{ "matches", n => { Matches = n.GetCollectionOfObjectValues<global::GitHub.Models.Users_matches>(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(); } },
};
}
/// <summary>
Expand All @@ -93,11 +69,9 @@ public virtual IDictionary<string, Action<IParseNode>> GetFieldDeserializers()
public virtual void Serialize(ISerializationWriter writer)
{
_ = writer ?? throw new ArgumentNullException(nameof(writer));
writer.WriteStringValue("fragment", Fragment);
writer.WriteCollectionOfObjectValues<global::GitHub.Models.Users_matches>("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);
}
}
Expand Down
Loading

0 comments on commit 0cdcf2f

Please sign in to comment.