From 8aac6927d8fd8cf5f8070b53327a486f2cef6d1c Mon Sep 17 00:00:00 2001 From: Octokit Bot Date: Tue, 1 Oct 2024 08:41:36 -0700 Subject: [PATCH] feat | fix | breaking: updates CopilotSeatDetails[CopilotSeatDetails_organization > NullableOrganizationSimple], [CopilotSeatDetails_assignee > SimpleUser], fixes many previously unknown types, fixes check run discriminator to evaluate status, fixes content discriminator to evaluate type --- src/GitHub/Models/CopilotSeatDetails.cs | 20 +- .../Models/CopilotSeatDetails_assignee.cs | 56 --- .../Models/CopilotSeatDetails_organization.cs | 56 --- .../Models/NullableOrganizationSimple.cs | 170 +++++++++ src/GitHub/Models/Users.cs | 54 ++- src/GitHub/Models/Users_matches.cs | 75 ++++ ...odyMember1.cs => AppsDeleteRequestBody.cs} | 12 +- ...tBodyMember1.cs => AppsPostRequestBody.cs} | 12 +- ...stBodyMember1.cs => AppsPutRequestBody.cs} | 12 +- .../Restrictions/Apps/AppsRequestBuilder.cs | 345 +----------------- ...dyMember1.cs => UsersDeleteRequestBody.cs} | 12 +- ...BodyMember1.cs => UsersPostRequestBody.cs} | 12 +- ...tBodyMember1.cs => UsersPutRequestBody.cs} | 12 +- .../Restrictions/Users/UsersRequestBuilder.cs | 345 +----------------- .../Item/CheckRuns/CheckRunsRequestBuilder.cs | 2 +- .../Item/WithPathItemRequestBuilder.cs | 8 +- src/GitHub/kiota-lock.json | 2 +- 17 files changed, 361 insertions(+), 844 deletions(-) delete mode 100644 src/GitHub/Models/CopilotSeatDetails_assignee.cs delete mode 100644 src/GitHub/Models/CopilotSeatDetails_organization.cs create mode 100644 src/GitHub/Models/NullableOrganizationSimple.cs create mode 100644 src/GitHub/Models/Users_matches.cs rename src/GitHub/Repos/Item/Item/Branches/Item/Protection/Restrictions/Apps/{AppsDeleteRequestBodyMember1.cs => AppsDeleteRequestBody.cs} (88%) rename src/GitHub/Repos/Item/Item/Branches/Item/Protection/Restrictions/Apps/{AppsPostRequestBodyMember1.cs => AppsPostRequestBody.cs} (86%) rename src/GitHub/Repos/Item/Item/Branches/Item/Protection/Restrictions/Apps/{AppsPutRequestBodyMember1.cs => AppsPutRequestBody.cs} (87%) rename src/GitHub/Repos/Item/Item/Branches/Item/Protection/Restrictions/Users/{UsersDeleteRequestBodyMember1.cs => UsersDeleteRequestBody.cs} (87%) rename src/GitHub/Repos/Item/Item/Branches/Item/Protection/Restrictions/Users/{UsersPostRequestBodyMember1.cs => UsersPostRequestBody.cs} (88%) rename src/GitHub/Repos/Item/Item/Branches/Item/Protection/Restrictions/Users/{UsersPutRequestBodyMember1.cs => UsersPutRequestBody.cs} (88%) diff --git a/src/GitHub/Models/CopilotSeatDetails.cs b/src/GitHub/Models/CopilotSeatDetails.cs index f7d02c1f..3f1aba48 100644 --- a/src/GitHub/Models/CopilotSeatDetails.cs +++ b/src/GitHub/Models/CopilotSeatDetails.cs @@ -14,13 +14,13 @@ namespace GitHub.Models [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.18.0")] public partial class CopilotSeatDetails : IParsable { - /// The assignee that has been granted access to GitHub Copilot. + /// A GitHub user. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public global::GitHub.Models.CopilotSeatDetails_assignee? Assignee { get; set; } + public global::GitHub.Models.SimpleUser? Assignee { get; set; } #nullable restore #else - public global::GitHub.Models.CopilotSeatDetails_assignee Assignee { get; set; } + public global::GitHub.Models.SimpleUser Assignee { get; set; } #endif /// The team through which the assignee is granted access to GitHub Copilot, if applicable. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -42,13 +42,13 @@ public partial class CopilotSeatDetails : IParsable #else public string LastActivityEditor { get; set; } #endif - /// The organization to which this seat belongs. + /// A GitHub organization. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public global::GitHub.Models.CopilotSeatDetails_organization? Organization { get; set; } + public global::GitHub.Models.NullableOrganizationSimple? Organization { get; set; } #nullable restore #else - public global::GitHub.Models.CopilotSeatDetails_organization Organization { get; set; } + public global::GitHub.Models.NullableOrganizationSimple Organization { get; set; } #endif /// The pending cancellation date for the seat, in `YYYY-MM-DD` format. This will be null unless the assignee's Copilot access has been canceled during the current billing cycle. If the seat has been cancelled, this corresponds to the start of the organization's next billing cycle. public Date? PendingCancellationDate { get; set; } @@ -72,12 +72,12 @@ public virtual IDictionary> GetFieldDeserializers() { return new Dictionary> { - { "assignee", n => { Assignee = n.GetObjectValue(global::GitHub.Models.CopilotSeatDetails_assignee.CreateFromDiscriminatorValue); } }, + { "assignee", n => { Assignee = n.GetObjectValue(global::GitHub.Models.SimpleUser.CreateFromDiscriminatorValue); } }, { "assigning_team", n => { AssigningTeam = n.GetObjectValue(global::GitHub.Models.CopilotSeatDetails.CopilotSeatDetails_assigning_team.CreateFromDiscriminatorValue); } }, { "created_at", n => { CreatedAt = n.GetDateTimeOffsetValue(); } }, { "last_activity_at", n => { LastActivityAt = n.GetDateTimeOffsetValue(); } }, { "last_activity_editor", n => { LastActivityEditor = n.GetStringValue(); } }, - { "organization", n => { Organization = n.GetObjectValue(global::GitHub.Models.CopilotSeatDetails_organization.CreateFromDiscriminatorValue); } }, + { "organization", n => { Organization = n.GetObjectValue(global::GitHub.Models.NullableOrganizationSimple.CreateFromDiscriminatorValue); } }, { "pending_cancellation_date", n => { PendingCancellationDate = n.GetDateValue(); } }, { "updated_at", n => { UpdatedAt = n.GetDateTimeOffsetValue(); } }, }; @@ -89,12 +89,12 @@ public virtual IDictionary> GetFieldDeserializers() public virtual void Serialize(ISerializationWriter writer) { _ = writer ?? throw new ArgumentNullException(nameof(writer)); - writer.WriteObjectValue("assignee", Assignee); + writer.WriteObjectValue("assignee", Assignee); writer.WriteObjectValue("assigning_team", AssigningTeam); writer.WriteDateTimeOffsetValue("created_at", CreatedAt); writer.WriteDateTimeOffsetValue("last_activity_at", LastActivityAt); writer.WriteStringValue("last_activity_editor", LastActivityEditor); - writer.WriteObjectValue("organization", Organization); + writer.WriteObjectValue("organization", Organization); writer.WriteDateValue("pending_cancellation_date", PendingCancellationDate); writer.WriteDateTimeOffsetValue("updated_at", UpdatedAt); } diff --git a/src/GitHub/Models/CopilotSeatDetails_assignee.cs b/src/GitHub/Models/CopilotSeatDetails_assignee.cs deleted file mode 100644 index 9225bd37..00000000 --- a/src/GitHub/Models/CopilotSeatDetails_assignee.cs +++ /dev/null @@ -1,56 +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 -{ - /// - /// The assignee that has been granted access to GitHub Copilot. - /// - [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.18.0")] - public partial class CopilotSeatDetails_assignee : 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; } - /// - /// Instantiates a new and sets the default values. - /// - public CopilotSeatDetails_assignee() - { - 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.CopilotSeatDetails_assignee CreateFromDiscriminatorValue(IParseNode parseNode) - { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new global::GitHub.Models.CopilotSeatDetails_assignee(); - } - /// - /// The deserialization information for the current model - /// - /// A IDictionary<string, Action<IParseNode>> - public virtual IDictionary> GetFieldDeserializers() - { - return new Dictionary> - { - }; - } - /// - /// 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.WriteAdditionalData(AdditionalData); - } - } -} -#pragma warning restore CS0618 diff --git a/src/GitHub/Models/CopilotSeatDetails_organization.cs b/src/GitHub/Models/CopilotSeatDetails_organization.cs deleted file mode 100644 index be3ae681..00000000 --- a/src/GitHub/Models/CopilotSeatDetails_organization.cs +++ /dev/null @@ -1,56 +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 -{ - /// - /// The organization to which this seat belongs. - /// - [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.18.0")] - public partial class CopilotSeatDetails_organization : 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; } - /// - /// Instantiates a new and sets the default values. - /// - public CopilotSeatDetails_organization() - { - 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.CopilotSeatDetails_organization CreateFromDiscriminatorValue(IParseNode parseNode) - { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new global::GitHub.Models.CopilotSeatDetails_organization(); - } - /// - /// The deserialization information for the current model - /// - /// A IDictionary<string, Action<IParseNode>> - public virtual IDictionary> GetFieldDeserializers() - { - return new Dictionary> - { - }; - } - /// - /// 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.WriteAdditionalData(AdditionalData); - } - } -} -#pragma warning restore CS0618 diff --git a/src/GitHub/Models/NullableOrganizationSimple.cs b/src/GitHub/Models/NullableOrganizationSimple.cs new file mode 100644 index 00000000..e1f72f2e --- /dev/null +++ b/src/GitHub/Models/NullableOrganizationSimple.cs @@ -0,0 +1,170 @@ +// +#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 +{ + /// + /// A GitHub organization. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.18.0")] + public partial class NullableOrganizationSimple : 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 avatar_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? AvatarUrl { get; set; } +#nullable restore +#else + public string AvatarUrl { get; set; } +#endif + /// The description property +#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 + /// The events_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? EventsUrl { get; set; } +#nullable restore +#else + public string EventsUrl { get; set; } +#endif + /// The hooks_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? HooksUrl { get; set; } +#nullable restore +#else + public string HooksUrl { get; set; } +#endif + /// The id property + public int? Id { get; set; } + /// The issues_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? IssuesUrl { get; set; } +#nullable restore +#else + public string IssuesUrl { get; set; } +#endif + /// The login property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Login { get; set; } +#nullable restore +#else + public string Login { get; set; } +#endif + /// The members_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? MembersUrl { get; set; } +#nullable restore +#else + public string MembersUrl { get; set; } +#endif + /// The node_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? NodeId { get; set; } +#nullable restore +#else + public string NodeId { get; set; } +#endif + /// The public_members_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? PublicMembersUrl { get; set; } +#nullable restore +#else + public string PublicMembersUrl { get; set; } +#endif + /// The repos_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ReposUrl { get; set; } +#nullable restore +#else + public string ReposUrl { get; set; } +#endif + /// The url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Url { get; set; } +#nullable restore +#else + public string Url { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public NullableOrganizationSimple() + { + 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.NullableOrganizationSimple CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::GitHub.Models.NullableOrganizationSimple(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "avatar_url", n => { AvatarUrl = n.GetStringValue(); } }, + { "description", n => { Description = n.GetStringValue(); } }, + { "events_url", n => { EventsUrl = n.GetStringValue(); } }, + { "hooks_url", n => { HooksUrl = n.GetStringValue(); } }, + { "id", n => { Id = n.GetIntValue(); } }, + { "issues_url", n => { IssuesUrl = n.GetStringValue(); } }, + { "login", n => { Login = n.GetStringValue(); } }, + { "members_url", n => { MembersUrl = n.GetStringValue(); } }, + { "node_id", n => { NodeId = n.GetStringValue(); } }, + { "public_members_url", n => { PublicMembersUrl = n.GetStringValue(); } }, + { "repos_url", n => { ReposUrl = n.GetStringValue(); } }, + { "url", n => { Url = 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("avatar_url", AvatarUrl); + writer.WriteStringValue("description", Description); + writer.WriteStringValue("events_url", EventsUrl); + writer.WriteStringValue("hooks_url", HooksUrl); + writer.WriteIntValue("id", Id); + writer.WriteStringValue("issues_url", IssuesUrl); + writer.WriteStringValue("login", Login); + writer.WriteStringValue("members_url", MembersUrl); + writer.WriteStringValue("node_id", NodeId); + writer.WriteStringValue("public_members_url", PublicMembersUrl); + writer.WriteStringValue("repos_url", ReposUrl); + writer.WriteStringValue("url", Url); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/GitHub/Models/Users.cs b/src/GitHub/Models/Users.cs index 622ebb44..5ccdff73 100644 --- a/src/GitHub/Models/Users.cs +++ b/src/GitHub/Models/Users.cs @@ -14,23 +14,45 @@ 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; } - /// Whether this email address is the primary address. - public bool? Primary { get; set; } - /// The type of email address. + /// The fragment property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public string? Type { get; set; } + public string? Fragment { get; set; } #nullable restore #else - public string Type { get; set; } + public string Fragment { get; set; } #endif - /// The email address. + /// The matches property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public string? Value { get; set; } + public List? Matches { get; set; } #nullable restore #else - public string Value { get; set; } + 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; } #endif /// /// Instantiates a new and sets the default values. @@ -57,9 +79,11 @@ public virtual IDictionary> GetFieldDeserializers() { return new Dictionary> { - { "primary", n => { Primary = n.GetBoolValue(); } }, - { "type", n => { Type = n.GetStringValue(); } }, - { "value", n => { Value = n.GetStringValue(); } }, + { "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(); } }, }; } /// @@ -69,9 +93,11 @@ public virtual IDictionary> GetFieldDeserializers() public virtual void Serialize(ISerializationWriter writer) { _ = writer ?? throw new ArgumentNullException(nameof(writer)); - writer.WriteBoolValue("primary", Primary); - writer.WriteStringValue("type", Type); - writer.WriteStringValue("value", Value); + writer.WriteStringValue("fragment", Fragment); + writer.WriteCollectionOfObjectValues("matches", Matches); + writer.WriteStringValue("object_type", ObjectType); + writer.WriteStringValue("object_url", ObjectUrl); + writer.WriteStringValue("property", Property); writer.WriteAdditionalData(AdditionalData); } } diff --git a/src/GitHub/Models/Users_matches.cs b/src/GitHub/Models/Users_matches.cs new file mode 100644 index 00000000..10b5df80 --- /dev/null +++ b/src/GitHub/Models/Users_matches.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 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/Repos/Item/Item/Branches/Item/Protection/Restrictions/Apps/AppsDeleteRequestBodyMember1.cs b/src/GitHub/Repos/Item/Item/Branches/Item/Protection/Restrictions/Apps/AppsDeleteRequestBody.cs similarity index 88% rename from src/GitHub/Repos/Item/Item/Branches/Item/Protection/Restrictions/Apps/AppsDeleteRequestBodyMember1.cs rename to src/GitHub/Repos/Item/Item/Branches/Item/Protection/Restrictions/Apps/AppsDeleteRequestBody.cs index 2201a9bf..c96258fb 100644 --- a/src/GitHub/Repos/Item/Item/Branches/Item/Protection/Restrictions/Apps/AppsDeleteRequestBodyMember1.cs +++ b/src/GitHub/Repos/Item/Item/Branches/Item/Protection/Restrictions/Apps/AppsDeleteRequestBody.cs @@ -9,7 +9,7 @@ namespace GitHub.Repos.Item.Item.Branches.Item.Protection.Restrictions.Apps { [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.18.0")] #pragma warning disable CS1591 - public partial class AppsDeleteRequestBodyMember1 : IAdditionalDataHolder, IParsable + public partial class AppsDeleteRequestBody : 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. @@ -23,21 +23,21 @@ public partial class AppsDeleteRequestBodyMember1 : IAdditionalDataHolder, IPars public List Apps { get; set; } #endif /// - /// Instantiates a new and sets the default values. + /// Instantiates a new and sets the default values. /// - public AppsDeleteRequestBodyMember1() + public AppsDeleteRequestBody() { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// - /// A + /// A /// The parse node to use to read the discriminator value and create the object - public static global::GitHub.Repos.Item.Item.Branches.Item.Protection.Restrictions.Apps.AppsDeleteRequestBodyMember1 CreateFromDiscriminatorValue(IParseNode parseNode) + public static global::GitHub.Repos.Item.Item.Branches.Item.Protection.Restrictions.Apps.AppsDeleteRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new global::GitHub.Repos.Item.Item.Branches.Item.Protection.Restrictions.Apps.AppsDeleteRequestBodyMember1(); + return new global::GitHub.Repos.Item.Item.Branches.Item.Protection.Restrictions.Apps.AppsDeleteRequestBody(); } /// /// The deserialization information for the current model diff --git a/src/GitHub/Repos/Item/Item/Branches/Item/Protection/Restrictions/Apps/AppsPostRequestBodyMember1.cs b/src/GitHub/Repos/Item/Item/Branches/Item/Protection/Restrictions/Apps/AppsPostRequestBody.cs similarity index 86% rename from src/GitHub/Repos/Item/Item/Branches/Item/Protection/Restrictions/Apps/AppsPostRequestBodyMember1.cs rename to src/GitHub/Repos/Item/Item/Branches/Item/Protection/Restrictions/Apps/AppsPostRequestBody.cs index 59e2f3e9..9eebd003 100644 --- a/src/GitHub/Repos/Item/Item/Branches/Item/Protection/Restrictions/Apps/AppsPostRequestBodyMember1.cs +++ b/src/GitHub/Repos/Item/Item/Branches/Item/Protection/Restrictions/Apps/AppsPostRequestBody.cs @@ -9,7 +9,7 @@ namespace GitHub.Repos.Item.Item.Branches.Item.Protection.Restrictions.Apps { [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.18.0")] #pragma warning disable CS1591 - public partial class AppsPostRequestBodyMember1 : IAdditionalDataHolder, IParsable + public partial class AppsPostRequestBody : 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. @@ -23,21 +23,21 @@ public partial class AppsPostRequestBodyMember1 : IAdditionalDataHolder, IParsab public List Apps { get; set; } #endif /// - /// Instantiates a new and sets the default values. + /// Instantiates a new and sets the default values. /// - public AppsPostRequestBodyMember1() + public AppsPostRequestBody() { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// - /// A + /// A /// The parse node to use to read the discriminator value and create the object - public static global::GitHub.Repos.Item.Item.Branches.Item.Protection.Restrictions.Apps.AppsPostRequestBodyMember1 CreateFromDiscriminatorValue(IParseNode parseNode) + public static global::GitHub.Repos.Item.Item.Branches.Item.Protection.Restrictions.Apps.AppsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new global::GitHub.Repos.Item.Item.Branches.Item.Protection.Restrictions.Apps.AppsPostRequestBodyMember1(); + return new global::GitHub.Repos.Item.Item.Branches.Item.Protection.Restrictions.Apps.AppsPostRequestBody(); } /// /// The deserialization information for the current model diff --git a/src/GitHub/Repos/Item/Item/Branches/Item/Protection/Restrictions/Apps/AppsPutRequestBodyMember1.cs b/src/GitHub/Repos/Item/Item/Branches/Item/Protection/Restrictions/Apps/AppsPutRequestBody.cs similarity index 87% rename from src/GitHub/Repos/Item/Item/Branches/Item/Protection/Restrictions/Apps/AppsPutRequestBodyMember1.cs rename to src/GitHub/Repos/Item/Item/Branches/Item/Protection/Restrictions/Apps/AppsPutRequestBody.cs index f33c0821..d3777411 100644 --- a/src/GitHub/Repos/Item/Item/Branches/Item/Protection/Restrictions/Apps/AppsPutRequestBodyMember1.cs +++ b/src/GitHub/Repos/Item/Item/Branches/Item/Protection/Restrictions/Apps/AppsPutRequestBody.cs @@ -9,7 +9,7 @@ namespace GitHub.Repos.Item.Item.Branches.Item.Protection.Restrictions.Apps { [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.18.0")] #pragma warning disable CS1591 - public partial class AppsPutRequestBodyMember1 : IAdditionalDataHolder, IParsable + public partial class AppsPutRequestBody : 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. @@ -23,21 +23,21 @@ public partial class AppsPutRequestBodyMember1 : IAdditionalDataHolder, IParsabl public List Apps { get; set; } #endif /// - /// Instantiates a new and sets the default values. + /// Instantiates a new and sets the default values. /// - public AppsPutRequestBodyMember1() + public AppsPutRequestBody() { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// - /// A + /// A /// The parse node to use to read the discriminator value and create the object - public static global::GitHub.Repos.Item.Item.Branches.Item.Protection.Restrictions.Apps.AppsPutRequestBodyMember1 CreateFromDiscriminatorValue(IParseNode parseNode) + public static global::GitHub.Repos.Item.Item.Branches.Item.Protection.Restrictions.Apps.AppsPutRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new global::GitHub.Repos.Item.Item.Branches.Item.Protection.Restrictions.Apps.AppsPutRequestBodyMember1(); + return new global::GitHub.Repos.Item.Item.Branches.Item.Protection.Restrictions.Apps.AppsPutRequestBody(); } /// /// The deserialization information for the current model diff --git a/src/GitHub/Repos/Item/Item/Branches/Item/Protection/Restrictions/Apps/AppsRequestBuilder.cs b/src/GitHub/Repos/Item/Item/Branches/Item/Protection/Restrictions/Apps/AppsRequestBuilder.cs index 6870bd04..2b47f991 100644 --- a/src/GitHub/Repos/Item/Item/Branches/Item/Protection/Restrictions/Apps/AppsRequestBuilder.cs +++ b/src/GitHub/Repos/Item/Item/Branches/Item/Protection/Restrictions/Apps/AppsRequestBuilder.cs @@ -44,11 +44,11 @@ public AppsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base( /// When receiving a 422 status code #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public async Task?> DeleteAsync(global::GitHub.Repos.Item.Item.Branches.Item.Protection.Restrictions.Apps.AppsRequestBuilder.AppsDeleteRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + public async Task?> DeleteAsync(global::GitHub.Repos.Item.Item.Branches.Item.Protection.Restrictions.Apps.AppsDeleteRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { #nullable restore #else - public async Task> DeleteAsync(global::GitHub.Repos.Item.Item.Branches.Item.Protection.Restrictions.Apps.AppsRequestBuilder.AppsDeleteRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + public async Task> DeleteAsync(global::GitHub.Repos.Item.Item.Branches.Item.Protection.Restrictions.Apps.AppsDeleteRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif _ = body ?? throw new ArgumentNullException(nameof(body)); @@ -96,11 +96,11 @@ public AppsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base( /// When receiving a 422 status code #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public async Task?> PostAsync(global::GitHub.Repos.Item.Item.Branches.Item.Protection.Restrictions.Apps.AppsRequestBuilder.AppsPostRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + public async Task?> PostAsync(global::GitHub.Repos.Item.Item.Branches.Item.Protection.Restrictions.Apps.AppsPostRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { #nullable restore #else - public async Task> PostAsync(global::GitHub.Repos.Item.Item.Branches.Item.Protection.Restrictions.Apps.AppsRequestBuilder.AppsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + public async Task> PostAsync(global::GitHub.Repos.Item.Item.Branches.Item.Protection.Restrictions.Apps.AppsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif _ = body ?? throw new ArgumentNullException(nameof(body)); @@ -123,11 +123,11 @@ public AppsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base( /// When receiving a 422 status code #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public async Task?> PutAsync(global::GitHub.Repos.Item.Item.Branches.Item.Protection.Restrictions.Apps.AppsRequestBuilder.AppsPutRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + public async Task?> PutAsync(global::GitHub.Repos.Item.Item.Branches.Item.Protection.Restrictions.Apps.AppsPutRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { #nullable restore #else - public async Task> PutAsync(global::GitHub.Repos.Item.Item.Branches.Item.Protection.Restrictions.Apps.AppsRequestBuilder.AppsPutRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + public async Task> PutAsync(global::GitHub.Repos.Item.Item.Branches.Item.Protection.Restrictions.Apps.AppsPutRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif _ = body ?? throw new ArgumentNullException(nameof(body)); @@ -147,11 +147,11 @@ public AppsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base( /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToDeleteRequestInformation(global::GitHub.Repos.Item.Item.Branches.Item.Protection.Restrictions.Apps.AppsRequestBuilder.AppsDeleteRequestBody body, Action>? requestConfiguration = default) + public RequestInformation ToDeleteRequestInformation(global::GitHub.Repos.Item.Item.Branches.Item.Protection.Restrictions.Apps.AppsDeleteRequestBody body, Action>? requestConfiguration = default) { #nullable restore #else - public RequestInformation ToDeleteRequestInformation(global::GitHub.Repos.Item.Item.Branches.Item.Protection.Restrictions.Apps.AppsRequestBuilder.AppsDeleteRequestBody body, Action> requestConfiguration = default) + public RequestInformation ToDeleteRequestInformation(global::GitHub.Repos.Item.Item.Branches.Item.Protection.Restrictions.Apps.AppsDeleteRequestBody body, Action> requestConfiguration = default) { #endif _ = body ?? throw new ArgumentNullException(nameof(body)); @@ -188,11 +188,11 @@ public RequestInformation ToGetRequestInformation(ActionConfiguration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToPostRequestInformation(global::GitHub.Repos.Item.Item.Branches.Item.Protection.Restrictions.Apps.AppsRequestBuilder.AppsPostRequestBody body, Action>? requestConfiguration = default) + public RequestInformation ToPostRequestInformation(global::GitHub.Repos.Item.Item.Branches.Item.Protection.Restrictions.Apps.AppsPostRequestBody body, Action>? requestConfiguration = default) { #nullable restore #else - public RequestInformation ToPostRequestInformation(global::GitHub.Repos.Item.Item.Branches.Item.Protection.Restrictions.Apps.AppsRequestBuilder.AppsPostRequestBody body, Action> requestConfiguration = default) + public RequestInformation ToPostRequestInformation(global::GitHub.Repos.Item.Item.Branches.Item.Protection.Restrictions.Apps.AppsPostRequestBody body, Action> requestConfiguration = default) { #endif _ = body ?? throw new ArgumentNullException(nameof(body)); @@ -210,11 +210,11 @@ public RequestInformation ToPostRequestInformation(global::GitHub.Repos.Item.Ite /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToPutRequestInformation(global::GitHub.Repos.Item.Item.Branches.Item.Protection.Restrictions.Apps.AppsRequestBuilder.AppsPutRequestBody body, Action>? requestConfiguration = default) + public RequestInformation ToPutRequestInformation(global::GitHub.Repos.Item.Item.Branches.Item.Protection.Restrictions.Apps.AppsPutRequestBody body, Action>? requestConfiguration = default) { #nullable restore #else - public RequestInformation ToPutRequestInformation(global::GitHub.Repos.Item.Item.Branches.Item.Protection.Restrictions.Apps.AppsRequestBuilder.AppsPutRequestBody body, Action> requestConfiguration = default) + public RequestInformation ToPutRequestInformation(global::GitHub.Repos.Item.Item.Branches.Item.Protection.Restrictions.Apps.AppsPutRequestBody body, Action> requestConfiguration = default) { #endif _ = body ?? throw new ArgumentNullException(nameof(body)); @@ -233,327 +233,6 @@ public RequestInformation ToPutRequestInformation(global::GitHub.Repos.Item.Item { return new global::GitHub.Repos.Item.Item.Branches.Item.Protection.Restrictions.Apps.AppsRequestBuilder(rawUrl, RequestAdapter); } - /// - /// Composed type wrapper for classes , - /// - [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.18.0")] - public partial class AppsDeleteRequestBody : IComposedTypeWrapper, IParsable - { - /// Composed type representation for type -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable - public global::GitHub.Repos.Item.Item.Branches.Item.Protection.Restrictions.Apps.AppsDeleteRequestBodyMember1? AppsDeleteRequestBodyAppsDeleteRequestBodyMember1 { get; set; } -#nullable restore -#else - public global::GitHub.Repos.Item.Item.Branches.Item.Protection.Restrictions.Apps.AppsDeleteRequestBodyMember1 AppsDeleteRequestBodyAppsDeleteRequestBodyMember1 { get; set; } -#endif - /// Composed type representation for type -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable - public global::GitHub.Repos.Item.Item.Branches.Item.Protection.Restrictions.Apps.AppsDeleteRequestBodyMember1? AppsDeleteRequestBodyMember1 { get; set; } -#nullable restore -#else - public global::GitHub.Repos.Item.Item.Branches.Item.Protection.Restrictions.Apps.AppsDeleteRequestBodyMember1 AppsDeleteRequestBodyMember1 { get; set; } -#endif - /// Composed type representation for type -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable - public string? AppsDeleteRequestBodyString { get; set; } -#nullable restore -#else - public string AppsDeleteRequestBodyString { get; set; } -#endif - /// Composed type representation for type -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable - public string? String { get; set; } -#nullable restore -#else - public string String { get; set; } -#endif - /// - /// 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.Repos.Item.Item.Branches.Item.Protection.Restrictions.Apps.AppsRequestBuilder.AppsDeleteRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) - { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - var mappingValue = parseNode.GetChildNode("")?.GetStringValue(); - var result = new global::GitHub.Repos.Item.Item.Branches.Item.Protection.Restrictions.Apps.AppsRequestBuilder.AppsDeleteRequestBody(); - if("".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) - { - result.AppsDeleteRequestBodyAppsDeleteRequestBodyMember1 = new global::GitHub.Repos.Item.Item.Branches.Item.Protection.Restrictions.Apps.AppsDeleteRequestBodyMember1(); - } - else if("".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) - { - result.AppsDeleteRequestBodyMember1 = new global::GitHub.Repos.Item.Item.Branches.Item.Protection.Restrictions.Apps.AppsDeleteRequestBodyMember1(); - } - else if(parseNode.GetStringValue() is string appsDeleteRequestBodyStringValue) - { - result.AppsDeleteRequestBodyString = appsDeleteRequestBodyStringValue; - } - else if(parseNode.GetStringValue() is string stringValue) - { - result.String = stringValue; - } - return result; - } - /// - /// The deserialization information for the current model - /// - /// A IDictionary<string, Action<IParseNode>> - public virtual IDictionary> GetFieldDeserializers() - { - if(AppsDeleteRequestBodyAppsDeleteRequestBodyMember1 != null) - { - return AppsDeleteRequestBodyAppsDeleteRequestBodyMember1.GetFieldDeserializers(); - } - else if(AppsDeleteRequestBodyMember1 != null) - { - return AppsDeleteRequestBodyMember1.GetFieldDeserializers(); - } - return new Dictionary>(); - } - /// - /// 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)); - if(AppsDeleteRequestBodyAppsDeleteRequestBodyMember1 != null) - { - writer.WriteObjectValue(null, AppsDeleteRequestBodyAppsDeleteRequestBodyMember1); - } - else if(AppsDeleteRequestBodyMember1 != null) - { - writer.WriteObjectValue(null, AppsDeleteRequestBodyMember1); - } - else if(AppsDeleteRequestBodyString != null) - { - writer.WriteStringValue(null, AppsDeleteRequestBodyString); - } - else if(String != null) - { - writer.WriteStringValue(null, String); - } - } - } - /// - /// Composed type wrapper for classes , - /// - [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.18.0")] - public partial class AppsPostRequestBody : IComposedTypeWrapper, IParsable - { - /// Composed type representation for type -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable - public global::GitHub.Repos.Item.Item.Branches.Item.Protection.Restrictions.Apps.AppsPostRequestBodyMember1? AppsPostRequestBodyAppsPostRequestBodyMember1 { get; set; } -#nullable restore -#else - public global::GitHub.Repos.Item.Item.Branches.Item.Protection.Restrictions.Apps.AppsPostRequestBodyMember1 AppsPostRequestBodyAppsPostRequestBodyMember1 { get; set; } -#endif - /// Composed type representation for type -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable - public global::GitHub.Repos.Item.Item.Branches.Item.Protection.Restrictions.Apps.AppsPostRequestBodyMember1? AppsPostRequestBodyMember1 { get; set; } -#nullable restore -#else - public global::GitHub.Repos.Item.Item.Branches.Item.Protection.Restrictions.Apps.AppsPostRequestBodyMember1 AppsPostRequestBodyMember1 { get; set; } -#endif - /// Composed type representation for type -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable - public string? AppsPostRequestBodyString { get; set; } -#nullable restore -#else - public string AppsPostRequestBodyString { get; set; } -#endif - /// Composed type representation for type -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable - public string? String { get; set; } -#nullable restore -#else - public string String { get; set; } -#endif - /// - /// 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.Repos.Item.Item.Branches.Item.Protection.Restrictions.Apps.AppsRequestBuilder.AppsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) - { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - var mappingValue = parseNode.GetChildNode("")?.GetStringValue(); - var result = new global::GitHub.Repos.Item.Item.Branches.Item.Protection.Restrictions.Apps.AppsRequestBuilder.AppsPostRequestBody(); - if("".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) - { - result.AppsPostRequestBodyAppsPostRequestBodyMember1 = new global::GitHub.Repos.Item.Item.Branches.Item.Protection.Restrictions.Apps.AppsPostRequestBodyMember1(); - } - else if("".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) - { - result.AppsPostRequestBodyMember1 = new global::GitHub.Repos.Item.Item.Branches.Item.Protection.Restrictions.Apps.AppsPostRequestBodyMember1(); - } - else if(parseNode.GetStringValue() is string appsPostRequestBodyStringValue) - { - result.AppsPostRequestBodyString = appsPostRequestBodyStringValue; - } - else if(parseNode.GetStringValue() is string stringValue) - { - result.String = stringValue; - } - return result; - } - /// - /// The deserialization information for the current model - /// - /// A IDictionary<string, Action<IParseNode>> - public virtual IDictionary> GetFieldDeserializers() - { - if(AppsPostRequestBodyAppsPostRequestBodyMember1 != null) - { - return AppsPostRequestBodyAppsPostRequestBodyMember1.GetFieldDeserializers(); - } - else if(AppsPostRequestBodyMember1 != null) - { - return AppsPostRequestBodyMember1.GetFieldDeserializers(); - } - return new Dictionary>(); - } - /// - /// 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)); - if(AppsPostRequestBodyAppsPostRequestBodyMember1 != null) - { - writer.WriteObjectValue(null, AppsPostRequestBodyAppsPostRequestBodyMember1); - } - else if(AppsPostRequestBodyMember1 != null) - { - writer.WriteObjectValue(null, AppsPostRequestBodyMember1); - } - else if(AppsPostRequestBodyString != null) - { - writer.WriteStringValue(null, AppsPostRequestBodyString); - } - else if(String != null) - { - writer.WriteStringValue(null, String); - } - } - } - /// - /// Composed type wrapper for classes , - /// - [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.18.0")] - public partial class AppsPutRequestBody : IComposedTypeWrapper, IParsable - { - /// Composed type representation for type -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable - public global::GitHub.Repos.Item.Item.Branches.Item.Protection.Restrictions.Apps.AppsPutRequestBodyMember1? AppsPutRequestBodyAppsPutRequestBodyMember1 { get; set; } -#nullable restore -#else - public global::GitHub.Repos.Item.Item.Branches.Item.Protection.Restrictions.Apps.AppsPutRequestBodyMember1 AppsPutRequestBodyAppsPutRequestBodyMember1 { get; set; } -#endif - /// Composed type representation for type -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable - public global::GitHub.Repos.Item.Item.Branches.Item.Protection.Restrictions.Apps.AppsPutRequestBodyMember1? AppsPutRequestBodyMember1 { get; set; } -#nullable restore -#else - public global::GitHub.Repos.Item.Item.Branches.Item.Protection.Restrictions.Apps.AppsPutRequestBodyMember1 AppsPutRequestBodyMember1 { get; set; } -#endif - /// Composed type representation for type -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable - public string? AppsPutRequestBodyString { get; set; } -#nullable restore -#else - public string AppsPutRequestBodyString { get; set; } -#endif - /// Composed type representation for type -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable - public string? String { get; set; } -#nullable restore -#else - public string String { get; set; } -#endif - /// - /// 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.Repos.Item.Item.Branches.Item.Protection.Restrictions.Apps.AppsRequestBuilder.AppsPutRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) - { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - var mappingValue = parseNode.GetChildNode("")?.GetStringValue(); - var result = new global::GitHub.Repos.Item.Item.Branches.Item.Protection.Restrictions.Apps.AppsRequestBuilder.AppsPutRequestBody(); - if("".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) - { - result.AppsPutRequestBodyAppsPutRequestBodyMember1 = new global::GitHub.Repos.Item.Item.Branches.Item.Protection.Restrictions.Apps.AppsPutRequestBodyMember1(); - } - else if("".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) - { - result.AppsPutRequestBodyMember1 = new global::GitHub.Repos.Item.Item.Branches.Item.Protection.Restrictions.Apps.AppsPutRequestBodyMember1(); - } - else if(parseNode.GetStringValue() is string appsPutRequestBodyStringValue) - { - result.AppsPutRequestBodyString = appsPutRequestBodyStringValue; - } - else if(parseNode.GetStringValue() is string stringValue) - { - result.String = stringValue; - } - return result; - } - /// - /// The deserialization information for the current model - /// - /// A IDictionary<string, Action<IParseNode>> - public virtual IDictionary> GetFieldDeserializers() - { - if(AppsPutRequestBodyAppsPutRequestBodyMember1 != null) - { - return AppsPutRequestBodyAppsPutRequestBodyMember1.GetFieldDeserializers(); - } - else if(AppsPutRequestBodyMember1 != null) - { - return AppsPutRequestBodyMember1.GetFieldDeserializers(); - } - return new Dictionary>(); - } - /// - /// 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)); - if(AppsPutRequestBodyAppsPutRequestBodyMember1 != null) - { - writer.WriteObjectValue(null, AppsPutRequestBodyAppsPutRequestBodyMember1); - } - else if(AppsPutRequestBodyMember1 != null) - { - writer.WriteObjectValue(null, AppsPutRequestBodyMember1); - } - else if(AppsPutRequestBodyString != null) - { - writer.WriteStringValue(null, AppsPutRequestBodyString); - } - else if(String != null) - { - writer.WriteStringValue(null, String); - } - } - } } } #pragma warning restore CS0618 diff --git a/src/GitHub/Repos/Item/Item/Branches/Item/Protection/Restrictions/Users/UsersDeleteRequestBodyMember1.cs b/src/GitHub/Repos/Item/Item/Branches/Item/Protection/Restrictions/Users/UsersDeleteRequestBody.cs similarity index 87% rename from src/GitHub/Repos/Item/Item/Branches/Item/Protection/Restrictions/Users/UsersDeleteRequestBodyMember1.cs rename to src/GitHub/Repos/Item/Item/Branches/Item/Protection/Restrictions/Users/UsersDeleteRequestBody.cs index a8c7fadc..2dfcbb33 100644 --- a/src/GitHub/Repos/Item/Item/Branches/Item/Protection/Restrictions/Users/UsersDeleteRequestBodyMember1.cs +++ b/src/GitHub/Repos/Item/Item/Branches/Item/Protection/Restrictions/Users/UsersDeleteRequestBody.cs @@ -9,7 +9,7 @@ namespace GitHub.Repos.Item.Item.Branches.Item.Protection.Restrictions.Users { [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.18.0")] #pragma warning disable CS1591 - public partial class UsersDeleteRequestBodyMember1 : IAdditionalDataHolder, IParsable + public partial class UsersDeleteRequestBody : 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. @@ -23,21 +23,21 @@ public partial class UsersDeleteRequestBodyMember1 : IAdditionalDataHolder, IPar public List Users { get; set; } #endif /// - /// Instantiates a new and sets the default values. + /// Instantiates a new and sets the default values. /// - public UsersDeleteRequestBodyMember1() + public UsersDeleteRequestBody() { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// - /// A + /// A /// The parse node to use to read the discriminator value and create the object - public static global::GitHub.Repos.Item.Item.Branches.Item.Protection.Restrictions.Users.UsersDeleteRequestBodyMember1 CreateFromDiscriminatorValue(IParseNode parseNode) + public static global::GitHub.Repos.Item.Item.Branches.Item.Protection.Restrictions.Users.UsersDeleteRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new global::GitHub.Repos.Item.Item.Branches.Item.Protection.Restrictions.Users.UsersDeleteRequestBodyMember1(); + return new global::GitHub.Repos.Item.Item.Branches.Item.Protection.Restrictions.Users.UsersDeleteRequestBody(); } /// /// The deserialization information for the current model diff --git a/src/GitHub/Repos/Item/Item/Branches/Item/Protection/Restrictions/Users/UsersPostRequestBodyMember1.cs b/src/GitHub/Repos/Item/Item/Branches/Item/Protection/Restrictions/Users/UsersPostRequestBody.cs similarity index 88% rename from src/GitHub/Repos/Item/Item/Branches/Item/Protection/Restrictions/Users/UsersPostRequestBodyMember1.cs rename to src/GitHub/Repos/Item/Item/Branches/Item/Protection/Restrictions/Users/UsersPostRequestBody.cs index a623e696..513330bd 100644 --- a/src/GitHub/Repos/Item/Item/Branches/Item/Protection/Restrictions/Users/UsersPostRequestBodyMember1.cs +++ b/src/GitHub/Repos/Item/Item/Branches/Item/Protection/Restrictions/Users/UsersPostRequestBody.cs @@ -9,7 +9,7 @@ namespace GitHub.Repos.Item.Item.Branches.Item.Protection.Restrictions.Users { [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.18.0")] #pragma warning disable CS1591 - public partial class UsersPostRequestBodyMember1 : IAdditionalDataHolder, IParsable + public partial class UsersPostRequestBody : 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. @@ -23,21 +23,21 @@ public partial class UsersPostRequestBodyMember1 : IAdditionalDataHolder, IParsa public List Users { get; set; } #endif /// - /// Instantiates a new and sets the default values. + /// Instantiates a new and sets the default values. /// - public UsersPostRequestBodyMember1() + public UsersPostRequestBody() { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// - /// A + /// A /// The parse node to use to read the discriminator value and create the object - public static global::GitHub.Repos.Item.Item.Branches.Item.Protection.Restrictions.Users.UsersPostRequestBodyMember1 CreateFromDiscriminatorValue(IParseNode parseNode) + public static global::GitHub.Repos.Item.Item.Branches.Item.Protection.Restrictions.Users.UsersPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new global::GitHub.Repos.Item.Item.Branches.Item.Protection.Restrictions.Users.UsersPostRequestBodyMember1(); + return new global::GitHub.Repos.Item.Item.Branches.Item.Protection.Restrictions.Users.UsersPostRequestBody(); } /// /// The deserialization information for the current model diff --git a/src/GitHub/Repos/Item/Item/Branches/Item/Protection/Restrictions/Users/UsersPutRequestBodyMember1.cs b/src/GitHub/Repos/Item/Item/Branches/Item/Protection/Restrictions/Users/UsersPutRequestBody.cs similarity index 88% rename from src/GitHub/Repos/Item/Item/Branches/Item/Protection/Restrictions/Users/UsersPutRequestBodyMember1.cs rename to src/GitHub/Repos/Item/Item/Branches/Item/Protection/Restrictions/Users/UsersPutRequestBody.cs index c48c3fb9..6dfb404a 100644 --- a/src/GitHub/Repos/Item/Item/Branches/Item/Protection/Restrictions/Users/UsersPutRequestBodyMember1.cs +++ b/src/GitHub/Repos/Item/Item/Branches/Item/Protection/Restrictions/Users/UsersPutRequestBody.cs @@ -9,7 +9,7 @@ namespace GitHub.Repos.Item.Item.Branches.Item.Protection.Restrictions.Users { [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.18.0")] #pragma warning disable CS1591 - public partial class UsersPutRequestBodyMember1 : IAdditionalDataHolder, IParsable + public partial class UsersPutRequestBody : 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. @@ -23,21 +23,21 @@ public partial class UsersPutRequestBodyMember1 : IAdditionalDataHolder, IParsab public List Users { get; set; } #endif /// - /// Instantiates a new and sets the default values. + /// Instantiates a new and sets the default values. /// - public UsersPutRequestBodyMember1() + public UsersPutRequestBody() { AdditionalData = new Dictionary(); } /// /// Creates a new instance of the appropriate class based on discriminator value /// - /// A + /// A /// The parse node to use to read the discriminator value and create the object - public static global::GitHub.Repos.Item.Item.Branches.Item.Protection.Restrictions.Users.UsersPutRequestBodyMember1 CreateFromDiscriminatorValue(IParseNode parseNode) + public static global::GitHub.Repos.Item.Item.Branches.Item.Protection.Restrictions.Users.UsersPutRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new global::GitHub.Repos.Item.Item.Branches.Item.Protection.Restrictions.Users.UsersPutRequestBodyMember1(); + return new global::GitHub.Repos.Item.Item.Branches.Item.Protection.Restrictions.Users.UsersPutRequestBody(); } /// /// The deserialization information for the current model diff --git a/src/GitHub/Repos/Item/Item/Branches/Item/Protection/Restrictions/Users/UsersRequestBuilder.cs b/src/GitHub/Repos/Item/Item/Branches/Item/Protection/Restrictions/Users/UsersRequestBuilder.cs index e21ccef3..e397f6fd 100644 --- a/src/GitHub/Repos/Item/Item/Branches/Item/Protection/Restrictions/Users/UsersRequestBuilder.cs +++ b/src/GitHub/Repos/Item/Item/Branches/Item/Protection/Restrictions/Users/UsersRequestBuilder.cs @@ -44,11 +44,11 @@ public UsersRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base /// When receiving a 422 status code #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public async Task?> DeleteAsync(global::GitHub.Repos.Item.Item.Branches.Item.Protection.Restrictions.Users.UsersRequestBuilder.UsersDeleteRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + public async Task?> DeleteAsync(global::GitHub.Repos.Item.Item.Branches.Item.Protection.Restrictions.Users.UsersDeleteRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { #nullable restore #else - public async Task> DeleteAsync(global::GitHub.Repos.Item.Item.Branches.Item.Protection.Restrictions.Users.UsersRequestBuilder.UsersDeleteRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + public async Task> DeleteAsync(global::GitHub.Repos.Item.Item.Branches.Item.Protection.Restrictions.Users.UsersDeleteRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif _ = body ?? throw new ArgumentNullException(nameof(body)); @@ -96,11 +96,11 @@ public UsersRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base /// When receiving a 422 status code #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public async Task?> PostAsync(global::GitHub.Repos.Item.Item.Branches.Item.Protection.Restrictions.Users.UsersRequestBuilder.UsersPostRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + public async Task?> PostAsync(global::GitHub.Repos.Item.Item.Branches.Item.Protection.Restrictions.Users.UsersPostRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { #nullable restore #else - public async Task> PostAsync(global::GitHub.Repos.Item.Item.Branches.Item.Protection.Restrictions.Users.UsersRequestBuilder.UsersPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + public async Task> PostAsync(global::GitHub.Repos.Item.Item.Branches.Item.Protection.Restrictions.Users.UsersPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif _ = body ?? throw new ArgumentNullException(nameof(body)); @@ -123,11 +123,11 @@ public UsersRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base /// When receiving a 422 status code #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public async Task?> PutAsync(global::GitHub.Repos.Item.Item.Branches.Item.Protection.Restrictions.Users.UsersRequestBuilder.UsersPutRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + public async Task?> PutAsync(global::GitHub.Repos.Item.Item.Branches.Item.Protection.Restrictions.Users.UsersPutRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { #nullable restore #else - public async Task> PutAsync(global::GitHub.Repos.Item.Item.Branches.Item.Protection.Restrictions.Users.UsersRequestBuilder.UsersPutRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + public async Task> PutAsync(global::GitHub.Repos.Item.Item.Branches.Item.Protection.Restrictions.Users.UsersPutRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif _ = body ?? throw new ArgumentNullException(nameof(body)); @@ -147,11 +147,11 @@ public UsersRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToDeleteRequestInformation(global::GitHub.Repos.Item.Item.Branches.Item.Protection.Restrictions.Users.UsersRequestBuilder.UsersDeleteRequestBody body, Action>? requestConfiguration = default) + public RequestInformation ToDeleteRequestInformation(global::GitHub.Repos.Item.Item.Branches.Item.Protection.Restrictions.Users.UsersDeleteRequestBody body, Action>? requestConfiguration = default) { #nullable restore #else - public RequestInformation ToDeleteRequestInformation(global::GitHub.Repos.Item.Item.Branches.Item.Protection.Restrictions.Users.UsersRequestBuilder.UsersDeleteRequestBody body, Action> requestConfiguration = default) + public RequestInformation ToDeleteRequestInformation(global::GitHub.Repos.Item.Item.Branches.Item.Protection.Restrictions.Users.UsersDeleteRequestBody body, Action> requestConfiguration = default) { #endif _ = body ?? throw new ArgumentNullException(nameof(body)); @@ -188,11 +188,11 @@ public RequestInformation ToGetRequestInformation(ActionConfiguration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToPostRequestInformation(global::GitHub.Repos.Item.Item.Branches.Item.Protection.Restrictions.Users.UsersRequestBuilder.UsersPostRequestBody body, Action>? requestConfiguration = default) + public RequestInformation ToPostRequestInformation(global::GitHub.Repos.Item.Item.Branches.Item.Protection.Restrictions.Users.UsersPostRequestBody body, Action>? requestConfiguration = default) { #nullable restore #else - public RequestInformation ToPostRequestInformation(global::GitHub.Repos.Item.Item.Branches.Item.Protection.Restrictions.Users.UsersRequestBuilder.UsersPostRequestBody body, Action> requestConfiguration = default) + public RequestInformation ToPostRequestInformation(global::GitHub.Repos.Item.Item.Branches.Item.Protection.Restrictions.Users.UsersPostRequestBody body, Action> requestConfiguration = default) { #endif _ = body ?? throw new ArgumentNullException(nameof(body)); @@ -210,11 +210,11 @@ public RequestInformation ToPostRequestInformation(global::GitHub.Repos.Item.Ite /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public RequestInformation ToPutRequestInformation(global::GitHub.Repos.Item.Item.Branches.Item.Protection.Restrictions.Users.UsersRequestBuilder.UsersPutRequestBody body, Action>? requestConfiguration = default) + public RequestInformation ToPutRequestInformation(global::GitHub.Repos.Item.Item.Branches.Item.Protection.Restrictions.Users.UsersPutRequestBody body, Action>? requestConfiguration = default) { #nullable restore #else - public RequestInformation ToPutRequestInformation(global::GitHub.Repos.Item.Item.Branches.Item.Protection.Restrictions.Users.UsersRequestBuilder.UsersPutRequestBody body, Action> requestConfiguration = default) + public RequestInformation ToPutRequestInformation(global::GitHub.Repos.Item.Item.Branches.Item.Protection.Restrictions.Users.UsersPutRequestBody body, Action> requestConfiguration = default) { #endif _ = body ?? throw new ArgumentNullException(nameof(body)); @@ -233,327 +233,6 @@ public RequestInformation ToPutRequestInformation(global::GitHub.Repos.Item.Item { return new global::GitHub.Repos.Item.Item.Branches.Item.Protection.Restrictions.Users.UsersRequestBuilder(rawUrl, RequestAdapter); } - /// - /// Composed type wrapper for classes , - /// - [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.18.0")] - public partial class UsersDeleteRequestBody : IComposedTypeWrapper, IParsable - { - /// Composed type representation for type -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable - public string? String { get; set; } -#nullable restore -#else - public string String { get; set; } -#endif - /// Composed type representation for type -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable - public global::GitHub.Repos.Item.Item.Branches.Item.Protection.Restrictions.Users.UsersDeleteRequestBodyMember1? UsersDeleteRequestBodyMember1 { get; set; } -#nullable restore -#else - public global::GitHub.Repos.Item.Item.Branches.Item.Protection.Restrictions.Users.UsersDeleteRequestBodyMember1 UsersDeleteRequestBodyMember1 { get; set; } -#endif - /// Composed type representation for type -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable - public string? UsersDeleteRequestBodyString { get; set; } -#nullable restore -#else - public string UsersDeleteRequestBodyString { get; set; } -#endif - /// Composed type representation for type -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable - public global::GitHub.Repos.Item.Item.Branches.Item.Protection.Restrictions.Users.UsersDeleteRequestBodyMember1? UsersDeleteRequestBodyUsersDeleteRequestBodyMember1 { get; set; } -#nullable restore -#else - public global::GitHub.Repos.Item.Item.Branches.Item.Protection.Restrictions.Users.UsersDeleteRequestBodyMember1 UsersDeleteRequestBodyUsersDeleteRequestBodyMember1 { get; set; } -#endif - /// - /// 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.Repos.Item.Item.Branches.Item.Protection.Restrictions.Users.UsersRequestBuilder.UsersDeleteRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) - { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - var mappingValue = parseNode.GetChildNode("")?.GetStringValue(); - var result = new global::GitHub.Repos.Item.Item.Branches.Item.Protection.Restrictions.Users.UsersRequestBuilder.UsersDeleteRequestBody(); - if("".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) - { - result.UsersDeleteRequestBodyMember1 = new global::GitHub.Repos.Item.Item.Branches.Item.Protection.Restrictions.Users.UsersDeleteRequestBodyMember1(); - } - else if("".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) - { - result.UsersDeleteRequestBodyUsersDeleteRequestBodyMember1 = new global::GitHub.Repos.Item.Item.Branches.Item.Protection.Restrictions.Users.UsersDeleteRequestBodyMember1(); - } - else if(parseNode.GetStringValue() is string stringValue) - { - result.String = stringValue; - } - else if(parseNode.GetStringValue() is string usersDeleteRequestBodyStringValue) - { - result.UsersDeleteRequestBodyString = usersDeleteRequestBodyStringValue; - } - return result; - } - /// - /// The deserialization information for the current model - /// - /// A IDictionary<string, Action<IParseNode>> - public virtual IDictionary> GetFieldDeserializers() - { - if(UsersDeleteRequestBodyMember1 != null) - { - return UsersDeleteRequestBodyMember1.GetFieldDeserializers(); - } - else if(UsersDeleteRequestBodyUsersDeleteRequestBodyMember1 != null) - { - return UsersDeleteRequestBodyUsersDeleteRequestBodyMember1.GetFieldDeserializers(); - } - return new Dictionary>(); - } - /// - /// 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)); - if(UsersDeleteRequestBodyMember1 != null) - { - writer.WriteObjectValue(null, UsersDeleteRequestBodyMember1); - } - else if(UsersDeleteRequestBodyUsersDeleteRequestBodyMember1 != null) - { - writer.WriteObjectValue(null, UsersDeleteRequestBodyUsersDeleteRequestBodyMember1); - } - else if(String != null) - { - writer.WriteStringValue(null, String); - } - else if(UsersDeleteRequestBodyString != null) - { - writer.WriteStringValue(null, UsersDeleteRequestBodyString); - } - } - } - /// - /// Composed type wrapper for classes , - /// - [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.18.0")] - public partial class UsersPostRequestBody : IComposedTypeWrapper, IParsable - { - /// Composed type representation for type -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable - public string? String { get; set; } -#nullable restore -#else - public string String { get; set; } -#endif - /// Composed type representation for type -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable - public global::GitHub.Repos.Item.Item.Branches.Item.Protection.Restrictions.Users.UsersPostRequestBodyMember1? UsersPostRequestBodyMember1 { get; set; } -#nullable restore -#else - public global::GitHub.Repos.Item.Item.Branches.Item.Protection.Restrictions.Users.UsersPostRequestBodyMember1 UsersPostRequestBodyMember1 { get; set; } -#endif - /// Composed type representation for type -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable - public string? UsersPostRequestBodyString { get; set; } -#nullable restore -#else - public string UsersPostRequestBodyString { get; set; } -#endif - /// Composed type representation for type -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable - public global::GitHub.Repos.Item.Item.Branches.Item.Protection.Restrictions.Users.UsersPostRequestBodyMember1? UsersPostRequestBodyUsersPostRequestBodyMember1 { get; set; } -#nullable restore -#else - public global::GitHub.Repos.Item.Item.Branches.Item.Protection.Restrictions.Users.UsersPostRequestBodyMember1 UsersPostRequestBodyUsersPostRequestBodyMember1 { get; set; } -#endif - /// - /// 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.Repos.Item.Item.Branches.Item.Protection.Restrictions.Users.UsersRequestBuilder.UsersPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) - { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - var mappingValue = parseNode.GetChildNode("")?.GetStringValue(); - var result = new global::GitHub.Repos.Item.Item.Branches.Item.Protection.Restrictions.Users.UsersRequestBuilder.UsersPostRequestBody(); - if("".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) - { - result.UsersPostRequestBodyMember1 = new global::GitHub.Repos.Item.Item.Branches.Item.Protection.Restrictions.Users.UsersPostRequestBodyMember1(); - } - else if("".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) - { - result.UsersPostRequestBodyUsersPostRequestBodyMember1 = new global::GitHub.Repos.Item.Item.Branches.Item.Protection.Restrictions.Users.UsersPostRequestBodyMember1(); - } - else if(parseNode.GetStringValue() is string stringValue) - { - result.String = stringValue; - } - else if(parseNode.GetStringValue() is string usersPostRequestBodyStringValue) - { - result.UsersPostRequestBodyString = usersPostRequestBodyStringValue; - } - return result; - } - /// - /// The deserialization information for the current model - /// - /// A IDictionary<string, Action<IParseNode>> - public virtual IDictionary> GetFieldDeserializers() - { - if(UsersPostRequestBodyMember1 != null) - { - return UsersPostRequestBodyMember1.GetFieldDeserializers(); - } - else if(UsersPostRequestBodyUsersPostRequestBodyMember1 != null) - { - return UsersPostRequestBodyUsersPostRequestBodyMember1.GetFieldDeserializers(); - } - return new Dictionary>(); - } - /// - /// 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)); - if(UsersPostRequestBodyMember1 != null) - { - writer.WriteObjectValue(null, UsersPostRequestBodyMember1); - } - else if(UsersPostRequestBodyUsersPostRequestBodyMember1 != null) - { - writer.WriteObjectValue(null, UsersPostRequestBodyUsersPostRequestBodyMember1); - } - else if(String != null) - { - writer.WriteStringValue(null, String); - } - else if(UsersPostRequestBodyString != null) - { - writer.WriteStringValue(null, UsersPostRequestBodyString); - } - } - } - /// - /// Composed type wrapper for classes , - /// - [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.18.0")] - public partial class UsersPutRequestBody : IComposedTypeWrapper, IParsable - { - /// Composed type representation for type -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable - public string? String { get; set; } -#nullable restore -#else - public string String { get; set; } -#endif - /// Composed type representation for type -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable - public global::GitHub.Repos.Item.Item.Branches.Item.Protection.Restrictions.Users.UsersPutRequestBodyMember1? UsersPutRequestBodyMember1 { get; set; } -#nullable restore -#else - public global::GitHub.Repos.Item.Item.Branches.Item.Protection.Restrictions.Users.UsersPutRequestBodyMember1 UsersPutRequestBodyMember1 { get; set; } -#endif - /// Composed type representation for type -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable - public string? UsersPutRequestBodyString { get; set; } -#nullable restore -#else - public string UsersPutRequestBodyString { get; set; } -#endif - /// Composed type representation for type -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable - public global::GitHub.Repos.Item.Item.Branches.Item.Protection.Restrictions.Users.UsersPutRequestBodyMember1? UsersPutRequestBodyUsersPutRequestBodyMember1 { get; set; } -#nullable restore -#else - public global::GitHub.Repos.Item.Item.Branches.Item.Protection.Restrictions.Users.UsersPutRequestBodyMember1 UsersPutRequestBodyUsersPutRequestBodyMember1 { get; set; } -#endif - /// - /// 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.Repos.Item.Item.Branches.Item.Protection.Restrictions.Users.UsersRequestBuilder.UsersPutRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) - { - _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - var mappingValue = parseNode.GetChildNode("")?.GetStringValue(); - var result = new global::GitHub.Repos.Item.Item.Branches.Item.Protection.Restrictions.Users.UsersRequestBuilder.UsersPutRequestBody(); - if("".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) - { - result.UsersPutRequestBodyMember1 = new global::GitHub.Repos.Item.Item.Branches.Item.Protection.Restrictions.Users.UsersPutRequestBodyMember1(); - } - else if("".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) - { - result.UsersPutRequestBodyUsersPutRequestBodyMember1 = new global::GitHub.Repos.Item.Item.Branches.Item.Protection.Restrictions.Users.UsersPutRequestBodyMember1(); - } - else if(parseNode.GetStringValue() is string stringValue) - { - result.String = stringValue; - } - else if(parseNode.GetStringValue() is string usersPutRequestBodyStringValue) - { - result.UsersPutRequestBodyString = usersPutRequestBodyStringValue; - } - return result; - } - /// - /// The deserialization information for the current model - /// - /// A IDictionary<string, Action<IParseNode>> - public virtual IDictionary> GetFieldDeserializers() - { - if(UsersPutRequestBodyMember1 != null) - { - return UsersPutRequestBodyMember1.GetFieldDeserializers(); - } - else if(UsersPutRequestBodyUsersPutRequestBodyMember1 != null) - { - return UsersPutRequestBodyUsersPutRequestBodyMember1.GetFieldDeserializers(); - } - return new Dictionary>(); - } - /// - /// 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)); - if(UsersPutRequestBodyMember1 != null) - { - writer.WriteObjectValue(null, UsersPutRequestBodyMember1); - } - else if(UsersPutRequestBodyUsersPutRequestBodyMember1 != null) - { - writer.WriteObjectValue(null, UsersPutRequestBodyUsersPutRequestBodyMember1); - } - else if(String != null) - { - writer.WriteStringValue(null, String); - } - else if(UsersPutRequestBodyString != null) - { - writer.WriteStringValue(null, UsersPutRequestBodyString); - } - } - } } } #pragma warning restore CS0618 diff --git a/src/GitHub/Repos/Item/Item/CheckRuns/CheckRunsRequestBuilder.cs b/src/GitHub/Repos/Item/Item/CheckRuns/CheckRunsRequestBuilder.cs index 4f0bf909..96b82bd9 100644 --- a/src/GitHub/Repos/Item/Item/CheckRuns/CheckRunsRequestBuilder.cs +++ b/src/GitHub/Repos/Item/Item/CheckRuns/CheckRunsRequestBuilder.cs @@ -144,7 +144,7 @@ public partial class CheckRunsPostRequestBody : IComposedTypeWrapper, IParsable public static global::GitHub.Repos.Item.Item.CheckRuns.CheckRunsRequestBuilder.CheckRunsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - var mappingValue = parseNode.GetChildNode("")?.GetStringValue(); + var mappingValue = parseNode.GetChildNode("status")?.GetStringValue(); var result = new global::GitHub.Repos.Item.Item.CheckRuns.CheckRunsRequestBuilder.CheckRunsPostRequestBody(); if("".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) { diff --git a/src/GitHub/Repos/Item/Item/Contents/Item/WithPathItemRequestBuilder.cs b/src/GitHub/Repos/Item/Item/Contents/Item/WithPathItemRequestBuilder.cs index bb0a3cb5..542718c7 100644 --- a/src/GitHub/Repos/Item/Item/Contents/Item/WithPathItemRequestBuilder.cs +++ b/src/GitHub/Repos/Item/Item/Contents/Item/WithPathItemRequestBuilder.cs @@ -237,17 +237,17 @@ public partial class WithPathGetResponse : IComposedTypeWrapper, IParsable public static global::GitHub.Repos.Item.Item.Contents.Item.WithPathItemRequestBuilder.WithPathGetResponse CreateFromDiscriminatorValue(IParseNode parseNode) { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - var mappingValue = parseNode.GetChildNode("")?.GetStringValue(); + var mappingValue = parseNode.GetChildNode("type")?.GetStringValue(); var result = new global::GitHub.Repos.Item.Item.Contents.Item.WithPathItemRequestBuilder.WithPathGetResponse(); - if("content-file".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + if("file".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) { result.ContentFile = new global::GitHub.Models.ContentFile(); } - else if("content-submodule".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + else if("submodule".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) { result.ContentSubmodule = new global::GitHub.Models.ContentSubmodule(); } - else if("content-symlink".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + else if("symlink".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) { result.ContentSymlink = new global::GitHub.Models.ContentSymlink(); } diff --git a/src/GitHub/kiota-lock.json b/src/GitHub/kiota-lock.json index 7566c2f8..da6d7d33 100644 --- a/src/GitHub/kiota-lock.json +++ b/src/GitHub/kiota-lock.json @@ -1,5 +1,5 @@ { - "descriptionHash": "87602DA6C715B397697428178A8EE09CA95B357EE1DE1C084FF4E93531E88B6A82D97601A66F11B7883ADD0B187F180540DF1A9CA74F5C00998DB56E99965A6A", + "descriptionHash": "0D21ECB2879C7C519B9EDA964AFED6E525716951EE2EE568962BA6342561456BBE0DC9E5BE11F6B42370F71630E11FCAED9A4F6EB342BB0A29C02D9E0403AAF0", "descriptionLocation": "../../../../../schemas/ghec.json", "lockFileVersion": "1.0.0", "kiotaVersion": "1.18.0",