Skip to content

Commit

Permalink
feat: first batch of int --> long fixes, user request builder (#92)
Browse files Browse the repository at this point in the history
* New updates to generated code

* New updates to generated code

* New updates to generated code

---------

Co-authored-by: Octokit Bot <[email protected]>
  • Loading branch information
octokitbot and Octokit Bot authored Jun 28, 2024
1 parent 2dddf9f commit 190cc1c
Show file tree
Hide file tree
Showing 16 changed files with 227 additions and 44 deletions.
6 changes: 3 additions & 3 deletions src/GitHub/Models/Authorization.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public class Authorization : IAdditionalDataHolder, IParsable
public string HashedToken { get; set; }
#endif
/// <summary>The id property</summary>
public int? Id { get; set; }
public long? Id { get; set; }
/// <summary>The installation property</summary>
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
Expand Down Expand Up @@ -138,7 +138,7 @@ public virtual IDictionary<string, Action<IParseNode>> GetFieldDeserializers()
{"expires_at", n => { ExpiresAt = n.GetDateTimeOffsetValue(); } },
{"fingerprint", n => { Fingerprint = n.GetStringValue(); } },
{"hashed_token", n => { HashedToken = n.GetStringValue(); } },
{"id", n => { Id = n.GetIntValue(); } },
{"id", n => { Id = n.GetLongValue(); } },
{"installation", n => { Installation = n.GetObjectValue<NullableScopedInstallation>(NullableScopedInstallation.CreateFromDiscriminatorValue); } },
{"note", n => { Note = n.GetStringValue(); } },
{"note_url", n => { NoteUrl = n.GetStringValue(); } },
Expand All @@ -162,7 +162,7 @@ public virtual void Serialize(ISerializationWriter writer)
writer.WriteDateTimeOffsetValue("expires_at", ExpiresAt);
writer.WriteStringValue("fingerprint", Fingerprint);
writer.WriteStringValue("hashed_token", HashedToken);
writer.WriteIntValue("id", Id);
writer.WriteLongValue("id", Id);
writer.WriteObjectValue<NullableScopedInstallation>("installation", Installation);
writer.WriteStringValue("note", Note);
writer.WriteStringValue("note_url", NoteUrl);
Expand Down
10 changes: 10 additions & 0 deletions src/GitHub/Models/DependencyGraphSpdxSbom_sbom_packages.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,14 @@ public class DependencyGraphSpdxSbom_sbom_packages : IAdditionalDataHolder, IPar
{
/// <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 copyright holders of the package, and any dates present with those notices, if available.</summary>
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
public string? CopyrightText { get; set; }
#nullable restore
#else
public string CopyrightText { get; set; }
#endif
/// <summary>The location where the package can be downloaded,or NOASSERTION if this has not been determined.</summary>
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
Expand Down Expand Up @@ -102,6 +110,7 @@ public virtual IDictionary<string, Action<IParseNode>> GetFieldDeserializers()
{
return new Dictionary<string, Action<IParseNode>>
{
{"copyrightText", n => { CopyrightText = n.GetStringValue(); } },
{"downloadLocation", n => { DownloadLocation = n.GetStringValue(); } },
{"externalRefs", n => { ExternalRefs = n.GetCollectionOfObjectValues<DependencyGraphSpdxSbom_sbom_packages_externalRefs>(DependencyGraphSpdxSbom_sbom_packages_externalRefs.CreateFromDiscriminatorValue)?.ToList(); } },
{"filesAnalyzed", n => { FilesAnalyzed = n.GetBoolValue(); } },
Expand All @@ -120,6 +129,7 @@ public virtual IDictionary<string, Action<IParseNode>> GetFieldDeserializers()
public virtual void Serialize(ISerializationWriter writer)
{
_ = writer ?? throw new ArgumentNullException(nameof(writer));
writer.WriteStringValue("copyrightText", CopyrightText);
writer.WriteStringValue("downloadLocation", DownloadLocation);
writer.WriteCollectionOfObjectValues<DependencyGraphSpdxSbom_sbom_packages_externalRefs>("externalRefs", ExternalRefs);
writer.WriteBoolValue("filesAnalyzed", FilesAnalyzed);
Expand Down
6 changes: 3 additions & 3 deletions src/GitHub/Models/Deployment.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public class Deployment : IAdditionalDataHolder, IParsable
public string Environment { get; set; }
#endif
/// <summary>Unique identifier of the deployment</summary>
public int? Id { get; set; }
public long? Id { get; set; }
/// <summary>The node_id property</summary>
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
Expand Down Expand Up @@ -155,7 +155,7 @@ public virtual IDictionary<string, Action<IParseNode>> GetFieldDeserializers()
{"creator", n => { Creator = n.GetObjectValue<NullableSimpleUser>(NullableSimpleUser.CreateFromDiscriminatorValue); } },
{"description", n => { Description = n.GetStringValue(); } },
{"environment", n => { Environment = n.GetStringValue(); } },
{"id", n => { Id = n.GetIntValue(); } },
{"id", n => { Id = n.GetLongValue(); } },
{"node_id", n => { NodeId = n.GetStringValue(); } },
{"original_environment", n => { OriginalEnvironment = n.GetStringValue(); } },
{"payload", n => { Payload = n.GetStringValue(); } },
Expand All @@ -182,7 +182,7 @@ public virtual void Serialize(ISerializationWriter writer)
writer.WriteObjectValue<NullableSimpleUser>("creator", Creator);
writer.WriteStringValue("description", Description);
writer.WriteStringValue("environment", Environment);
writer.WriteIntValue("id", Id);
writer.WriteLongValue("id", Id);
writer.WriteStringValue("node_id", NodeId);
writer.WriteStringValue("original_environment", OriginalEnvironment);
writer.WriteStringValue("payload", Payload);
Expand Down
6 changes: 3 additions & 3 deletions src/GitHub/Models/DeploymentStatus.cs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public class DeploymentStatus : IAdditionalDataHolder, IParsable
public string EnvironmentUrl { get; set; }
#endif
/// <summary>The id property</summary>
public int? Id { get; set; }
public long? Id { get; set; }
/// <summary>The URL to associate with this status.</summary>
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
Expand Down Expand Up @@ -139,7 +139,7 @@ public virtual IDictionary<string, Action<IParseNode>> GetFieldDeserializers()
{"description", n => { Description = n.GetStringValue(); } },
{"environment", n => { Environment = n.GetStringValue(); } },
{"environment_url", n => { EnvironmentUrl = n.GetStringValue(); } },
{"id", n => { Id = n.GetIntValue(); } },
{"id", n => { Id = n.GetLongValue(); } },
{"log_url", n => { LogUrl = n.GetStringValue(); } },
{"node_id", n => { NodeId = n.GetStringValue(); } },
{"performed_via_github_app", n => { PerformedViaGithubApp = n.GetObjectValue<NullableIntegration>(NullableIntegration.CreateFromDiscriminatorValue); } },
Expand All @@ -163,7 +163,7 @@ public virtual void Serialize(ISerializationWriter writer)
writer.WriteStringValue("description", Description);
writer.WriteStringValue("environment", Environment);
writer.WriteStringValue("environment_url", EnvironmentUrl);
writer.WriteIntValue("id", Id);
writer.WriteLongValue("id", Id);
writer.WriteStringValue("log_url", LogUrl);
writer.WriteStringValue("node_id", NodeId);
writer.WriteObjectValue<NullableIntegration>("performed_via_github_app", PerformedViaGithubApp);
Expand Down
6 changes: 3 additions & 3 deletions src/GitHub/Models/OrganizationRole.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public class OrganizationRole : IAdditionalDataHolder, IParsable
public string Description { get; set; }
#endif
/// <summary>The unique identifier of the role.</summary>
public int? Id { get; set; }
public long? Id { get; set; }
/// <summary>The name of the role.</summary>
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
Expand Down Expand Up @@ -77,7 +77,7 @@ public virtual IDictionary<string, Action<IParseNode>> GetFieldDeserializers()
{
{"created_at", n => { CreatedAt = n.GetDateTimeOffsetValue(); } },
{"description", n => { Description = n.GetStringValue(); } },
{"id", n => { Id = n.GetIntValue(); } },
{"id", n => { Id = n.GetLongValue(); } },
{"name", n => { Name = n.GetStringValue(); } },
{"organization", n => { Organization = n.GetObjectValue<NullableSimpleUser>(NullableSimpleUser.CreateFromDiscriminatorValue); } },
{"permissions", n => { Permissions = n.GetCollectionOfPrimitiveValues<string>()?.ToList(); } },
Expand All @@ -93,7 +93,7 @@ public virtual void Serialize(ISerializationWriter writer)
_ = writer ?? throw new ArgumentNullException(nameof(writer));
writer.WriteDateTimeOffsetValue("created_at", CreatedAt);
writer.WriteStringValue("description", Description);
writer.WriteIntValue("id", Id);
writer.WriteLongValue("id", Id);
writer.WriteStringValue("name", Name);
writer.WriteObjectValue<NullableSimpleUser>("organization", Organization);
writer.WriteCollectionOfPrimitiveValues<string>("permissions", Permissions);
Expand Down
6 changes: 3 additions & 3 deletions src/GitHub/Models/PendingDeployment_environment.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public class PendingDeployment_environment : IAdditionalDataHolder, IParsable
public string HtmlUrl { get; set; }
#endif
/// <summary>The id of the environment.</summary>
public int? Id { get; set; }
public long? Id { get; set; }
/// <summary>The name of the environment.</summary>
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
Expand Down Expand Up @@ -71,7 +71,7 @@ public virtual IDictionary<string, Action<IParseNode>> GetFieldDeserializers()
return new Dictionary<string, Action<IParseNode>>
{
{"html_url", n => { HtmlUrl = n.GetStringValue(); } },
{"id", n => { Id = n.GetIntValue(); } },
{"id", n => { Id = n.GetLongValue(); } },
{"name", n => { Name = n.GetStringValue(); } },
{"node_id", n => { NodeId = n.GetStringValue(); } },
{"url", n => { Url = n.GetStringValue(); } },
Expand All @@ -85,7 +85,7 @@ public virtual void Serialize(ISerializationWriter writer)
{
_ = writer ?? throw new ArgumentNullException(nameof(writer));
writer.WriteStringValue("html_url", HtmlUrl);
writer.WriteIntValue("id", Id);
writer.WriteLongValue("id", Id);
writer.WriteStringValue("name", Name);
writer.WriteStringValue("node_id", NodeId);
writer.WriteStringValue("url", Url);
Expand Down
6 changes: 3 additions & 3 deletions src/GitHub/Models/PullRequest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ public class PullRequest : IAdditionalDataHolder, IParsable
public string HtmlUrl { get; set; }
#endif
/// <summary>The id property</summary>
public int? Id { get; set; }
public long? Id { get; set; }
/// <summary>The issue_url property</summary>
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
Expand Down Expand Up @@ -321,7 +321,7 @@ public virtual IDictionary<string, Action<IParseNode>> GetFieldDeserializers()
{"draft", n => { Draft = n.GetBoolValue(); } },
{"head", n => { Head = n.GetObjectValue<PullRequest_head>(PullRequest_head.CreateFromDiscriminatorValue); } },
{"html_url", n => { HtmlUrl = n.GetStringValue(); } },
{"id", n => { Id = n.GetIntValue(); } },
{"id", n => { Id = n.GetLongValue(); } },
{"issue_url", n => { IssueUrl = n.GetStringValue(); } },
{"labels", n => { Labels = n.GetCollectionOfObjectValues<PullRequest_labels>(PullRequest_labels.CreateFromDiscriminatorValue)?.ToList(); } },
{"_links", n => { Links = n.GetObjectValue<PullRequest__links>(PullRequest__links.CreateFromDiscriminatorValue); } },
Expand Down Expand Up @@ -378,7 +378,7 @@ public virtual void Serialize(ISerializationWriter writer)
writer.WriteBoolValue("draft", Draft);
writer.WriteObjectValue<PullRequest_head>("head", Head);
writer.WriteStringValue("html_url", HtmlUrl);
writer.WriteIntValue("id", Id);
writer.WriteLongValue("id", Id);
writer.WriteStringValue("issue_url", IssueUrl);
writer.WriteCollectionOfObjectValues<PullRequest_labels>("labels", Labels);
writer.WriteObjectValue<PullRequest__links>("_links", Links);
Expand Down
6 changes: 3 additions & 3 deletions src/GitHub/Models/PullRequestMinimal.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public class PullRequestMinimal : IAdditionalDataHolder, IParsable
public PullRequestMinimal_head Head { get; set; }
#endif
/// <summary>The id property</summary>
public int? Id { get; set; }
public long? Id { get; set; }
/// <summary>The number property</summary>
public int? Number { get; set; }
/// <summary>The url property</summary>
Expand Down Expand Up @@ -66,7 +66,7 @@ public virtual IDictionary<string, Action<IParseNode>> GetFieldDeserializers()
{
{"base", n => { Base = n.GetObjectValue<PullRequestMinimal_base>(PullRequestMinimal_base.CreateFromDiscriminatorValue); } },
{"head", n => { Head = n.GetObjectValue<PullRequestMinimal_head>(PullRequestMinimal_head.CreateFromDiscriminatorValue); } },
{"id", n => { Id = n.GetIntValue(); } },
{"id", n => { Id = n.GetLongValue(); } },
{"number", n => { Number = n.GetIntValue(); } },
{"url", n => { Url = n.GetStringValue(); } },
};
Expand All @@ -80,7 +80,7 @@ public virtual void Serialize(ISerializationWriter writer)
_ = writer ?? throw new ArgumentNullException(nameof(writer));
writer.WriteObjectValue<PullRequestMinimal_base>("base", Base);
writer.WriteObjectValue<PullRequestMinimal_head>("head", Head);
writer.WriteIntValue("id", Id);
writer.WriteLongValue("id", Id);
writer.WriteIntValue("number", Number);
writer.WriteStringValue("url", Url);
writer.WriteAdditionalData(AdditionalData);
Expand Down
6 changes: 3 additions & 3 deletions src/GitHub/Models/PullRequestMinimal_base_repo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public class PullRequestMinimal_base_repo : 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 id property</summary>
public int? Id { get; set; }
public long? Id { get; set; }
/// <summary>The name property</summary>
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
Expand Down Expand Up @@ -54,7 +54,7 @@ public virtual IDictionary<string, Action<IParseNode>> GetFieldDeserializers()
{
return new Dictionary<string, Action<IParseNode>>
{
{"id", n => { Id = n.GetIntValue(); } },
{"id", n => { Id = n.GetLongValue(); } },
{"name", n => { Name = n.GetStringValue(); } },
{"url", n => { Url = n.GetStringValue(); } },
};
Expand All @@ -66,7 +66,7 @@ public virtual IDictionary<string, Action<IParseNode>> GetFieldDeserializers()
public virtual void Serialize(ISerializationWriter writer)
{
_ = writer ?? throw new ArgumentNullException(nameof(writer));
writer.WriteIntValue("id", Id);
writer.WriteLongValue("id", Id);
writer.WriteStringValue("name", Name);
writer.WriteStringValue("url", Url);
writer.WriteAdditionalData(AdditionalData);
Expand Down
6 changes: 3 additions & 3 deletions src/GitHub/Models/PullRequestMinimal_head_repo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public class PullRequestMinimal_head_repo : 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 id property</summary>
public int? Id { get; set; }
public long? Id { get; set; }
/// <summary>The name property</summary>
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
#nullable enable
Expand Down Expand Up @@ -54,7 +54,7 @@ public virtual IDictionary<string, Action<IParseNode>> GetFieldDeserializers()
{
return new Dictionary<string, Action<IParseNode>>
{
{"id", n => { Id = n.GetIntValue(); } },
{"id", n => { Id = n.GetLongValue(); } },
{"name", n => { Name = n.GetStringValue(); } },
{"url", n => { Url = n.GetStringValue(); } },
};
Expand All @@ -66,7 +66,7 @@ public virtual IDictionary<string, Action<IParseNode>> GetFieldDeserializers()
public virtual void Serialize(ISerializationWriter writer)
{
_ = writer ?? throw new ArgumentNullException(nameof(writer));
writer.WriteIntValue("id", Id);
writer.WriteLongValue("id", Id);
writer.WriteStringValue("name", Name);
writer.WriteStringValue("url", Url);
writer.WriteAdditionalData(AdditionalData);
Expand Down
Loading

0 comments on commit 190cc1c

Please sign in to comment.