diff --git a/src/GitHub/Models/Authorization.cs b/src/GitHub/Models/Authorization.cs index 1bc95d325..af9d025dd 100644 --- a/src/GitHub/Models/Authorization.cs +++ b/src/GitHub/Models/Authorization.cs @@ -41,7 +41,7 @@ public class Authorization : IAdditionalDataHolder, IParsable public string HashedToken { get; set; } #endif /// The id property - public int? Id { get; set; } + public long? Id { get; set; } /// The installation property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -138,7 +138,7 @@ public virtual IDictionary> 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.CreateFromDiscriminatorValue); } }, {"note", n => { Note = n.GetStringValue(); } }, {"note_url", n => { NoteUrl = n.GetStringValue(); } }, @@ -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("installation", Installation); writer.WriteStringValue("note", Note); writer.WriteStringValue("note_url", NoteUrl); diff --git a/src/GitHub/Models/DependencyGraphSpdxSbom_sbom_packages.cs b/src/GitHub/Models/DependencyGraphSpdxSbom_sbom_packages.cs index 38896f555..9cc74084e 100644 --- a/src/GitHub/Models/DependencyGraphSpdxSbom_sbom_packages.cs +++ b/src/GitHub/Models/DependencyGraphSpdxSbom_sbom_packages.cs @@ -11,6 +11,14 @@ public class DependencyGraphSpdxSbom_sbom_packages : IAdditionalDataHolder, IPar { /// 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 copyright holders of the package, and any dates present with those notices, if available. +#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 /// The location where the package can be downloaded,or NOASSERTION if this has not been determined. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -102,6 +110,7 @@ public virtual IDictionary> GetFieldDeserializers() { return new Dictionary> { + {"copyrightText", n => { CopyrightText = n.GetStringValue(); } }, {"downloadLocation", n => { DownloadLocation = n.GetStringValue(); } }, {"externalRefs", n => { ExternalRefs = n.GetCollectionOfObjectValues(DependencyGraphSpdxSbom_sbom_packages_externalRefs.CreateFromDiscriminatorValue)?.ToList(); } }, {"filesAnalyzed", n => { FilesAnalyzed = n.GetBoolValue(); } }, @@ -120,6 +129,7 @@ public virtual IDictionary> GetFieldDeserializers() public virtual void Serialize(ISerializationWriter writer) { _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("copyrightText", CopyrightText); writer.WriteStringValue("downloadLocation", DownloadLocation); writer.WriteCollectionOfObjectValues("externalRefs", ExternalRefs); writer.WriteBoolValue("filesAnalyzed", FilesAnalyzed); diff --git a/src/GitHub/Models/Deployment.cs b/src/GitHub/Models/Deployment.cs index 9a1ca20c0..274cc29d0 100644 --- a/src/GitHub/Models/Deployment.cs +++ b/src/GitHub/Models/Deployment.cs @@ -39,7 +39,7 @@ public class Deployment : IAdditionalDataHolder, IParsable public string Environment { get; set; } #endif /// Unique identifier of the deployment - public int? Id { get; set; } + public long? Id { get; set; } /// The node_id property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -155,7 +155,7 @@ public virtual IDictionary> GetFieldDeserializers() {"creator", n => { Creator = n.GetObjectValue(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(); } }, @@ -182,7 +182,7 @@ public virtual void Serialize(ISerializationWriter writer) writer.WriteObjectValue("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); diff --git a/src/GitHub/Models/DeploymentStatus.cs b/src/GitHub/Models/DeploymentStatus.cs index 2fb2cb58a..1c9d678ad 100644 --- a/src/GitHub/Models/DeploymentStatus.cs +++ b/src/GitHub/Models/DeploymentStatus.cs @@ -55,7 +55,7 @@ public class DeploymentStatus : IAdditionalDataHolder, IParsable public string EnvironmentUrl { get; set; } #endif /// The id property - public int? Id { get; set; } + public long? Id { get; set; } /// The URL to associate with this status. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -139,7 +139,7 @@ public virtual IDictionary> 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.CreateFromDiscriminatorValue); } }, @@ -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("performed_via_github_app", PerformedViaGithubApp); diff --git a/src/GitHub/Models/OrganizationRole.cs b/src/GitHub/Models/OrganizationRole.cs index 08a2960c9..5d83fc146 100644 --- a/src/GitHub/Models/OrganizationRole.cs +++ b/src/GitHub/Models/OrganizationRole.cs @@ -23,7 +23,7 @@ public class OrganizationRole : IAdditionalDataHolder, IParsable public string Description { get; set; } #endif /// The unique identifier of the role. - public int? Id { get; set; } + public long? Id { get; set; } /// The name of the role. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -77,7 +77,7 @@ public virtual IDictionary> 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.CreateFromDiscriminatorValue); } }, {"permissions", n => { Permissions = n.GetCollectionOfPrimitiveValues()?.ToList(); } }, @@ -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("organization", Organization); writer.WriteCollectionOfPrimitiveValues("permissions", Permissions); diff --git a/src/GitHub/Models/PendingDeployment_environment.cs b/src/GitHub/Models/PendingDeployment_environment.cs index 289249e02..9282bc726 100644 --- a/src/GitHub/Models/PendingDeployment_environment.cs +++ b/src/GitHub/Models/PendingDeployment_environment.cs @@ -20,7 +20,7 @@ public class PendingDeployment_environment : IAdditionalDataHolder, IParsable public string HtmlUrl { get; set; } #endif /// The id of the environment. - public int? Id { get; set; } + public long? Id { get; set; } /// The name of the environment. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -71,7 +71,7 @@ public virtual IDictionary> GetFieldDeserializers() return new Dictionary> { {"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(); } }, @@ -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); diff --git a/src/GitHub/Models/PullRequest.cs b/src/GitHub/Models/PullRequest.cs index f322728d5..513f5de89 100644 --- a/src/GitHub/Models/PullRequest.cs +++ b/src/GitHub/Models/PullRequest.cs @@ -119,7 +119,7 @@ public class PullRequest : IAdditionalDataHolder, IParsable public string HtmlUrl { get; set; } #endif /// The id property - public int? Id { get; set; } + public long? Id { get; set; } /// The issue_url property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -321,7 +321,7 @@ public virtual IDictionary> GetFieldDeserializers() {"draft", n => { Draft = n.GetBoolValue(); } }, {"head", n => { Head = n.GetObjectValue(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.CreateFromDiscriminatorValue)?.ToList(); } }, {"_links", n => { Links = n.GetObjectValue(PullRequest__links.CreateFromDiscriminatorValue); } }, @@ -378,7 +378,7 @@ public virtual void Serialize(ISerializationWriter writer) writer.WriteBoolValue("draft", Draft); writer.WriteObjectValue("head", Head); writer.WriteStringValue("html_url", HtmlUrl); - writer.WriteIntValue("id", Id); + writer.WriteLongValue("id", Id); writer.WriteStringValue("issue_url", IssueUrl); writer.WriteCollectionOfObjectValues("labels", Labels); writer.WriteObjectValue("_links", Links); diff --git a/src/GitHub/Models/PullRequestMinimal.cs b/src/GitHub/Models/PullRequestMinimal.cs index 3dc31150d..2663440dd 100644 --- a/src/GitHub/Models/PullRequestMinimal.cs +++ b/src/GitHub/Models/PullRequestMinimal.cs @@ -28,7 +28,7 @@ public class PullRequestMinimal : IAdditionalDataHolder, IParsable public PullRequestMinimal_head Head { get; set; } #endif /// The id property - public int? Id { get; set; } + public long? Id { get; set; } /// The number property public int? Number { get; set; } /// The url property @@ -66,7 +66,7 @@ public virtual IDictionary> GetFieldDeserializers() { {"base", n => { Base = n.GetObjectValue(PullRequestMinimal_base.CreateFromDiscriminatorValue); } }, {"head", n => { Head = n.GetObjectValue(PullRequestMinimal_head.CreateFromDiscriminatorValue); } }, - {"id", n => { Id = n.GetIntValue(); } }, + {"id", n => { Id = n.GetLongValue(); } }, {"number", n => { Number = n.GetIntValue(); } }, {"url", n => { Url = n.GetStringValue(); } }, }; @@ -80,7 +80,7 @@ public virtual void Serialize(ISerializationWriter writer) _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("base", Base); writer.WriteObjectValue("head", Head); - writer.WriteIntValue("id", Id); + writer.WriteLongValue("id", Id); writer.WriteIntValue("number", Number); writer.WriteStringValue("url", Url); writer.WriteAdditionalData(AdditionalData); diff --git a/src/GitHub/Models/PullRequestMinimal_base_repo.cs b/src/GitHub/Models/PullRequestMinimal_base_repo.cs index 75bdbd58c..02689b7b3 100644 --- a/src/GitHub/Models/PullRequestMinimal_base_repo.cs +++ b/src/GitHub/Models/PullRequestMinimal_base_repo.cs @@ -12,7 +12,7 @@ public class PullRequestMinimal_base_repo : 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 id property - public int? Id { get; set; } + public long? Id { get; set; } /// The name property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -54,7 +54,7 @@ public virtual IDictionary> GetFieldDeserializers() { return new Dictionary> { - {"id", n => { Id = n.GetIntValue(); } }, + {"id", n => { Id = n.GetLongValue(); } }, {"name", n => { Name = n.GetStringValue(); } }, {"url", n => { Url = n.GetStringValue(); } }, }; @@ -66,7 +66,7 @@ public virtual IDictionary> 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); diff --git a/src/GitHub/Models/PullRequestMinimal_head_repo.cs b/src/GitHub/Models/PullRequestMinimal_head_repo.cs index c64e2d9ea..9fb8b8f61 100644 --- a/src/GitHub/Models/PullRequestMinimal_head_repo.cs +++ b/src/GitHub/Models/PullRequestMinimal_head_repo.cs @@ -12,7 +12,7 @@ public class PullRequestMinimal_head_repo : 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 id property - public int? Id { get; set; } + public long? Id { get; set; } /// The name property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -54,7 +54,7 @@ public virtual IDictionary> GetFieldDeserializers() { return new Dictionary> { - {"id", n => { Id = n.GetIntValue(); } }, + {"id", n => { Id = n.GetLongValue(); } }, {"name", n => { Name = n.GetStringValue(); } }, {"url", n => { Url = n.GetStringValue(); } }, }; @@ -66,7 +66,7 @@ public virtual IDictionary> 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); diff --git a/src/GitHub/Models/PullRequestReviewComment.cs b/src/GitHub/Models/PullRequestReviewComment.cs index a0f6e39f6..5e1ebe0a6 100644 --- a/src/GitHub/Models/PullRequestReviewComment.cs +++ b/src/GitHub/Models/PullRequestReviewComment.cs @@ -65,7 +65,7 @@ public class PullRequestReviewComment : IAdditionalDataHolder, IParsable public string HtmlUrl { get; set; } #endif /// The ID of the pull request review comment. - public int? Id { get; set; } + public long? Id { get; set; } /// The comment ID to reply to. public int? InReplyToId { get; set; } /// The line of the blob to which the comment applies. The last line of the range for a multi-line comment @@ -111,7 +111,7 @@ public class PullRequestReviewComment : IAdditionalDataHolder, IParsable /// The line index in the diff to which the comment applies. This field is deprecated; use `line` instead. public int? Position { get; set; } /// The ID of the pull request review to which the comment belongs. - public int? PullRequestReviewId { get; set; } + public long? PullRequestReviewId { get; set; } /// URL for the pull request that the review comment belongs to. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -189,7 +189,7 @@ public virtual IDictionary> GetFieldDeserializers() {"created_at", n => { CreatedAt = n.GetDateTimeOffsetValue(); } }, {"diff_hunk", n => { DiffHunk = n.GetStringValue(); } }, {"html_url", n => { HtmlUrl = n.GetStringValue(); } }, - {"id", n => { Id = n.GetIntValue(); } }, + {"id", n => { Id = n.GetLongValue(); } }, {"in_reply_to_id", n => { InReplyToId = n.GetIntValue(); } }, {"line", n => { Line = n.GetIntValue(); } }, {"_links", n => { Links = n.GetObjectValue(PullRequestReviewComment__links.CreateFromDiscriminatorValue); } }, @@ -200,7 +200,7 @@ public virtual IDictionary> GetFieldDeserializers() {"original_start_line", n => { OriginalStartLine = n.GetIntValue(); } }, {"path", n => { Path = n.GetStringValue(); } }, {"position", n => { Position = n.GetIntValue(); } }, - {"pull_request_review_id", n => { PullRequestReviewId = n.GetIntValue(); } }, + {"pull_request_review_id", n => { PullRequestReviewId = n.GetLongValue(); } }, {"pull_request_url", n => { PullRequestUrl = n.GetStringValue(); } }, {"reactions", n => { Reactions = n.GetObjectValue(ReactionRollup.CreateFromDiscriminatorValue); } }, {"side", n => { Side = n.GetEnumValue(); } }, @@ -227,7 +227,7 @@ public virtual void Serialize(ISerializationWriter writer) writer.WriteDateTimeOffsetValue("created_at", CreatedAt); writer.WriteStringValue("diff_hunk", DiffHunk); writer.WriteStringValue("html_url", HtmlUrl); - writer.WriteIntValue("id", Id); + writer.WriteLongValue("id", Id); writer.WriteIntValue("in_reply_to_id", InReplyToId); writer.WriteIntValue("line", Line); writer.WriteObjectValue("_links", Links); @@ -238,7 +238,7 @@ public virtual void Serialize(ISerializationWriter writer) writer.WriteIntValue("original_start_line", OriginalStartLine); writer.WriteStringValue("path", Path); writer.WriteIntValue("position", Position); - writer.WriteIntValue("pull_request_review_id", PullRequestReviewId); + writer.WriteLongValue("pull_request_review_id", PullRequestReviewId); writer.WriteStringValue("pull_request_url", PullRequestUrl); writer.WriteObjectValue("reactions", Reactions); writer.WriteEnumValue("side", Side); diff --git a/src/GitHub/Models/PullRequestSimple.cs b/src/GitHub/Models/PullRequestSimple.cs index dd4cfbf69..783e7d55d 100644 --- a/src/GitHub/Models/PullRequestSimple.cs +++ b/src/GitHub/Models/PullRequestSimple.cs @@ -109,7 +109,7 @@ public class PullRequestSimple : IAdditionalDataHolder, IParsable public string HtmlUrl { get; set; } #endif /// The id property - public int? Id { get; set; } + public long? Id { get; set; } /// The issue_url property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -286,7 +286,7 @@ public virtual IDictionary> GetFieldDeserializers() {"draft", n => { Draft = n.GetBoolValue(); } }, {"head", n => { Head = n.GetObjectValue(PullRequestSimple_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(PullRequestSimple_labels.CreateFromDiscriminatorValue)?.ToList(); } }, {"_links", n => { Links = n.GetObjectValue(PullRequestSimple__links.CreateFromDiscriminatorValue); } }, @@ -331,7 +331,7 @@ public virtual void Serialize(ISerializationWriter writer) writer.WriteBoolValue("draft", Draft); writer.WriteObjectValue("head", Head); writer.WriteStringValue("html_url", HtmlUrl); - writer.WriteIntValue("id", Id); + writer.WriteLongValue("id", Id); writer.WriteStringValue("issue_url", IssueUrl); writer.WriteCollectionOfObjectValues("labels", Labels); writer.WriteObjectValue("_links", Links); diff --git a/src/GitHub/Models/ReviewComment.cs b/src/GitHub/Models/ReviewComment.cs index 59b8e206d..ecba4797b 100644 --- a/src/GitHub/Models/ReviewComment.cs +++ b/src/GitHub/Models/ReviewComment.cs @@ -65,7 +65,7 @@ public class ReviewComment : IAdditionalDataHolder, IParsable public string HtmlUrl { get; set; } #endif /// The id property - public int? Id { get; set; } + public long? Id { get; set; } /// The in_reply_to_id property public int? InReplyToId { get; set; } /// The line of the blob to which the comment applies. The last line of the range for a multi-line comment @@ -111,7 +111,7 @@ public class ReviewComment : IAdditionalDataHolder, IParsable /// The position property public int? Position { get; set; } /// The pull_request_review_id property - public int? PullRequestReviewId { get; set; } + public long? PullRequestReviewId { get; set; } /// The pull_request_url property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -187,7 +187,7 @@ public virtual IDictionary> GetFieldDeserializers() {"created_at", n => { CreatedAt = n.GetDateTimeOffsetValue(); } }, {"diff_hunk", n => { DiffHunk = n.GetStringValue(); } }, {"html_url", n => { HtmlUrl = n.GetStringValue(); } }, - {"id", n => { Id = n.GetIntValue(); } }, + {"id", n => { Id = n.GetLongValue(); } }, {"in_reply_to_id", n => { InReplyToId = n.GetIntValue(); } }, {"line", n => { Line = n.GetIntValue(); } }, {"_links", n => { Links = n.GetObjectValue(ReviewComment__links.CreateFromDiscriminatorValue); } }, @@ -198,7 +198,7 @@ public virtual IDictionary> GetFieldDeserializers() {"original_start_line", n => { OriginalStartLine = n.GetIntValue(); } }, {"path", n => { Path = n.GetStringValue(); } }, {"position", n => { Position = n.GetIntValue(); } }, - {"pull_request_review_id", n => { PullRequestReviewId = n.GetIntValue(); } }, + {"pull_request_review_id", n => { PullRequestReviewId = n.GetLongValue(); } }, {"pull_request_url", n => { PullRequestUrl = n.GetStringValue(); } }, {"reactions", n => { Reactions = n.GetObjectValue(ReactionRollup.CreateFromDiscriminatorValue); } }, {"side", n => { Side = n.GetEnumValue(); } }, @@ -224,7 +224,7 @@ public virtual void Serialize(ISerializationWriter writer) writer.WriteDateTimeOffsetValue("created_at", CreatedAt); writer.WriteStringValue("diff_hunk", DiffHunk); writer.WriteStringValue("html_url", HtmlUrl); - writer.WriteIntValue("id", Id); + writer.WriteLongValue("id", Id); writer.WriteIntValue("in_reply_to_id", InReplyToId); writer.WriteIntValue("line", Line); writer.WriteObjectValue("_links", Links); @@ -235,7 +235,7 @@ public virtual void Serialize(ISerializationWriter writer) writer.WriteIntValue("original_start_line", OriginalStartLine); writer.WriteStringValue("path", Path); writer.WriteIntValue("position", Position); - writer.WriteIntValue("pull_request_review_id", PullRequestReviewId); + writer.WriteLongValue("pull_request_review_id", PullRequestReviewId); writer.WriteStringValue("pull_request_url", PullRequestUrl); writer.WriteObjectValue("reactions", Reactions); writer.WriteEnumValue("side", Side); diff --git a/src/GitHub/User/Item/WithAccount_ItemRequestBuilder.cs b/src/GitHub/User/Item/WithAccount_ItemRequestBuilder.cs new file mode 100644 index 000000000..e28540804 --- /dev/null +++ b/src/GitHub/User/Item/WithAccount_ItemRequestBuilder.cs @@ -0,0 +1,160 @@ +// +using GitHub.Models; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace GitHub.User.Item { + /// + /// Builds and executes requests for operations under \user\{account_id} + /// + public class WithAccount_ItemRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithAccount_ItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/user/{account_id}", pathParameters) + { + } + /// + /// Instantiates a new and sets the default values. + /// + /// The raw URL to use for the request builder. + /// The request adapter to use to execute the requests. + public WithAccount_ItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/user/{account_id}", rawUrl) + { + } + /// + /// Provides publicly available information about someone with a GitHub account. This method takes their durable user `ID` instead of their `login`, which can change over time.The `email` key in the following response is the publicly visible email address from your GitHub [profile page](https://github.com/settings/profile). When setting up your profile, you can select a primary email address to be “public” which provides an email entry for this endpoint. If you do not set a public email address for `email`, then it will have a value of `null`. You only see publicly visible email addresses when authenticated with GitHub. For more information, see [Authentication](https://docs.github.com/rest/guides/getting-started-with-the-rest-api#authentication).The Emails API enables you to list all of your email addresses, and toggle a primary email to be visible publicly. For more information, see "[Emails API](https://docs.github.com/rest/users/emails)". + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task GetAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToGetRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + {"404", BasicError.CreateFromDiscriminatorValue}, + }; + return await RequestAdapter.SendAsync(requestInfo, WithAccount_GetResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Provides publicly available information about someone with a GitHub account. This method takes their durable user `ID` instead of their `login`, which can change over time.The `email` key in the following response is the publicly visible email address from your GitHub [profile page](https://github.com/settings/profile). When setting up your profile, you can select a primary email address to be “public” which provides an email entry for this endpoint. If you do not set a public email address for `email`, then it will have a value of `null`. You only see publicly visible email addresses when authenticated with GitHub. For more information, see [Authentication](https://docs.github.com/rest/guides/getting-started-with-the-rest-api#authentication).The Emails API enables you to list all of your email addresses, and toggle a primary email to be visible publicly. For more information, see "[Emails API](https://docs.github.com/rest/users/emails)". + /// + /// A + /// 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 ToGetRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToGetRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored. + /// + /// A + /// The raw URL to use for the request builder. + public WithAccount_ItemRequestBuilder WithUrl(string rawUrl) + { + return new WithAccount_ItemRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Composed type wrapper for classes , + /// + public class WithAccount_GetResponse : IComposedTypeWrapper, IParsable + { + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public GitHub.Models.PrivateUser? PrivateUser { get; set; } +#nullable restore +#else + public GitHub.Models.PrivateUser PrivateUser { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public GitHub.Models.PublicUser? PublicUser { get; set; } +#nullable restore +#else + public GitHub.Models.PublicUser PublicUser { 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 WithAccount_GetResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + var mappingValue = parseNode.GetChildNode("")?.GetStringValue(); + var result = new WithAccount_GetResponse(); + if("private-user".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.PrivateUser = new GitHub.Models.PrivateUser(); + } + else if("public-user".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.PublicUser = new GitHub.Models.PublicUser(); + } + return result; + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + if(PrivateUser != null) + { + return PrivateUser.GetFieldDeserializers(); + } + else if(PublicUser != null) + { + return PublicUser.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(PrivateUser != null) + { + writer.WriteObjectValue(null, PrivateUser); + } + else if(PublicUser != null) + { + writer.WriteObjectValue(null, PublicUser); + } + } + } + } +} diff --git a/src/GitHub/User/UserRequestBuilder.cs b/src/GitHub/User/UserRequestBuilder.cs index dcaee8e7f..4e0b7b546 100644 --- a/src/GitHub/User/UserRequestBuilder.cs +++ b/src/GitHub/User/UserRequestBuilder.cs @@ -11,6 +11,7 @@ using GitHub.User.Installations; using GitHub.User.InteractionLimits; using GitHub.User.Issues; +using GitHub.User.Item; using GitHub.User.Keys; using GitHub.User.Marketplace_purchases; using GitHub.User.Memberships; @@ -170,6 +171,18 @@ public TeamsRequestBuilder Teams { get => new TeamsRequestBuilder(PathParameters, RequestAdapter); } + /// Gets an item from the GitHub.user.item collection + /// account_id parameter + /// A + public WithAccount_ItemRequestBuilder this[int position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("account_id", position); + return new WithAccount_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } /// /// Instantiates a new and sets the default values. /// diff --git a/src/GitHub/kiota-lock.json b/src/GitHub/kiota-lock.json index 9144dad95..25243eda0 100644 --- a/src/GitHub/kiota-lock.json +++ b/src/GitHub/kiota-lock.json @@ -1,6 +1,6 @@ { - "descriptionHash": "F13E255D15C0EF7C616ADC06A669BC13781167E50DFF53465D493375B6422082C278261BB9FD607F6A10391CA7F41A49408F8BDE75181279058F5CA137F1883B", - "descriptionLocation": "../../../../schemas/downloaded.json", + "descriptionHash": "E4E2AABED4BD59401902818C72E41CA2F0687B3623E90C31913C14D9C4EF622958C3E7803B45FFDD22856FE8BE14B2FB3FB3AAF72B4F479A9809E2EEF45DD55C", + "descriptionLocation": "../../../../../schemas/api.github.com.json", "lockFileVersion": "1.0.0", "kiotaVersion": "1.14.0", "clientClassName": "GitHubClient",