Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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 #27

Merged
merged 1 commit into from
Oct 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions src/GitHub/Models/CopilotSeatDetails.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ namespace GitHub.Models
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.18.0")]
public partial class CopilotSeatDetails : IParsable
{
/// <summary>The assignee that has been granted access to GitHub Copilot.</summary>
/// <summary>A GitHub user.</summary>
#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
/// <summary>The team through which the assignee is granted access to GitHub Copilot, if applicable.</summary>
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
Expand All @@ -42,13 +42,13 @@ public partial class CopilotSeatDetails : IParsable
#else
public string LastActivityEditor { get; set; }
#endif
/// <summary>The organization to which this seat belongs.</summary>
/// <summary>A GitHub organization.</summary>
#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
/// <summary>The pending cancellation date for the seat, in `YYYY-MM-DD` format. This will be null unless the assignee&apos;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&apos;s next billing cycle.</summary>
public Date? PendingCancellationDate { get; set; }
Expand All @@ -72,12 +72,12 @@ public virtual IDictionary<string, Action<IParseNode>> GetFieldDeserializers()
{
return new Dictionary<string, Action<IParseNode>>
{
{ "assignee", n => { Assignee = n.GetObjectValue<global::GitHub.Models.CopilotSeatDetails_assignee>(global::GitHub.Models.CopilotSeatDetails_assignee.CreateFromDiscriminatorValue); } },
{ "assignee", n => { Assignee = n.GetObjectValue<global::GitHub.Models.SimpleUser>(global::GitHub.Models.SimpleUser.CreateFromDiscriminatorValue); } },
{ "assigning_team", n => { AssigningTeam = n.GetObjectValue<global::GitHub.Models.CopilotSeatDetails.CopilotSeatDetails_assigning_team>(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>(global::GitHub.Models.CopilotSeatDetails_organization.CreateFromDiscriminatorValue); } },
{ "organization", n => { Organization = n.GetObjectValue<global::GitHub.Models.NullableOrganizationSimple>(global::GitHub.Models.NullableOrganizationSimple.CreateFromDiscriminatorValue); } },
{ "pending_cancellation_date", n => { PendingCancellationDate = n.GetDateValue(); } },
{ "updated_at", n => { UpdatedAt = n.GetDateTimeOffsetValue(); } },
};
Expand All @@ -89,12 +89,12 @@ public virtual IDictionary<string, Action<IParseNode>> GetFieldDeserializers()
public virtual void Serialize(ISerializationWriter writer)
{
_ = writer ?? throw new ArgumentNullException(nameof(writer));
writer.WriteObjectValue<global::GitHub.Models.CopilotSeatDetails_assignee>("assignee", Assignee);
writer.WriteObjectValue<global::GitHub.Models.SimpleUser>("assignee", Assignee);
writer.WriteObjectValue<global::GitHub.Models.CopilotSeatDetails.CopilotSeatDetails_assigning_team>("assigning_team", AssigningTeam);
writer.WriteDateTimeOffsetValue("created_at", CreatedAt);
writer.WriteDateTimeOffsetValue("last_activity_at", LastActivityAt);
writer.WriteStringValue("last_activity_editor", LastActivityEditor);
writer.WriteObjectValue<global::GitHub.Models.CopilotSeatDetails_organization>("organization", Organization);
writer.WriteObjectValue<global::GitHub.Models.NullableOrganizationSimple>("organization", Organization);
writer.WriteDateValue("pending_cancellation_date", PendingCancellationDate);
writer.WriteDateTimeOffsetValue("updated_at", UpdatedAt);
}
Expand Down
56 changes: 0 additions & 56 deletions src/GitHub/Models/CopilotSeatDetails_assignee.cs

This file was deleted.

56 changes: 0 additions & 56 deletions src/GitHub/Models/CopilotSeatDetails_organization.cs

This file was deleted.

170 changes: 170 additions & 0 deletions src/GitHub/Models/NullableOrganizationSimple.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,170 @@
// <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>
/// A GitHub organization.
/// </summary>
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.18.0")]
public partial class NullableOrganizationSimple : 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 avatar_url property</summary>
#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
/// <summary>The description property</summary>
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
public string? Description { get; set; }
#nullable restore
#else
public string Description { get; set; }
#endif
/// <summary>The events_url property</summary>
#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
/// <summary>The hooks_url property</summary>
#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
/// <summary>The id property</summary>
public int? Id { get; set; }
/// <summary>The issues_url property</summary>
#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
/// <summary>The login property</summary>
#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
/// <summary>The members_url property</summary>
#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
/// <summary>The node_id property</summary>
#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
/// <summary>The public_members_url property</summary>
#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
/// <summary>The repos_url property</summary>
#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
/// <summary>The url property</summary>
#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
/// <summary>
/// Instantiates a new <see cref="global::GitHub.Models.NullableOrganizationSimple"/> and sets the default values.
/// </summary>
public NullableOrganizationSimple()
{
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.NullableOrganizationSimple"/></returns>
/// <param name="parseNode">The parse node to use to read the discriminator value and create the object</param>
public static global::GitHub.Models.NullableOrganizationSimple CreateFromDiscriminatorValue(IParseNode parseNode)
{
_ = parseNode ?? throw new ArgumentNullException(nameof(parseNode));
return new global::GitHub.Models.NullableOrganizationSimple();
}
/// <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>>
{
{ "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(); } },
};
}
/// <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.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
Loading
Loading