diff --git a/src/GitHub/App/Installations/Item/Access_tokens/Access_tokensRequestBuilder.cs b/src/GitHub/App/Installations/Item/Access_tokens/Access_tokensRequestBuilder.cs index 9320d569..87af7033 100644 --- a/src/GitHub/App/Installations/Item/Access_tokens/Access_tokensRequestBuilder.cs +++ b/src/GitHub/App/Installations/Item/Access_tokens/Access_tokensRequestBuilder.cs @@ -34,7 +34,7 @@ public Access_tokensRequestBuilder(string rawUrl, IRequestAdapter requestAdapter { } /// - /// Creates an installation access token that enables a GitHub App to make authenticated API requests for the app's installation on an organization or individual account. Installation tokens expire one hour from the time you create them. Using an expired token produces a status code of `401 - Unauthorized`, and requires creating a new installation token. By default the installation token has access to all repositories that the installation can access.Optionally, you can use the `repositories` or `repository_ids` body parameters to specify individual repositories that the installation access token can access. If you don't use `repositories` or `repository_ids` to grant access to specific repositories, the installation access token will have access to all repositories that the installation was granted access to. The installation access token cannot be granted access to repositories that the installation was not granted access to. Up to 500 repositories can be listed in this manner.Optionally, use the `permissions` body parameter to specify the permissions that the installation access token should have. If `permissions` is not specified, the installation access token will have all of the permissions that were granted to the app. The installation access token cannot be granted permissions that the app was not granted.When using the repository or permission parameters to reduce the access of the token, the complexity of the token is increased due to both the number of permissions in the request and the number of repositories the token will have access to. If the complexity is too large, the token will fail to be issued. If this occurs, the error message will indicate the maximum number of repositories that should be requested. For the average application requesting 8 permissions, this limit is around 5000 repositories. With fewer permissions requested, more repositories are supported.You must use a [JWT](https://docs.github.com/enterprise-cloud@latest//apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + /// Creates an installation access token that enables a GitHub App to make authenticated API requests for the app's installation on an organization or individual account. Installation tokens expire one hour from the time you create them. Using an expired token produces a status code of `401 - Unauthorized`, and requires creating a new installation token. By default the installation token has access to all repositories that the installation can access.Optionally, you can use the `repositories` or `repository_ids` body parameters to specify individual repositories that the installation access token can access. If you don't use `repositories` or `repository_ids` to grant access to specific repositories, the installation access token will have access to all repositories that the installation was granted access to. The installation access token cannot be granted access to repositories that the installation was not granted access to. Up to 500 repositories can be listed in this manner.Optionally, use the `permissions` body parameter to specify the permissions that the installation access token should have. If `permissions` is not specified, the installation access token will have all of the permissions that were granted to the app. The installation access token cannot be granted permissions that the app was not granted.You must use a [JWT](https://docs.github.com/enterprise-cloud@latest//apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. /// API method documentation /// /// A @@ -66,7 +66,7 @@ public Access_tokensRequestBuilder(string rawUrl, IRequestAdapter requestAdapter return await RequestAdapter.SendAsync(requestInfo, global::GitHub.Models.InstallationToken.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } /// - /// Creates an installation access token that enables a GitHub App to make authenticated API requests for the app's installation on an organization or individual account. Installation tokens expire one hour from the time you create them. Using an expired token produces a status code of `401 - Unauthorized`, and requires creating a new installation token. By default the installation token has access to all repositories that the installation can access.Optionally, you can use the `repositories` or `repository_ids` body parameters to specify individual repositories that the installation access token can access. If you don't use `repositories` or `repository_ids` to grant access to specific repositories, the installation access token will have access to all repositories that the installation was granted access to. The installation access token cannot be granted access to repositories that the installation was not granted access to. Up to 500 repositories can be listed in this manner.Optionally, use the `permissions` body parameter to specify the permissions that the installation access token should have. If `permissions` is not specified, the installation access token will have all of the permissions that were granted to the app. The installation access token cannot be granted permissions that the app was not granted.When using the repository or permission parameters to reduce the access of the token, the complexity of the token is increased due to both the number of permissions in the request and the number of repositories the token will have access to. If the complexity is too large, the token will fail to be issued. If this occurs, the error message will indicate the maximum number of repositories that should be requested. For the average application requesting 8 permissions, this limit is around 5000 repositories. With fewer permissions requested, more repositories are supported.You must use a [JWT](https://docs.github.com/enterprise-cloud@latest//apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. + /// Creates an installation access token that enables a GitHub App to make authenticated API requests for the app's installation on an organization or individual account. Installation tokens expire one hour from the time you create them. Using an expired token produces a status code of `401 - Unauthorized`, and requires creating a new installation token. By default the installation token has access to all repositories that the installation can access.Optionally, you can use the `repositories` or `repository_ids` body parameters to specify individual repositories that the installation access token can access. If you don't use `repositories` or `repository_ids` to grant access to specific repositories, the installation access token will have access to all repositories that the installation was granted access to. The installation access token cannot be granted access to repositories that the installation was not granted access to. Up to 500 repositories can be listed in this manner.Optionally, use the `permissions` body parameter to specify the permissions that the installation access token should have. If `permissions` is not specified, the installation access token will have all of the permissions that were granted to the app. The installation access token cannot be granted permissions that the app was not granted.You must use a [JWT](https://docs.github.com/enterprise-cloud@latest//apps/building-github-apps/authenticating-with-github-apps/#authenticating-as-a-github-app) to access this endpoint. /// /// A /// The request body diff --git a/src/GitHub/Enterprises/Item/AuditLog/AuditLogRequestBuilder.cs b/src/GitHub/Enterprises/Item/AuditLog/AuditLogRequestBuilder.cs index 0d52f152..c655fd4d 100644 --- a/src/GitHub/Enterprises/Item/AuditLog/AuditLogRequestBuilder.cs +++ b/src/GitHub/Enterprises/Item/AuditLog/AuditLogRequestBuilder.cs @@ -1,5 +1,7 @@ // #pragma warning disable CS0618 +using GitHub.Enterprises.Item.AuditLog.StreamKey; +using GitHub.Enterprises.Item.AuditLog.Streams; using GitHub.Models; using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -17,6 +19,16 @@ namespace GitHub.Enterprises.Item.AuditLog [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.19.0")] public partial class AuditLogRequestBuilder : BaseRequestBuilder { + /// The streamKey property + public global::GitHub.Enterprises.Item.AuditLog.StreamKey.StreamKeyRequestBuilder StreamKey + { + get => new global::GitHub.Enterprises.Item.AuditLog.StreamKey.StreamKeyRequestBuilder(PathParameters, RequestAdapter); + } + /// The streams property + public global::GitHub.Enterprises.Item.AuditLog.Streams.StreamsRequestBuilder Streams + { + get => new global::GitHub.Enterprises.Item.AuditLog.Streams.StreamsRequestBuilder(PathParameters, RequestAdapter); + } /// /// Instantiates a new and sets the default values. /// diff --git a/src/GitHub/Enterprises/Item/AuditLog/StreamKey/StreamKeyRequestBuilder.cs b/src/GitHub/Enterprises/Item/AuditLog/StreamKey/StreamKeyRequestBuilder.cs new file mode 100644 index 00000000..3df23b2d --- /dev/null +++ b/src/GitHub/Enterprises/Item/AuditLog/StreamKey/StreamKeyRequestBuilder.cs @@ -0,0 +1,85 @@ +// +#pragma warning disable CS0618 +using GitHub.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace GitHub.Enterprises.Item.AuditLog.StreamKey +{ + /// + /// Builds and executes requests for operations under \enterprises\{enterprise}\audit-log\stream-key + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.19.0")] + public partial class StreamKeyRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public StreamKeyRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/enterprises/{enterprise}/audit-log/stream-key", 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 StreamKeyRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/enterprises/{enterprise}/audit-log/stream-key", rawUrl) + { + } + /// + /// Retrieves the audit log streaming public key for encrypting secrets.When using this endpoint, you must encrypt the credentials following the same encryption steps as outlined in the guide on encrypting secrets. See "[Encrypting secrets for the REST API](/rest/guides/encrypting-secrets-for-the-rest-api)." + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#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); + return await RequestAdapter.SendAsync(requestInfo, global::GitHub.Models.AuditLogStreamKey.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Retrieves the audit log streaming public key for encrypting secrets.When using this endpoint, you must encrypt the credentials following the same encryption steps as outlined in the guide on encrypting secrets. See "[Encrypting secrets for the REST API](/rest/guides/encrypting-secrets-for-the-rest-api)." + /// + /// 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 global::GitHub.Enterprises.Item.AuditLog.StreamKey.StreamKeyRequestBuilder WithUrl(string rawUrl) + { + return new global::GitHub.Enterprises.Item.AuditLog.StreamKey.StreamKeyRequestBuilder(rawUrl, RequestAdapter); + } + } +} +#pragma warning restore CS0618 diff --git a/src/GitHub/Enterprises/Item/AuditLog/Streams/Item/GetAuditLogStreamConfig422Error.cs b/src/GitHub/Enterprises/Item/AuditLog/Streams/Item/GetAuditLogStreamConfig422Error.cs new file mode 100644 index 00000000..bf35e330 --- /dev/null +++ b/src/GitHub/Enterprises/Item/AuditLog/Streams/Item/GetAuditLogStreamConfig422Error.cs @@ -0,0 +1,68 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System; +namespace GitHub.Enterprises.Item.AuditLog.Streams.Item +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.19.0")] + #pragma warning disable CS1591 + public partial class GetAuditLogStreamConfig422Error : ApiException, 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 errors property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Errors { get; set; } +#nullable restore +#else + public List Errors { get; set; } +#endif + /// The primary error message. + public override string Message { get => base.Message; } + /// + /// Instantiates a new and sets the default values. + /// + public GetAuditLogStreamConfig422Error() + { + 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.Enterprises.Item.AuditLog.Streams.Item.GetAuditLogStreamConfig422Error CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::GitHub.Enterprises.Item.AuditLog.Streams.Item.GetAuditLogStreamConfig422Error(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "errors", n => { Errors = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + }; + } + /// + /// 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("errors", Errors); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/GitHub/Enterprises/Item/AuditLog/Streams/Item/WithStream_ItemRequestBuilder.cs b/src/GitHub/Enterprises/Item/AuditLog/Streams/Item/WithStream_ItemRequestBuilder.cs new file mode 100644 index 00000000..2e031c02 --- /dev/null +++ b/src/GitHub/Enterprises/Item/AuditLog/Streams/Item/WithStream_ItemRequestBuilder.cs @@ -0,0 +1,169 @@ +// +#pragma warning disable CS0618 +using GitHub.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace GitHub.Enterprises.Item.AuditLog.Streams.Item +{ + /// + /// Builds and executes requests for operations under \enterprises\{enterprise}\audit-log\streams\{stream_id} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.19.0")] + public partial class WithStream_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 WithStream_ItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/enterprises/{enterprise}/audit-log/streams/{stream_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 WithStream_ItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/enterprises/{enterprise}/audit-log/streams/{stream_id}", rawUrl) + { + } + /// + /// Deletes an existing audit log stream configuration for an enterprise. When using this endpoint, you must encrypt the credentials following the same encryption steps as outlined in the guide on encrypting secrets. See "[Encrypting secrets for the REST API](/rest/guides/encrypting-secrets-for-the-rest-api)." + /// API method documentation + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Lists one audit log stream configuration via a stream ID.When using this endpoint, you must encrypt the credentials following the same encryption steps as outlined in the guide on encrypting secrets. See "[Encrypting secrets for the REST API](/rest/guides/encrypting-secrets-for-the-rest-api)." + /// API method documentation + /// + /// A + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#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); + return await RequestAdapter.SendAsync(requestInfo, global::GitHub.Models.GetAuditLogStreamConfig.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Updates an existing audit log stream configuration for an enterprise.When using this endpoint, you must encrypt the credentials following the same encryption steps as outlined in the guide on encrypting secrets. See "[Encrypting secrets for the REST API](/rest/guides/encrypting-secrets-for-the-rest-api)." + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 422 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PutAsync(global::GitHub.Enterprises.Item.AuditLog.Streams.Item.WithStream_PutRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PutAsync(global::GitHub.Enterprises.Item.AuditLog.Streams.Item.WithStream_PutRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPutRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "422", global::GitHub.Enterprises.Item.AuditLog.Streams.Item.GetAuditLogStreamConfig422Error.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::GitHub.Models.GetAuditLogStreamConfig.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Deletes an existing audit log stream configuration for an enterprise. When using this endpoint, you must encrypt the credentials following the same encryption steps as outlined in the guide on encrypting secrets. See "[Encrypting secrets for the REST API](/rest/guides/encrypting-secrets-for-the-rest-api)." + /// + /// 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 ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + return requestInfo; + } + /// + /// Lists one audit log stream configuration via a stream ID.When using this endpoint, you must encrypt the credentials following the same encryption steps as outlined in the guide on encrypting secrets. See "[Encrypting secrets for the REST API](/rest/guides/encrypting-secrets-for-the-rest-api)." + /// + /// 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; + } + /// + /// Updates an existing audit log stream configuration for an enterprise.When using this endpoint, you must encrypt the credentials following the same encryption steps as outlined in the guide on encrypting secrets. See "[Encrypting secrets for the REST API](/rest/guides/encrypting-secrets-for-the-rest-api)." + /// + /// A + /// The request body + /// 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.Enterprises.Item.AuditLog.Streams.Item.WithStream_PutRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPutRequestInformation(global::GitHub.Enterprises.Item.AuditLog.Streams.Item.WithStream_PutRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + 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 global::GitHub.Enterprises.Item.AuditLog.Streams.Item.WithStream_ItemRequestBuilder WithUrl(string rawUrl) + { + return new global::GitHub.Enterprises.Item.AuditLog.Streams.Item.WithStream_ItemRequestBuilder(rawUrl, RequestAdapter); + } + } +} +#pragma warning restore CS0618 diff --git a/src/GitHub/Enterprises/Item/AuditLog/Streams/Item/WithStream_PutRequestBody.cs b/src/GitHub/Enterprises/Item/AuditLog/Streams/Item/WithStream_PutRequestBody.cs new file mode 100644 index 00000000..542a8448 --- /dev/null +++ b/src/GitHub/Enterprises/Item/AuditLog/Streams/Item/WithStream_PutRequestBody.cs @@ -0,0 +1,249 @@ +// +#pragma warning disable CS0618 +using GitHub.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace GitHub.Enterprises.Item.AuditLog.Streams.Item +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.19.0")] + #pragma warning disable CS1591 + public partial class WithStream_PutRequestBody : 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; } + /// This setting pauses or resumes a stream. + public bool? Enabled { get; set; } + /// The audit log streaming provider. The name is case sensitive. + public global::GitHub.Enterprises.Item.AuditLog.Streams.Item.WithStream_PutRequestBody_stream_type? StreamType { get; set; } + /// The vendor_specific property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::GitHub.Enterprises.Item.AuditLog.Streams.Item.WithStream_PutRequestBody.WithStream_PutRequestBody_vendor_specific? VendorSpecific { get; set; } +#nullable restore +#else + public global::GitHub.Enterprises.Item.AuditLog.Streams.Item.WithStream_PutRequestBody.WithStream_PutRequestBody_vendor_specific VendorSpecific { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public WithStream_PutRequestBody() + { + 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.Enterprises.Item.AuditLog.Streams.Item.WithStream_PutRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::GitHub.Enterprises.Item.AuditLog.Streams.Item.WithStream_PutRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "enabled", n => { Enabled = n.GetBoolValue(); } }, + { "stream_type", n => { StreamType = n.GetEnumValue(); } }, + { "vendor_specific", n => { VendorSpecific = n.GetObjectValue(global::GitHub.Enterprises.Item.AuditLog.Streams.Item.WithStream_PutRequestBody.WithStream_PutRequestBody_vendor_specific.CreateFromDiscriminatorValue); } }, + }; + } + /// + /// 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.WriteBoolValue("enabled", Enabled); + writer.WriteEnumValue("stream_type", StreamType); + writer.WriteObjectValue("vendor_specific", VendorSpecific); + writer.WriteAdditionalData(AdditionalData); + } + /// + /// Composed type wrapper for classes , , , , , , + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.19.0")] + public partial class WithStream_PutRequestBody_vendor_specific : IComposedTypeWrapper, IParsable + { + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::GitHub.Models.AmazonS3AccessKeysConfig? AmazonS3AccessKeysConfig { get; set; } +#nullable restore +#else + public global::GitHub.Models.AmazonS3AccessKeysConfig AmazonS3AccessKeysConfig { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::GitHub.Models.AmazonS3OidcConfig? AmazonS3OidcConfig { get; set; } +#nullable restore +#else + public global::GitHub.Models.AmazonS3OidcConfig AmazonS3OidcConfig { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::GitHub.Models.AzureBlobConfig? AzureBlobConfig { get; set; } +#nullable restore +#else + public global::GitHub.Models.AzureBlobConfig AzureBlobConfig { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::GitHub.Models.AzureHubConfig? AzureHubConfig { get; set; } +#nullable restore +#else + public global::GitHub.Models.AzureHubConfig AzureHubConfig { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::GitHub.Models.DatadogConfig? DatadogConfig { get; set; } +#nullable restore +#else + public global::GitHub.Models.DatadogConfig DatadogConfig { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::GitHub.Models.GoogleCloudConfig? GoogleCloudConfig { get; set; } +#nullable restore +#else + public global::GitHub.Models.GoogleCloudConfig GoogleCloudConfig { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::GitHub.Models.SplunkConfig? SplunkConfig { get; set; } +#nullable restore +#else + public global::GitHub.Models.SplunkConfig SplunkConfig { 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.Enterprises.Item.AuditLog.Streams.Item.WithStream_PutRequestBody.WithStream_PutRequestBody_vendor_specific CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + var mappingValue = parseNode.GetChildNode("")?.GetStringValue(); + var result = new global::GitHub.Enterprises.Item.AuditLog.Streams.Item.WithStream_PutRequestBody.WithStream_PutRequestBody_vendor_specific(); + if("amazon-s3-access-keys-config".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.AmazonS3AccessKeysConfig = new global::GitHub.Models.AmazonS3AccessKeysConfig(); + } + else if("amazon-s3-oidc-config".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.AmazonS3OidcConfig = new global::GitHub.Models.AmazonS3OidcConfig(); + } + else if("azure-blob-config".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.AzureBlobConfig = new global::GitHub.Models.AzureBlobConfig(); + } + else if("azure-hub-config".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.AzureHubConfig = new global::GitHub.Models.AzureHubConfig(); + } + else if("datadog-config".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.DatadogConfig = new global::GitHub.Models.DatadogConfig(); + } + else if("google-cloud-config".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.GoogleCloudConfig = new global::GitHub.Models.GoogleCloudConfig(); + } + else if("splunk-config".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.SplunkConfig = new global::GitHub.Models.SplunkConfig(); + } + return result; + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + if(AmazonS3AccessKeysConfig != null) + { + return AmazonS3AccessKeysConfig.GetFieldDeserializers(); + } + else if(AmazonS3OidcConfig != null) + { + return AmazonS3OidcConfig.GetFieldDeserializers(); + } + else if(AzureBlobConfig != null) + { + return AzureBlobConfig.GetFieldDeserializers(); + } + else if(AzureHubConfig != null) + { + return AzureHubConfig.GetFieldDeserializers(); + } + else if(DatadogConfig != null) + { + return DatadogConfig.GetFieldDeserializers(); + } + else if(GoogleCloudConfig != null) + { + return GoogleCloudConfig.GetFieldDeserializers(); + } + else if(SplunkConfig != null) + { + return SplunkConfig.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(AmazonS3AccessKeysConfig != null) + { + writer.WriteObjectValue(null, AmazonS3AccessKeysConfig); + } + else if(AmazonS3OidcConfig != null) + { + writer.WriteObjectValue(null, AmazonS3OidcConfig); + } + else if(AzureBlobConfig != null) + { + writer.WriteObjectValue(null, AzureBlobConfig); + } + else if(AzureHubConfig != null) + { + writer.WriteObjectValue(null, AzureHubConfig); + } + else if(DatadogConfig != null) + { + writer.WriteObjectValue(null, DatadogConfig); + } + else if(GoogleCloudConfig != null) + { + writer.WriteObjectValue(null, GoogleCloudConfig); + } + else if(SplunkConfig != null) + { + writer.WriteObjectValue(null, SplunkConfig); + } + } + } + } +} +#pragma warning restore CS0618 diff --git a/src/GitHub/Enterprises/Item/AuditLog/Streams/Item/WithStream_PutRequestBody_stream_type.cs b/src/GitHub/Enterprises/Item/AuditLog/Streams/Item/WithStream_PutRequestBody_stream_type.cs new file mode 100644 index 00000000..d53f81c5 --- /dev/null +++ b/src/GitHub/Enterprises/Item/AuditLog/Streams/Item/WithStream_PutRequestBody_stream_type.cs @@ -0,0 +1,39 @@ +// +using System.Runtime.Serialization; +using System; +namespace GitHub.Enterprises.Item.AuditLog.Streams.Item +{ + /// The audit log streaming provider. The name is case sensitive. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.19.0")] + public enum WithStream_PutRequestBody_stream_type + { + [EnumMember(Value = "Azure Blob Storage")] + #pragma warning disable CS1591 + AzureBlobStorage, + #pragma warning restore CS1591 + [EnumMember(Value = "Azure Event Hubs")] + #pragma warning disable CS1591 + AzureEventHubs, + #pragma warning restore CS1591 + [EnumMember(Value = "Amazon S3")] + #pragma warning disable CS1591 + AmazonS3, + #pragma warning restore CS1591 + [EnumMember(Value = "Splunk")] + #pragma warning disable CS1591 + Splunk, + #pragma warning restore CS1591 + [EnumMember(Value = "HTTPS Event Collector")] + #pragma warning disable CS1591 + HTTPSEventCollector, + #pragma warning restore CS1591 + [EnumMember(Value = "Google Cloud Storage")] + #pragma warning disable CS1591 + GoogleCloudStorage, + #pragma warning restore CS1591 + [EnumMember(Value = "Datadog")] + #pragma warning disable CS1591 + Datadog, + #pragma warning restore CS1591 + } +} diff --git a/src/GitHub/Enterprises/Item/AuditLog/Streams/StreamsPostRequestBody.cs b/src/GitHub/Enterprises/Item/AuditLog/Streams/StreamsPostRequestBody.cs new file mode 100644 index 00000000..512846d2 --- /dev/null +++ b/src/GitHub/Enterprises/Item/AuditLog/Streams/StreamsPostRequestBody.cs @@ -0,0 +1,249 @@ +// +#pragma warning disable CS0618 +using GitHub.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace GitHub.Enterprises.Item.AuditLog.Streams +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.19.0")] + #pragma warning disable CS1591 + public partial class StreamsPostRequestBody : 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; } + /// This setting pauses or resumes a stream. + public bool? Enabled { get; set; } + /// The audit log streaming provider. The name is case sensitive. + public global::GitHub.Enterprises.Item.AuditLog.Streams.StreamsPostRequestBody_stream_type? StreamType { get; set; } + /// The vendor_specific property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::GitHub.Enterprises.Item.AuditLog.Streams.StreamsPostRequestBody.StreamsPostRequestBody_vendor_specific? VendorSpecific { get; set; } +#nullable restore +#else + public global::GitHub.Enterprises.Item.AuditLog.Streams.StreamsPostRequestBody.StreamsPostRequestBody_vendor_specific VendorSpecific { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public StreamsPostRequestBody() + { + 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.Enterprises.Item.AuditLog.Streams.StreamsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::GitHub.Enterprises.Item.AuditLog.Streams.StreamsPostRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "enabled", n => { Enabled = n.GetBoolValue(); } }, + { "stream_type", n => { StreamType = n.GetEnumValue(); } }, + { "vendor_specific", n => { VendorSpecific = n.GetObjectValue(global::GitHub.Enterprises.Item.AuditLog.Streams.StreamsPostRequestBody.StreamsPostRequestBody_vendor_specific.CreateFromDiscriminatorValue); } }, + }; + } + /// + /// 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.WriteBoolValue("enabled", Enabled); + writer.WriteEnumValue("stream_type", StreamType); + writer.WriteObjectValue("vendor_specific", VendorSpecific); + writer.WriteAdditionalData(AdditionalData); + } + /// + /// Composed type wrapper for classes , , , , , , + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.19.0")] + public partial class StreamsPostRequestBody_vendor_specific : IComposedTypeWrapper, IParsable + { + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::GitHub.Models.AmazonS3AccessKeysConfig? AmazonS3AccessKeysConfig { get; set; } +#nullable restore +#else + public global::GitHub.Models.AmazonS3AccessKeysConfig AmazonS3AccessKeysConfig { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::GitHub.Models.AmazonS3OidcConfig? AmazonS3OidcConfig { get; set; } +#nullable restore +#else + public global::GitHub.Models.AmazonS3OidcConfig AmazonS3OidcConfig { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::GitHub.Models.AzureBlobConfig? AzureBlobConfig { get; set; } +#nullable restore +#else + public global::GitHub.Models.AzureBlobConfig AzureBlobConfig { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::GitHub.Models.AzureHubConfig? AzureHubConfig { get; set; } +#nullable restore +#else + public global::GitHub.Models.AzureHubConfig AzureHubConfig { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::GitHub.Models.DatadogConfig? DatadogConfig { get; set; } +#nullable restore +#else + public global::GitHub.Models.DatadogConfig DatadogConfig { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::GitHub.Models.GoogleCloudConfig? GoogleCloudConfig { get; set; } +#nullable restore +#else + public global::GitHub.Models.GoogleCloudConfig GoogleCloudConfig { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::GitHub.Models.SplunkConfig? SplunkConfig { get; set; } +#nullable restore +#else + public global::GitHub.Models.SplunkConfig SplunkConfig { 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.Enterprises.Item.AuditLog.Streams.StreamsPostRequestBody.StreamsPostRequestBody_vendor_specific CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + var mappingValue = parseNode.GetChildNode("")?.GetStringValue(); + var result = new global::GitHub.Enterprises.Item.AuditLog.Streams.StreamsPostRequestBody.StreamsPostRequestBody_vendor_specific(); + if("amazon-s3-access-keys-config".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.AmazonS3AccessKeysConfig = new global::GitHub.Models.AmazonS3AccessKeysConfig(); + } + else if("amazon-s3-oidc-config".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.AmazonS3OidcConfig = new global::GitHub.Models.AmazonS3OidcConfig(); + } + else if("azure-blob-config".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.AzureBlobConfig = new global::GitHub.Models.AzureBlobConfig(); + } + else if("azure-hub-config".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.AzureHubConfig = new global::GitHub.Models.AzureHubConfig(); + } + else if("datadog-config".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.DatadogConfig = new global::GitHub.Models.DatadogConfig(); + } + else if("google-cloud-config".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.GoogleCloudConfig = new global::GitHub.Models.GoogleCloudConfig(); + } + else if("splunk-config".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.SplunkConfig = new global::GitHub.Models.SplunkConfig(); + } + return result; + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + if(AmazonS3AccessKeysConfig != null) + { + return AmazonS3AccessKeysConfig.GetFieldDeserializers(); + } + else if(AmazonS3OidcConfig != null) + { + return AmazonS3OidcConfig.GetFieldDeserializers(); + } + else if(AzureBlobConfig != null) + { + return AzureBlobConfig.GetFieldDeserializers(); + } + else if(AzureHubConfig != null) + { + return AzureHubConfig.GetFieldDeserializers(); + } + else if(DatadogConfig != null) + { + return DatadogConfig.GetFieldDeserializers(); + } + else if(GoogleCloudConfig != null) + { + return GoogleCloudConfig.GetFieldDeserializers(); + } + else if(SplunkConfig != null) + { + return SplunkConfig.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(AmazonS3AccessKeysConfig != null) + { + writer.WriteObjectValue(null, AmazonS3AccessKeysConfig); + } + else if(AmazonS3OidcConfig != null) + { + writer.WriteObjectValue(null, AmazonS3OidcConfig); + } + else if(AzureBlobConfig != null) + { + writer.WriteObjectValue(null, AzureBlobConfig); + } + else if(AzureHubConfig != null) + { + writer.WriteObjectValue(null, AzureHubConfig); + } + else if(DatadogConfig != null) + { + writer.WriteObjectValue(null, DatadogConfig); + } + else if(GoogleCloudConfig != null) + { + writer.WriteObjectValue(null, GoogleCloudConfig); + } + else if(SplunkConfig != null) + { + writer.WriteObjectValue(null, SplunkConfig); + } + } + } + } +} +#pragma warning restore CS0618 diff --git a/src/GitHub/Enterprises/Item/AuditLog/Streams/StreamsPostRequestBody_stream_type.cs b/src/GitHub/Enterprises/Item/AuditLog/Streams/StreamsPostRequestBody_stream_type.cs new file mode 100644 index 00000000..5ed5c82b --- /dev/null +++ b/src/GitHub/Enterprises/Item/AuditLog/Streams/StreamsPostRequestBody_stream_type.cs @@ -0,0 +1,39 @@ +// +using System.Runtime.Serialization; +using System; +namespace GitHub.Enterprises.Item.AuditLog.Streams +{ + /// The audit log streaming provider. The name is case sensitive. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.19.0")] + public enum StreamsPostRequestBody_stream_type + { + [EnumMember(Value = "Azure Blob Storage")] + #pragma warning disable CS1591 + AzureBlobStorage, + #pragma warning restore CS1591 + [EnumMember(Value = "Azure Event Hubs")] + #pragma warning disable CS1591 + AzureEventHubs, + #pragma warning restore CS1591 + [EnumMember(Value = "Amazon S3")] + #pragma warning disable CS1591 + AmazonS3, + #pragma warning restore CS1591 + [EnumMember(Value = "Splunk")] + #pragma warning disable CS1591 + Splunk, + #pragma warning restore CS1591 + [EnumMember(Value = "HTTPS Event Collector")] + #pragma warning disable CS1591 + HTTPSEventCollector, + #pragma warning restore CS1591 + [EnumMember(Value = "Google Cloud Storage")] + #pragma warning disable CS1591 + GoogleCloudStorage, + #pragma warning restore CS1591 + [EnumMember(Value = "Datadog")] + #pragma warning disable CS1591 + Datadog, + #pragma warning restore CS1591 + } +} diff --git a/src/GitHub/Enterprises/Item/AuditLog/Streams/StreamsRequestBuilder.cs b/src/GitHub/Enterprises/Item/AuditLog/Streams/StreamsRequestBuilder.cs new file mode 100644 index 00000000..ef61ec79 --- /dev/null +++ b/src/GitHub/Enterprises/Item/AuditLog/Streams/StreamsRequestBuilder.cs @@ -0,0 +1,142 @@ +// +#pragma warning disable CS0618 +using GitHub.Enterprises.Item.AuditLog.Streams.Item; +using GitHub.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace GitHub.Enterprises.Item.AuditLog.Streams +{ + /// + /// Builds and executes requests for operations under \enterprises\{enterprise}\audit-log\streams + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.19.0")] + public partial class StreamsRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the GitHub.enterprises.item.auditLog.streams.item collection + /// The ID of the audit log stream configuration. + /// A + public global::GitHub.Enterprises.Item.AuditLog.Streams.Item.WithStream_ItemRequestBuilder this[int position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("stream_id", position); + return new global::GitHub.Enterprises.Item.AuditLog.Streams.Item.WithStream_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public StreamsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/enterprises/{enterprise}/audit-log/streams", 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 StreamsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/enterprises/{enterprise}/audit-log/streams", rawUrl) + { + } + /// + /// Lists the configured audit log streaming configurations for an enterprise.This only lists configured streams for supported providers.When using this endpoint, you must encrypt the credentials following the same encryption steps as outlined in the guide on encrypting secrets. See "[Encrypting secrets for the REST API](/rest/guides/encrypting-secrets-for-the-rest-api)." + /// API method documentation + /// + /// A List<global::GitHub.Models.GetAuditLogStreamConfigs> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#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 collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::GitHub.Models.GetAuditLogStreamConfigs.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// Creates an audit log streaming configuration for any of the supported streaming endpoints: Azure Blob Storage, Azure Event Hubs, Amazon S3, Splunk, Google Cloud Storage, Datadog.When using this endpoint, you must encrypt the credentials following the same encryption steps as outlined in the guide on encrypting secrets. See "[Encrypting secrets for the REST API](/rest/guides/encrypting-secrets-for-the-rest-api)." + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(global::GitHub.Enterprises.Item.AuditLog.Streams.StreamsPostRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(global::GitHub.Enterprises.Item.AuditLog.Streams.StreamsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + return await RequestAdapter.SendAsync(requestInfo, global::GitHub.Models.GetAuditLogStreamConfig.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + } + /// + /// Lists the configured audit log streaming configurations for an enterprise.This only lists configured streams for supported providers.When using this endpoint, you must encrypt the credentials following the same encryption steps as outlined in the guide on encrypting secrets. See "[Encrypting secrets for the REST API](/rest/guides/encrypting-secrets-for-the-rest-api)." + /// + /// 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; + } + /// + /// Creates an audit log streaming configuration for any of the supported streaming endpoints: Azure Blob Storage, Azure Event Hubs, Amazon S3, Splunk, Google Cloud Storage, Datadog.When using this endpoint, you must encrypt the credentials following the same encryption steps as outlined in the guide on encrypting secrets. See "[Encrypting secrets for the REST API](/rest/guides/encrypting-secrets-for-the-rest-api)." + /// + /// A + /// The request body + /// 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 ToPostRequestInformation(global::GitHub.Enterprises.Item.AuditLog.Streams.StreamsPostRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::GitHub.Enterprises.Item.AuditLog.Streams.StreamsPostRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + 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 global::GitHub.Enterprises.Item.AuditLog.Streams.StreamsRequestBuilder WithUrl(string rawUrl) + { + return new global::GitHub.Enterprises.Item.AuditLog.Streams.StreamsRequestBuilder(rawUrl, RequestAdapter); + } + } +} +#pragma warning restore CS0618 diff --git a/src/GitHub/Enterprises/Item/CodeSecurity/CodeSecurityRequestBuilder.cs b/src/GitHub/Enterprises/Item/CodeSecurity/CodeSecurityRequestBuilder.cs new file mode 100644 index 00000000..2670912e --- /dev/null +++ b/src/GitHub/Enterprises/Item/CodeSecurity/CodeSecurityRequestBuilder.cs @@ -0,0 +1,41 @@ +// +#pragma warning disable CS0618 +using GitHub.Enterprises.Item.CodeSecurity.Configurations; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System; +namespace GitHub.Enterprises.Item.CodeSecurity +{ + /// + /// Builds and executes requests for operations under \enterprises\{enterprise}\code-security + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.19.0")] + public partial class CodeSecurityRequestBuilder : BaseRequestBuilder + { + /// The configurations property + public global::GitHub.Enterprises.Item.CodeSecurity.Configurations.ConfigurationsRequestBuilder Configurations + { + get => new global::GitHub.Enterprises.Item.CodeSecurity.Configurations.ConfigurationsRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public CodeSecurityRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/enterprises/{enterprise}/code-security", 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 CodeSecurityRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/enterprises/{enterprise}/code-security", rawUrl) + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/GitHub/Enterprises/Item/CodeSecurity/Configurations/ConfigurationsPostRequestBody.cs b/src/GitHub/Enterprises/Item/CodeSecurity/Configurations/ConfigurationsPostRequestBody.cs new file mode 100644 index 00000000..b29dac1b --- /dev/null +++ b/src/GitHub/Enterprises/Item/CodeSecurity/Configurations/ConfigurationsPostRequestBody.cs @@ -0,0 +1,152 @@ +// +#pragma warning disable CS0618 +using GitHub.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace GitHub.Enterprises.Item.CodeSecurity.Configurations +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.19.0")] + #pragma warning disable CS1591 + public partial class ConfigurationsPostRequestBody : IParsable + #pragma warning restore CS1591 + { + /// The enablement status of GitHub Advanced Security + public global::GitHub.Enterprises.Item.CodeSecurity.Configurations.ConfigurationsPostRequestBody_advanced_security? AdvancedSecurity { get; set; } + /// The enablement status of code scanning default setup + public global::GitHub.Enterprises.Item.CodeSecurity.Configurations.ConfigurationsPostRequestBody_code_scanning_default_setup? CodeScanningDefaultSetup { get; set; } + /// Feature options for code scanning default setup +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::GitHub.Models.CodeScanningDefaultSetupOptions? CodeScanningDefaultSetupOptions { get; set; } +#nullable restore +#else + public global::GitHub.Models.CodeScanningDefaultSetupOptions CodeScanningDefaultSetupOptions { get; set; } +#endif + /// The enablement status of Dependabot alerts + public global::GitHub.Enterprises.Item.CodeSecurity.Configurations.ConfigurationsPostRequestBody_dependabot_alerts? DependabotAlerts { get; set; } + /// The enablement status of Dependabot security updates + public global::GitHub.Enterprises.Item.CodeSecurity.Configurations.ConfigurationsPostRequestBody_dependabot_security_updates? DependabotSecurityUpdates { get; set; } + /// The enablement status of Dependency Graph + public global::GitHub.Enterprises.Item.CodeSecurity.Configurations.ConfigurationsPostRequestBody_dependency_graph? DependencyGraph { get; set; } + /// The enablement status of Automatic dependency submission + public global::GitHub.Enterprises.Item.CodeSecurity.Configurations.ConfigurationsPostRequestBody_dependency_graph_autosubmit_action? DependencyGraphAutosubmitAction { get; set; } + /// Feature options for Automatic dependency submission +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::GitHub.Enterprises.Item.CodeSecurity.Configurations.ConfigurationsPostRequestBody_dependency_graph_autosubmit_action_options? DependencyGraphAutosubmitActionOptions { get; set; } +#nullable restore +#else + public global::GitHub.Enterprises.Item.CodeSecurity.Configurations.ConfigurationsPostRequestBody_dependency_graph_autosubmit_action_options DependencyGraphAutosubmitActionOptions { get; set; } +#endif + /// A description of the code security configuration +#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 enforcement status for a security configuration + public global::GitHub.Enterprises.Item.CodeSecurity.Configurations.ConfigurationsPostRequestBody_enforcement? Enforcement { get; set; } + /// The name of the code security configuration. Must be unique within the enterprise. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// The enablement status of private vulnerability reporting + public global::GitHub.Enterprises.Item.CodeSecurity.Configurations.ConfigurationsPostRequestBody_private_vulnerability_reporting? PrivateVulnerabilityReporting { get; set; } + /// The enablement status of secret scanning + public global::GitHub.Enterprises.Item.CodeSecurity.Configurations.ConfigurationsPostRequestBody_secret_scanning? SecretScanning { get; set; } + /// The enablement status of secret scanning non provider patterns + public global::GitHub.Enterprises.Item.CodeSecurity.Configurations.ConfigurationsPostRequestBody_secret_scanning_non_provider_patterns? SecretScanningNonProviderPatterns { get; set; } + /// The enablement status of secret scanning push protection + public global::GitHub.Enterprises.Item.CodeSecurity.Configurations.ConfigurationsPostRequestBody_secret_scanning_push_protection? SecretScanningPushProtection { get; set; } + /// The enablement status of secret scanning validity checks + public global::GitHub.Enterprises.Item.CodeSecurity.Configurations.ConfigurationsPostRequestBody_secret_scanning_validity_checks? SecretScanningValidityChecks { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public ConfigurationsPostRequestBody() + { + AdvancedSecurity = global::GitHub.Enterprises.Item.CodeSecurity.Configurations.ConfigurationsPostRequestBody_advanced_security.Disabled; + CodeScanningDefaultSetup = global::GitHub.Enterprises.Item.CodeSecurity.Configurations.ConfigurationsPostRequestBody_code_scanning_default_setup.Disabled; + DependabotAlerts = global::GitHub.Enterprises.Item.CodeSecurity.Configurations.ConfigurationsPostRequestBody_dependabot_alerts.Disabled; + DependabotSecurityUpdates = global::GitHub.Enterprises.Item.CodeSecurity.Configurations.ConfigurationsPostRequestBody_dependabot_security_updates.Disabled; + DependencyGraph = global::GitHub.Enterprises.Item.CodeSecurity.Configurations.ConfigurationsPostRequestBody_dependency_graph.Enabled; + DependencyGraphAutosubmitAction = global::GitHub.Enterprises.Item.CodeSecurity.Configurations.ConfigurationsPostRequestBody_dependency_graph_autosubmit_action.Disabled; + Enforcement = global::GitHub.Enterprises.Item.CodeSecurity.Configurations.ConfigurationsPostRequestBody_enforcement.Enforced; + PrivateVulnerabilityReporting = global::GitHub.Enterprises.Item.CodeSecurity.Configurations.ConfigurationsPostRequestBody_private_vulnerability_reporting.Disabled; + SecretScanning = global::GitHub.Enterprises.Item.CodeSecurity.Configurations.ConfigurationsPostRequestBody_secret_scanning.Disabled; + SecretScanningNonProviderPatterns = global::GitHub.Enterprises.Item.CodeSecurity.Configurations.ConfigurationsPostRequestBody_secret_scanning_non_provider_patterns.Disabled; + SecretScanningPushProtection = global::GitHub.Enterprises.Item.CodeSecurity.Configurations.ConfigurationsPostRequestBody_secret_scanning_push_protection.Disabled; + SecretScanningValidityChecks = global::GitHub.Enterprises.Item.CodeSecurity.Configurations.ConfigurationsPostRequestBody_secret_scanning_validity_checks.Disabled; + } + /// + /// 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.Enterprises.Item.CodeSecurity.Configurations.ConfigurationsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::GitHub.Enterprises.Item.CodeSecurity.Configurations.ConfigurationsPostRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "advanced_security", n => { AdvancedSecurity = n.GetEnumValue(); } }, + { "code_scanning_default_setup", n => { CodeScanningDefaultSetup = n.GetEnumValue(); } }, + { "code_scanning_default_setup_options", n => { CodeScanningDefaultSetupOptions = n.GetObjectValue(global::GitHub.Models.CodeScanningDefaultSetupOptions.CreateFromDiscriminatorValue); } }, + { "dependabot_alerts", n => { DependabotAlerts = n.GetEnumValue(); } }, + { "dependabot_security_updates", n => { DependabotSecurityUpdates = n.GetEnumValue(); } }, + { "dependency_graph", n => { DependencyGraph = n.GetEnumValue(); } }, + { "dependency_graph_autosubmit_action", n => { DependencyGraphAutosubmitAction = n.GetEnumValue(); } }, + { "dependency_graph_autosubmit_action_options", n => { DependencyGraphAutosubmitActionOptions = n.GetObjectValue(global::GitHub.Enterprises.Item.CodeSecurity.Configurations.ConfigurationsPostRequestBody_dependency_graph_autosubmit_action_options.CreateFromDiscriminatorValue); } }, + { "description", n => { Description = n.GetStringValue(); } }, + { "enforcement", n => { Enforcement = n.GetEnumValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "private_vulnerability_reporting", n => { PrivateVulnerabilityReporting = n.GetEnumValue(); } }, + { "secret_scanning", n => { SecretScanning = n.GetEnumValue(); } }, + { "secret_scanning_non_provider_patterns", n => { SecretScanningNonProviderPatterns = n.GetEnumValue(); } }, + { "secret_scanning_push_protection", n => { SecretScanningPushProtection = n.GetEnumValue(); } }, + { "secret_scanning_validity_checks", n => { SecretScanningValidityChecks = n.GetEnumValue(); } }, + }; + } + /// + /// 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.WriteEnumValue("advanced_security", AdvancedSecurity); + writer.WriteEnumValue("code_scanning_default_setup", CodeScanningDefaultSetup); + writer.WriteObjectValue("code_scanning_default_setup_options", CodeScanningDefaultSetupOptions); + writer.WriteEnumValue("dependabot_alerts", DependabotAlerts); + writer.WriteEnumValue("dependabot_security_updates", DependabotSecurityUpdates); + writer.WriteEnumValue("dependency_graph", DependencyGraph); + writer.WriteEnumValue("dependency_graph_autosubmit_action", DependencyGraphAutosubmitAction); + writer.WriteObjectValue("dependency_graph_autosubmit_action_options", DependencyGraphAutosubmitActionOptions); + writer.WriteStringValue("description", Description); + writer.WriteEnumValue("enforcement", Enforcement); + writer.WriteStringValue("name", Name); + writer.WriteEnumValue("private_vulnerability_reporting", PrivateVulnerabilityReporting); + writer.WriteEnumValue("secret_scanning", SecretScanning); + writer.WriteEnumValue("secret_scanning_non_provider_patterns", SecretScanningNonProviderPatterns); + writer.WriteEnumValue("secret_scanning_push_protection", SecretScanningPushProtection); + writer.WriteEnumValue("secret_scanning_validity_checks", SecretScanningValidityChecks); + } + } +} +#pragma warning restore CS0618 diff --git a/src/GitHub/Enterprises/Item/CodeSecurity/Configurations/ConfigurationsPostRequestBody_advanced_security.cs b/src/GitHub/Enterprises/Item/CodeSecurity/Configurations/ConfigurationsPostRequestBody_advanced_security.cs new file mode 100644 index 00000000..6809bd96 --- /dev/null +++ b/src/GitHub/Enterprises/Item/CodeSecurity/Configurations/ConfigurationsPostRequestBody_advanced_security.cs @@ -0,0 +1,19 @@ +// +using System.Runtime.Serialization; +using System; +namespace GitHub.Enterprises.Item.CodeSecurity.Configurations +{ + /// The enablement status of GitHub Advanced Security + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.19.0")] + public enum ConfigurationsPostRequestBody_advanced_security + { + [EnumMember(Value = "enabled")] + #pragma warning disable CS1591 + Enabled, + #pragma warning restore CS1591 + [EnumMember(Value = "disabled")] + #pragma warning disable CS1591 + Disabled, + #pragma warning restore CS1591 + } +} diff --git a/src/GitHub/Enterprises/Item/CodeSecurity/Configurations/ConfigurationsPostRequestBody_code_scanning_default_setup.cs b/src/GitHub/Enterprises/Item/CodeSecurity/Configurations/ConfigurationsPostRequestBody_code_scanning_default_setup.cs new file mode 100644 index 00000000..b31a4fc4 --- /dev/null +++ b/src/GitHub/Enterprises/Item/CodeSecurity/Configurations/ConfigurationsPostRequestBody_code_scanning_default_setup.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace GitHub.Enterprises.Item.CodeSecurity.Configurations +{ + /// The enablement status of code scanning default setup + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.19.0")] + public enum ConfigurationsPostRequestBody_code_scanning_default_setup + { + [EnumMember(Value = "enabled")] + #pragma warning disable CS1591 + Enabled, + #pragma warning restore CS1591 + [EnumMember(Value = "disabled")] + #pragma warning disable CS1591 + Disabled, + #pragma warning restore CS1591 + [EnumMember(Value = "not_set")] + #pragma warning disable CS1591 + Not_set, + #pragma warning restore CS1591 + } +} diff --git a/src/GitHub/Enterprises/Item/CodeSecurity/Configurations/ConfigurationsPostRequestBody_dependabot_alerts.cs b/src/GitHub/Enterprises/Item/CodeSecurity/Configurations/ConfigurationsPostRequestBody_dependabot_alerts.cs new file mode 100644 index 00000000..3e13dea5 --- /dev/null +++ b/src/GitHub/Enterprises/Item/CodeSecurity/Configurations/ConfigurationsPostRequestBody_dependabot_alerts.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace GitHub.Enterprises.Item.CodeSecurity.Configurations +{ + /// The enablement status of Dependabot alerts + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.19.0")] + public enum ConfigurationsPostRequestBody_dependabot_alerts + { + [EnumMember(Value = "enabled")] + #pragma warning disable CS1591 + Enabled, + #pragma warning restore CS1591 + [EnumMember(Value = "disabled")] + #pragma warning disable CS1591 + Disabled, + #pragma warning restore CS1591 + [EnumMember(Value = "not_set")] + #pragma warning disable CS1591 + Not_set, + #pragma warning restore CS1591 + } +} diff --git a/src/GitHub/Enterprises/Item/CodeSecurity/Configurations/ConfigurationsPostRequestBody_dependabot_security_updates.cs b/src/GitHub/Enterprises/Item/CodeSecurity/Configurations/ConfigurationsPostRequestBody_dependabot_security_updates.cs new file mode 100644 index 00000000..7a8d1220 --- /dev/null +++ b/src/GitHub/Enterprises/Item/CodeSecurity/Configurations/ConfigurationsPostRequestBody_dependabot_security_updates.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace GitHub.Enterprises.Item.CodeSecurity.Configurations +{ + /// The enablement status of Dependabot security updates + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.19.0")] + public enum ConfigurationsPostRequestBody_dependabot_security_updates + { + [EnumMember(Value = "enabled")] + #pragma warning disable CS1591 + Enabled, + #pragma warning restore CS1591 + [EnumMember(Value = "disabled")] + #pragma warning disable CS1591 + Disabled, + #pragma warning restore CS1591 + [EnumMember(Value = "not_set")] + #pragma warning disable CS1591 + Not_set, + #pragma warning restore CS1591 + } +} diff --git a/src/GitHub/Enterprises/Item/CodeSecurity/Configurations/ConfigurationsPostRequestBody_dependency_graph.cs b/src/GitHub/Enterprises/Item/CodeSecurity/Configurations/ConfigurationsPostRequestBody_dependency_graph.cs new file mode 100644 index 00000000..825fbeb1 --- /dev/null +++ b/src/GitHub/Enterprises/Item/CodeSecurity/Configurations/ConfigurationsPostRequestBody_dependency_graph.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace GitHub.Enterprises.Item.CodeSecurity.Configurations +{ + /// The enablement status of Dependency Graph + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.19.0")] + public enum ConfigurationsPostRequestBody_dependency_graph + { + [EnumMember(Value = "enabled")] + #pragma warning disable CS1591 + Enabled, + #pragma warning restore CS1591 + [EnumMember(Value = "disabled")] + #pragma warning disable CS1591 + Disabled, + #pragma warning restore CS1591 + [EnumMember(Value = "not_set")] + #pragma warning disable CS1591 + Not_set, + #pragma warning restore CS1591 + } +} diff --git a/src/GitHub/Enterprises/Item/CodeSecurity/Configurations/ConfigurationsPostRequestBody_dependency_graph_autosubmit_action.cs b/src/GitHub/Enterprises/Item/CodeSecurity/Configurations/ConfigurationsPostRequestBody_dependency_graph_autosubmit_action.cs new file mode 100644 index 00000000..b9cac4fc --- /dev/null +++ b/src/GitHub/Enterprises/Item/CodeSecurity/Configurations/ConfigurationsPostRequestBody_dependency_graph_autosubmit_action.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace GitHub.Enterprises.Item.CodeSecurity.Configurations +{ + /// The enablement status of Automatic dependency submission + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.19.0")] + public enum ConfigurationsPostRequestBody_dependency_graph_autosubmit_action + { + [EnumMember(Value = "enabled")] + #pragma warning disable CS1591 + Enabled, + #pragma warning restore CS1591 + [EnumMember(Value = "disabled")] + #pragma warning disable CS1591 + Disabled, + #pragma warning restore CS1591 + [EnumMember(Value = "not_set")] + #pragma warning disable CS1591 + Not_set, + #pragma warning restore CS1591 + } +} diff --git a/src/GitHub/Enterprises/Item/CodeSecurity/Configurations/ConfigurationsPostRequestBody_dependency_graph_autosubmit_action_options.cs b/src/GitHub/Enterprises/Item/CodeSecurity/Configurations/ConfigurationsPostRequestBody_dependency_graph_autosubmit_action_options.cs new file mode 100644 index 00000000..a84a4735 --- /dev/null +++ b/src/GitHub/Enterprises/Item/CodeSecurity/Configurations/ConfigurationsPostRequestBody_dependency_graph_autosubmit_action_options.cs @@ -0,0 +1,60 @@ +// +#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.Enterprises.Item.CodeSecurity.Configurations +{ + /// + /// Feature options for Automatic dependency submission + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.19.0")] + public partial class ConfigurationsPostRequestBody_dependency_graph_autosubmit_action_options : 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 to use runners labeled with 'dependency-submission' or standard GitHub runners. + public bool? LabeledRunners { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public ConfigurationsPostRequestBody_dependency_graph_autosubmit_action_options() + { + 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.Enterprises.Item.CodeSecurity.Configurations.ConfigurationsPostRequestBody_dependency_graph_autosubmit_action_options CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::GitHub.Enterprises.Item.CodeSecurity.Configurations.ConfigurationsPostRequestBody_dependency_graph_autosubmit_action_options(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "labeled_runners", n => { LabeledRunners = n.GetBoolValue(); } }, + }; + } + /// + /// 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.WriteBoolValue("labeled_runners", LabeledRunners); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/GitHub/Enterprises/Item/CodeSecurity/Configurations/ConfigurationsPostRequestBody_enforcement.cs b/src/GitHub/Enterprises/Item/CodeSecurity/Configurations/ConfigurationsPostRequestBody_enforcement.cs new file mode 100644 index 00000000..9f70df0f --- /dev/null +++ b/src/GitHub/Enterprises/Item/CodeSecurity/Configurations/ConfigurationsPostRequestBody_enforcement.cs @@ -0,0 +1,19 @@ +// +using System.Runtime.Serialization; +using System; +namespace GitHub.Enterprises.Item.CodeSecurity.Configurations +{ + /// The enforcement status for a security configuration + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.19.0")] + public enum ConfigurationsPostRequestBody_enforcement + { + [EnumMember(Value = "enforced")] + #pragma warning disable CS1591 + Enforced, + #pragma warning restore CS1591 + [EnumMember(Value = "unenforced")] + #pragma warning disable CS1591 + Unenforced, + #pragma warning restore CS1591 + } +} diff --git a/src/GitHub/Enterprises/Item/CodeSecurity/Configurations/ConfigurationsPostRequestBody_private_vulnerability_reporting.cs b/src/GitHub/Enterprises/Item/CodeSecurity/Configurations/ConfigurationsPostRequestBody_private_vulnerability_reporting.cs new file mode 100644 index 00000000..cb924ddd --- /dev/null +++ b/src/GitHub/Enterprises/Item/CodeSecurity/Configurations/ConfigurationsPostRequestBody_private_vulnerability_reporting.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace GitHub.Enterprises.Item.CodeSecurity.Configurations +{ + /// The enablement status of private vulnerability reporting + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.19.0")] + public enum ConfigurationsPostRequestBody_private_vulnerability_reporting + { + [EnumMember(Value = "enabled")] + #pragma warning disable CS1591 + Enabled, + #pragma warning restore CS1591 + [EnumMember(Value = "disabled")] + #pragma warning disable CS1591 + Disabled, + #pragma warning restore CS1591 + [EnumMember(Value = "not_set")] + #pragma warning disable CS1591 + Not_set, + #pragma warning restore CS1591 + } +} diff --git a/src/GitHub/Enterprises/Item/CodeSecurity/Configurations/ConfigurationsPostRequestBody_secret_scanning.cs b/src/GitHub/Enterprises/Item/CodeSecurity/Configurations/ConfigurationsPostRequestBody_secret_scanning.cs new file mode 100644 index 00000000..3202d0d3 --- /dev/null +++ b/src/GitHub/Enterprises/Item/CodeSecurity/Configurations/ConfigurationsPostRequestBody_secret_scanning.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace GitHub.Enterprises.Item.CodeSecurity.Configurations +{ + /// The enablement status of secret scanning + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.19.0")] + public enum ConfigurationsPostRequestBody_secret_scanning + { + [EnumMember(Value = "enabled")] + #pragma warning disable CS1591 + Enabled, + #pragma warning restore CS1591 + [EnumMember(Value = "disabled")] + #pragma warning disable CS1591 + Disabled, + #pragma warning restore CS1591 + [EnumMember(Value = "not_set")] + #pragma warning disable CS1591 + Not_set, + #pragma warning restore CS1591 + } +} diff --git a/src/GitHub/Enterprises/Item/CodeSecurity/Configurations/ConfigurationsPostRequestBody_secret_scanning_non_provider_patterns.cs b/src/GitHub/Enterprises/Item/CodeSecurity/Configurations/ConfigurationsPostRequestBody_secret_scanning_non_provider_patterns.cs new file mode 100644 index 00000000..7744059f --- /dev/null +++ b/src/GitHub/Enterprises/Item/CodeSecurity/Configurations/ConfigurationsPostRequestBody_secret_scanning_non_provider_patterns.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace GitHub.Enterprises.Item.CodeSecurity.Configurations +{ + /// The enablement status of secret scanning non provider patterns + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.19.0")] + public enum ConfigurationsPostRequestBody_secret_scanning_non_provider_patterns + { + [EnumMember(Value = "enabled")] + #pragma warning disable CS1591 + Enabled, + #pragma warning restore CS1591 + [EnumMember(Value = "disabled")] + #pragma warning disable CS1591 + Disabled, + #pragma warning restore CS1591 + [EnumMember(Value = "not_set")] + #pragma warning disable CS1591 + Not_set, + #pragma warning restore CS1591 + } +} diff --git a/src/GitHub/Enterprises/Item/CodeSecurity/Configurations/ConfigurationsPostRequestBody_secret_scanning_push_protection.cs b/src/GitHub/Enterprises/Item/CodeSecurity/Configurations/ConfigurationsPostRequestBody_secret_scanning_push_protection.cs new file mode 100644 index 00000000..9baea857 --- /dev/null +++ b/src/GitHub/Enterprises/Item/CodeSecurity/Configurations/ConfigurationsPostRequestBody_secret_scanning_push_protection.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace GitHub.Enterprises.Item.CodeSecurity.Configurations +{ + /// The enablement status of secret scanning push protection + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.19.0")] + public enum ConfigurationsPostRequestBody_secret_scanning_push_protection + { + [EnumMember(Value = "enabled")] + #pragma warning disable CS1591 + Enabled, + #pragma warning restore CS1591 + [EnumMember(Value = "disabled")] + #pragma warning disable CS1591 + Disabled, + #pragma warning restore CS1591 + [EnumMember(Value = "not_set")] + #pragma warning disable CS1591 + Not_set, + #pragma warning restore CS1591 + } +} diff --git a/src/GitHub/Enterprises/Item/CodeSecurity/Configurations/ConfigurationsPostRequestBody_secret_scanning_validity_checks.cs b/src/GitHub/Enterprises/Item/CodeSecurity/Configurations/ConfigurationsPostRequestBody_secret_scanning_validity_checks.cs new file mode 100644 index 00000000..6ecb1f76 --- /dev/null +++ b/src/GitHub/Enterprises/Item/CodeSecurity/Configurations/ConfigurationsPostRequestBody_secret_scanning_validity_checks.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace GitHub.Enterprises.Item.CodeSecurity.Configurations +{ + /// The enablement status of secret scanning validity checks + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.19.0")] + public enum ConfigurationsPostRequestBody_secret_scanning_validity_checks + { + [EnumMember(Value = "enabled")] + #pragma warning disable CS1591 + Enabled, + #pragma warning restore CS1591 + [EnumMember(Value = "disabled")] + #pragma warning disable CS1591 + Disabled, + #pragma warning restore CS1591 + [EnumMember(Value = "not_set")] + #pragma warning disable CS1591 + Not_set, + #pragma warning restore CS1591 + } +} diff --git a/src/GitHub/Enterprises/Item/CodeSecurity/Configurations/ConfigurationsRequestBuilder.cs b/src/GitHub/Enterprises/Item/CodeSecurity/Configurations/ConfigurationsRequestBuilder.cs new file mode 100644 index 00000000..a29f7f28 --- /dev/null +++ b/src/GitHub/Enterprises/Item/CodeSecurity/Configurations/ConfigurationsRequestBuilder.cs @@ -0,0 +1,194 @@ +// +#pragma warning disable CS0618 +using GitHub.Enterprises.Item.CodeSecurity.Configurations.Defaults; +using GitHub.Enterprises.Item.CodeSecurity.Configurations.Item; +using GitHub.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace GitHub.Enterprises.Item.CodeSecurity.Configurations +{ + /// + /// Builds and executes requests for operations under \enterprises\{enterprise}\code-security\configurations + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.19.0")] + public partial class ConfigurationsRequestBuilder : BaseRequestBuilder + { + /// The defaults property + public global::GitHub.Enterprises.Item.CodeSecurity.Configurations.Defaults.DefaultsRequestBuilder Defaults + { + get => new global::GitHub.Enterprises.Item.CodeSecurity.Configurations.Defaults.DefaultsRequestBuilder(PathParameters, RequestAdapter); + } + /// Gets an item from the GitHub.enterprises.item.codeSecurity.configurations.item collection + /// The unique identifier of the code security configuration. + /// A + public global::GitHub.Enterprises.Item.CodeSecurity.Configurations.Item.WithConfiguration_ItemRequestBuilder this[int position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("configuration_id", position); + return new global::GitHub.Enterprises.Item.CodeSecurity.Configurations.Item.WithConfiguration_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ConfigurationsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/enterprises/{enterprise}/code-security/configurations{?after*,before*,per_page*}", 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 ConfigurationsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/enterprises/{enterprise}/code-security/configurations{?after*,before*,per_page*}", rawUrl) + { + } + /// + /// Lists all code security configurations available in an enterprise.The authenticated user must be an administrator of the enterprise in order to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `read:enterprise` scope to use this endpoint. + /// API method documentation + /// + /// A List<global::GitHub.Models.CodeSecurityConfiguration> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 403 status code + /// 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> + { + { "403", global::GitHub.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::GitHub.Models.BasicError.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::GitHub.Models.CodeSecurityConfiguration.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// Creates a code security configuration in an enterprise.The authenticated user must be an administrator of the enterprise in order to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `admin:enterprise` scope to use this endpoint. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 403 status code + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(global::GitHub.Enterprises.Item.CodeSecurity.Configurations.ConfigurationsPostRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(global::GitHub.Enterprises.Item.CodeSecurity.Configurations.ConfigurationsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::GitHub.Models.BasicError.CreateFromDiscriminatorValue }, + { "403", global::GitHub.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::GitHub.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::GitHub.Models.CodeSecurityConfiguration.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Lists all code security configurations available in an enterprise.The authenticated user must be an administrator of the enterprise in order to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `read:enterprise` scope to use this endpoint. + /// + /// 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; + } + /// + /// Creates a code security configuration in an enterprise.The authenticated user must be an administrator of the enterprise in order to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `admin:enterprise` scope to use this endpoint. + /// + /// A + /// The request body + /// 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 ToPostRequestInformation(global::GitHub.Enterprises.Item.CodeSecurity.Configurations.ConfigurationsPostRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::GitHub.Enterprises.Item.CodeSecurity.Configurations.ConfigurationsPostRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + 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 global::GitHub.Enterprises.Item.CodeSecurity.Configurations.ConfigurationsRequestBuilder WithUrl(string rawUrl) + { + return new global::GitHub.Enterprises.Item.CodeSecurity.Configurations.ConfigurationsRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Lists all code security configurations available in an enterprise.The authenticated user must be an administrator of the enterprise in order to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `read:enterprise` scope to use this endpoint. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.19.0")] + public partial class ConfigurationsRequestBuilderGetQueryParameters + { + /// A cursor, as given in the [Link header](https://docs.github.com/enterprise-cloud@latest//rest/guides/using-pagination-in-the-rest-api#using-link-headers). If specified, the query only searches for results after this cursor. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("after")] + public string? After { get; set; } +#nullable restore +#else + [QueryParameter("after")] + public string After { get; set; } +#endif + /// A cursor, as given in the [Link header](https://docs.github.com/enterprise-cloud@latest//rest/guides/using-pagination-in-the-rest-api#using-link-headers). If specified, the query only searches for results before this cursor. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("before")] + public string? Before { get; set; } +#nullable restore +#else + [QueryParameter("before")] + public string Before { get; set; } +#endif + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + } + } +} +#pragma warning restore CS0618 diff --git a/src/GitHub/Enterprises/Item/CodeSecurity/Configurations/Defaults/DefaultsRequestBuilder.cs b/src/GitHub/Enterprises/Item/CodeSecurity/Configurations/Defaults/DefaultsRequestBuilder.cs new file mode 100644 index 00000000..143bbd9c --- /dev/null +++ b/src/GitHub/Enterprises/Item/CodeSecurity/Configurations/Defaults/DefaultsRequestBuilder.cs @@ -0,0 +1,86 @@ +// +#pragma warning disable CS0618 +using GitHub.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace GitHub.Enterprises.Item.CodeSecurity.Configurations.Defaults +{ + /// + /// Builds and executes requests for operations under \enterprises\{enterprise}\code-security\configurations\defaults + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.19.0")] + public partial class DefaultsRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public DefaultsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/enterprises/{enterprise}/code-security/configurations/defaults", 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 DefaultsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/enterprises/{enterprise}/code-security/configurations/defaults", rawUrl) + { + } + /// + /// Lists the default code security configurations for an enterprise.The authenticated user must be an administrator of the enterprise in order to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `read:enterprise` scope to use this endpoint. + /// API method documentation + /// + /// A List<global::GitHub.Models.CodeSecurityDefaultConfigurations> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. +#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 collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::GitHub.Models.CodeSecurityDefaultConfigurations.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// Lists the default code security configurations for an enterprise.The authenticated user must be an administrator of the enterprise in order to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `read:enterprise` scope to use this endpoint. + /// + /// 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 global::GitHub.Enterprises.Item.CodeSecurity.Configurations.Defaults.DefaultsRequestBuilder WithUrl(string rawUrl) + { + return new global::GitHub.Enterprises.Item.CodeSecurity.Configurations.Defaults.DefaultsRequestBuilder(rawUrl, RequestAdapter); + } + } +} +#pragma warning restore CS0618 diff --git a/src/GitHub/Enterprises/Item/CodeSecurity/Configurations/Item/Attach/AttachPostRequestBody.cs b/src/GitHub/Enterprises/Item/CodeSecurity/Configurations/Item/Attach/AttachPostRequestBody.cs new file mode 100644 index 00000000..a4f6525c --- /dev/null +++ b/src/GitHub/Enterprises/Item/CodeSecurity/Configurations/Item/Attach/AttachPostRequestBody.cs @@ -0,0 +1,49 @@ +// +#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.Enterprises.Item.CodeSecurity.Configurations.Item.Attach +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.19.0")] + #pragma warning disable CS1591 + public partial class AttachPostRequestBody : IParsable + #pragma warning restore CS1591 + { + /// The type of repositories to attach the configuration to. `selected` means the configuration will be attached to only the repositories specified by `selected_repository_ids` + public global::GitHub.Enterprises.Item.CodeSecurity.Configurations.Item.Attach.AttachPostRequestBody_scope? Scope { get; set; } + /// + /// 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.Enterprises.Item.CodeSecurity.Configurations.Item.Attach.AttachPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::GitHub.Enterprises.Item.CodeSecurity.Configurations.Item.Attach.AttachPostRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "scope", n => { Scope = n.GetEnumValue(); } }, + }; + } + /// + /// 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.WriteEnumValue("scope", Scope); + } + } +} +#pragma warning restore CS0618 diff --git a/src/GitHub/Enterprises/Item/CodeSecurity/Configurations/Item/Attach/AttachPostRequestBody_scope.cs b/src/GitHub/Enterprises/Item/CodeSecurity/Configurations/Item/Attach/AttachPostRequestBody_scope.cs new file mode 100644 index 00000000..08630045 --- /dev/null +++ b/src/GitHub/Enterprises/Item/CodeSecurity/Configurations/Item/Attach/AttachPostRequestBody_scope.cs @@ -0,0 +1,19 @@ +// +using System.Runtime.Serialization; +using System; +namespace GitHub.Enterprises.Item.CodeSecurity.Configurations.Item.Attach +{ + /// The type of repositories to attach the configuration to. `selected` means the configuration will be attached to only the repositories specified by `selected_repository_ids` + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.19.0")] + public enum AttachPostRequestBody_scope + { + [EnumMember(Value = "all")] + #pragma warning disable CS1591 + All, + #pragma warning restore CS1591 + [EnumMember(Value = "all_without_configurations")] + #pragma warning disable CS1591 + All_without_configurations, + #pragma warning restore CS1591 + } +} diff --git a/src/GitHub/Enterprises/Item/CodeSecurity/Configurations/Item/Attach/AttachPostResponse.cs b/src/GitHub/Enterprises/Item/CodeSecurity/Configurations/Item/Attach/AttachPostResponse.cs new file mode 100644 index 00000000..e0f2b047 --- /dev/null +++ b/src/GitHub/Enterprises/Item/CodeSecurity/Configurations/Item/Attach/AttachPostResponse.cs @@ -0,0 +1,55 @@ +// +#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.Enterprises.Item.CodeSecurity.Configurations.Item.Attach +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.19.0")] + #pragma warning disable CS1591 + public partial class AttachPostResponse : 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; } + /// + /// Instantiates a new and sets the default values. + /// + public AttachPostResponse() + { + 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.Enterprises.Item.CodeSecurity.Configurations.Item.Attach.AttachPostResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::GitHub.Enterprises.Item.CodeSecurity.Configurations.Item.Attach.AttachPostResponse(); + } + /// + /// 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/Enterprises/Item/CodeSecurity/Configurations/Item/Attach/AttachRequestBuilder.cs b/src/GitHub/Enterprises/Item/CodeSecurity/Configurations/Item/Attach/AttachRequestBuilder.cs new file mode 100644 index 00000000..04be0581 --- /dev/null +++ b/src/GitHub/Enterprises/Item/CodeSecurity/Configurations/Item/Attach/AttachRequestBuilder.cs @@ -0,0 +1,99 @@ +// +#pragma warning disable CS0618 +using GitHub.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace GitHub.Enterprises.Item.CodeSecurity.Configurations.Item.Attach +{ + /// + /// Builds and executes requests for operations under \enterprises\{enterprise}\code-security\configurations\{configuration_id}\attach + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.19.0")] + public partial class AttachRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public AttachRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/enterprises/{enterprise}/code-security/configurations/{configuration_id}/attach", 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 AttachRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/enterprises/{enterprise}/code-security/configurations/{configuration_id}/attach", rawUrl) + { + } + /// + /// Attaches an enterprise code security configuration to repositories. If the repositories specified are already attached to a configuration, they will be re-attached to the provided configuration.If insufficient GHAS licenses are available to attach the configuration to a repository, only free features will be enabled.The authenticated user must be an administrator for the enterprise to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `admin:enterprise` scope to use this endpoint. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 403 status code + /// When receiving a 404 status code + /// When receiving a 409 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(global::GitHub.Enterprises.Item.CodeSecurity.Configurations.Item.Attach.AttachPostRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(global::GitHub.Enterprises.Item.CodeSecurity.Configurations.Item.Attach.AttachPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "403", global::GitHub.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::GitHub.Models.BasicError.CreateFromDiscriminatorValue }, + { "409", global::GitHub.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::GitHub.Enterprises.Item.CodeSecurity.Configurations.Item.Attach.AttachPostResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Attaches an enterprise code security configuration to repositories. If the repositories specified are already attached to a configuration, they will be re-attached to the provided configuration.If insufficient GHAS licenses are available to attach the configuration to a repository, only free features will be enabled.The authenticated user must be an administrator for the enterprise to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `admin:enterprise` scope to use this endpoint. + /// + /// A + /// The request body + /// 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 ToPostRequestInformation(global::GitHub.Enterprises.Item.CodeSecurity.Configurations.Item.Attach.AttachPostRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::GitHub.Enterprises.Item.CodeSecurity.Configurations.Item.Attach.AttachPostRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + 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 global::GitHub.Enterprises.Item.CodeSecurity.Configurations.Item.Attach.AttachRequestBuilder WithUrl(string rawUrl) + { + return new global::GitHub.Enterprises.Item.CodeSecurity.Configurations.Item.Attach.AttachRequestBuilder(rawUrl, RequestAdapter); + } + } +} +#pragma warning restore CS0618 diff --git a/src/GitHub/Enterprises/Item/CodeSecurity/Configurations/Item/Defaults/DefaultsPutRequestBody.cs b/src/GitHub/Enterprises/Item/CodeSecurity/Configurations/Item/Defaults/DefaultsPutRequestBody.cs new file mode 100644 index 00000000..765ce6d0 --- /dev/null +++ b/src/GitHub/Enterprises/Item/CodeSecurity/Configurations/Item/Defaults/DefaultsPutRequestBody.cs @@ -0,0 +1,59 @@ +// +#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.Enterprises.Item.CodeSecurity.Configurations.Item.Defaults +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.19.0")] + #pragma warning disable CS1591 + public partial class DefaultsPutRequestBody : 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; } + /// Specify which types of repository this security configuration should be applied to by default. + public global::GitHub.Enterprises.Item.CodeSecurity.Configurations.Item.Defaults.DefaultsPutRequestBody_default_for_new_repos? DefaultForNewRepos { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public DefaultsPutRequestBody() + { + 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.Enterprises.Item.CodeSecurity.Configurations.Item.Defaults.DefaultsPutRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::GitHub.Enterprises.Item.CodeSecurity.Configurations.Item.Defaults.DefaultsPutRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "default_for_new_repos", n => { DefaultForNewRepos = n.GetEnumValue(); } }, + }; + } + /// + /// 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.WriteEnumValue("default_for_new_repos", DefaultForNewRepos); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/GitHub/Enterprises/Item/CodeSecurity/Configurations/Item/Defaults/DefaultsPutRequestBody_default_for_new_repos.cs b/src/GitHub/Enterprises/Item/CodeSecurity/Configurations/Item/Defaults/DefaultsPutRequestBody_default_for_new_repos.cs new file mode 100644 index 00000000..17c5abe8 --- /dev/null +++ b/src/GitHub/Enterprises/Item/CodeSecurity/Configurations/Item/Defaults/DefaultsPutRequestBody_default_for_new_repos.cs @@ -0,0 +1,27 @@ +// +using System.Runtime.Serialization; +using System; +namespace GitHub.Enterprises.Item.CodeSecurity.Configurations.Item.Defaults +{ + /// Specify which types of repository this security configuration should be applied to by default. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.19.0")] + public enum DefaultsPutRequestBody_default_for_new_repos + { + [EnumMember(Value = "all")] + #pragma warning disable CS1591 + All, + #pragma warning restore CS1591 + [EnumMember(Value = "none")] + #pragma warning disable CS1591 + None, + #pragma warning restore CS1591 + [EnumMember(Value = "private_and_internal")] + #pragma warning disable CS1591 + Private_and_internal, + #pragma warning restore CS1591 + [EnumMember(Value = "public")] + #pragma warning disable CS1591 + Public, + #pragma warning restore CS1591 + } +} diff --git a/src/GitHub/Enterprises/Item/CodeSecurity/Configurations/Item/Defaults/DefaultsPutResponse.cs b/src/GitHub/Enterprises/Item/CodeSecurity/Configurations/Item/Defaults/DefaultsPutResponse.cs new file mode 100644 index 00000000..4e2e500e --- /dev/null +++ b/src/GitHub/Enterprises/Item/CodeSecurity/Configurations/Item/Defaults/DefaultsPutResponse.cs @@ -0,0 +1,70 @@ +// +#pragma warning disable CS0618 +using GitHub.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace GitHub.Enterprises.Item.CodeSecurity.Configurations.Item.Defaults +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.19.0")] + #pragma warning disable CS1591 + public partial class DefaultsPutResponse : 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; } + /// A code security configuration +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::GitHub.Models.CodeSecurityConfiguration? Configuration { get; set; } +#nullable restore +#else + public global::GitHub.Models.CodeSecurityConfiguration Configuration { get; set; } +#endif + /// Specifies which types of repository this security configuration is applied to by default. + public global::GitHub.Enterprises.Item.CodeSecurity.Configurations.Item.Defaults.DefaultsPutResponse_default_for_new_repos? DefaultForNewRepos { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public DefaultsPutResponse() + { + 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.Enterprises.Item.CodeSecurity.Configurations.Item.Defaults.DefaultsPutResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::GitHub.Enterprises.Item.CodeSecurity.Configurations.Item.Defaults.DefaultsPutResponse(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "configuration", n => { Configuration = n.GetObjectValue(global::GitHub.Models.CodeSecurityConfiguration.CreateFromDiscriminatorValue); } }, + { "default_for_new_repos", n => { DefaultForNewRepos = n.GetEnumValue(); } }, + }; + } + /// + /// 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.WriteObjectValue("configuration", Configuration); + writer.WriteEnumValue("default_for_new_repos", DefaultForNewRepos); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/GitHub/Enterprises/Item/CodeSecurity/Configurations/Item/Defaults/DefaultsPutResponse_default_for_new_repos.cs b/src/GitHub/Enterprises/Item/CodeSecurity/Configurations/Item/Defaults/DefaultsPutResponse_default_for_new_repos.cs new file mode 100644 index 00000000..fb661cfc --- /dev/null +++ b/src/GitHub/Enterprises/Item/CodeSecurity/Configurations/Item/Defaults/DefaultsPutResponse_default_for_new_repos.cs @@ -0,0 +1,27 @@ +// +using System.Runtime.Serialization; +using System; +namespace GitHub.Enterprises.Item.CodeSecurity.Configurations.Item.Defaults +{ + /// Specifies which types of repository this security configuration is applied to by default. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.19.0")] + public enum DefaultsPutResponse_default_for_new_repos + { + [EnumMember(Value = "all")] + #pragma warning disable CS1591 + All, + #pragma warning restore CS1591 + [EnumMember(Value = "none")] + #pragma warning disable CS1591 + None, + #pragma warning restore CS1591 + [EnumMember(Value = "private_and_internal")] + #pragma warning disable CS1591 + Private_and_internal, + #pragma warning restore CS1591 + [EnumMember(Value = "public")] + #pragma warning disable CS1591 + Public, + #pragma warning restore CS1591 + } +} diff --git a/src/GitHub/Enterprises/Item/CodeSecurity/Configurations/Item/Defaults/DefaultsRequestBuilder.cs b/src/GitHub/Enterprises/Item/CodeSecurity/Configurations/Item/Defaults/DefaultsRequestBuilder.cs new file mode 100644 index 00000000..31f86a1e --- /dev/null +++ b/src/GitHub/Enterprises/Item/CodeSecurity/Configurations/Item/Defaults/DefaultsRequestBuilder.cs @@ -0,0 +1,97 @@ +// +#pragma warning disable CS0618 +using GitHub.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace GitHub.Enterprises.Item.CodeSecurity.Configurations.Item.Defaults +{ + /// + /// Builds and executes requests for operations under \enterprises\{enterprise}\code-security\configurations\{configuration_id}\defaults + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.19.0")] + public partial class DefaultsRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public DefaultsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/enterprises/{enterprise}/code-security/configurations/{configuration_id}/defaults", 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 DefaultsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/enterprises/{enterprise}/code-security/configurations/{configuration_id}/defaults", rawUrl) + { + } + /// + /// Sets a code security configuration as a default to be applied to new repositories in your enterprise.This configuration will be applied by default to the matching repository type when created, but only for organizations within the enterprise that do not already have a default code security configuration set.The authenticated user must be an administrator for the enterprise to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `admin:enterprise` scope to use this endpoint. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 403 status code + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PutAsync(global::GitHub.Enterprises.Item.CodeSecurity.Configurations.Item.Defaults.DefaultsPutRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PutAsync(global::GitHub.Enterprises.Item.CodeSecurity.Configurations.Item.Defaults.DefaultsPutRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPutRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "403", global::GitHub.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::GitHub.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::GitHub.Enterprises.Item.CodeSecurity.Configurations.Item.Defaults.DefaultsPutResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Sets a code security configuration as a default to be applied to new repositories in your enterprise.This configuration will be applied by default to the matching repository type when created, but only for organizations within the enterprise that do not already have a default code security configuration set.The authenticated user must be an administrator for the enterprise to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `admin:enterprise` scope to use this endpoint. + /// + /// A + /// The request body + /// 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.Enterprises.Item.CodeSecurity.Configurations.Item.Defaults.DefaultsPutRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPutRequestInformation(global::GitHub.Enterprises.Item.CodeSecurity.Configurations.Item.Defaults.DefaultsPutRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + 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 global::GitHub.Enterprises.Item.CodeSecurity.Configurations.Item.Defaults.DefaultsRequestBuilder WithUrl(string rawUrl) + { + return new global::GitHub.Enterprises.Item.CodeSecurity.Configurations.Item.Defaults.DefaultsRequestBuilder(rawUrl, RequestAdapter); + } + } +} +#pragma warning restore CS0618 diff --git a/src/GitHub/Enterprises/Item/CodeSecurity/Configurations/Item/Repositories/RepositoriesRequestBuilder.cs b/src/GitHub/Enterprises/Item/CodeSecurity/Configurations/Item/Repositories/RepositoriesRequestBuilder.cs new file mode 100644 index 00000000..b1ccafe8 --- /dev/null +++ b/src/GitHub/Enterprises/Item/CodeSecurity/Configurations/Item/Repositories/RepositoriesRequestBuilder.cs @@ -0,0 +1,133 @@ +// +#pragma warning disable CS0618 +using GitHub.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace GitHub.Enterprises.Item.CodeSecurity.Configurations.Item.Repositories +{ + /// + /// Builds and executes requests for operations under \enterprises\{enterprise}\code-security\configurations\{configuration_id}\repositories + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.19.0")] + public partial class RepositoriesRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public RepositoriesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/enterprises/{enterprise}/code-security/configurations/{configuration_id}/repositories{?after*,before*,per_page*,status*}", 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 RepositoriesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/enterprises/{enterprise}/code-security/configurations/{configuration_id}/repositories{?after*,before*,per_page*,status*}", rawUrl) + { + } + /// + /// Lists the repositories associated with an enterprise code security configuration in an organization.The authenticated user must be an administrator of the enterprise in order to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `read:enterprise` scope to use this endpoint. + /// API method documentation + /// + /// A List<global::GitHub.Models.CodeSecurityConfigurationRepositories> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 403 status code + /// 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> + { + { "403", global::GitHub.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::GitHub.Models.BasicError.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::GitHub.Models.CodeSecurityConfigurationRepositories.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// Lists the repositories associated with an enterprise code security configuration in an organization.The authenticated user must be an administrator of the enterprise in order to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `read:enterprise` scope to use this endpoint. + /// + /// 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 global::GitHub.Enterprises.Item.CodeSecurity.Configurations.Item.Repositories.RepositoriesRequestBuilder WithUrl(string rawUrl) + { + return new global::GitHub.Enterprises.Item.CodeSecurity.Configurations.Item.Repositories.RepositoriesRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Lists the repositories associated with an enterprise code security configuration in an organization.The authenticated user must be an administrator of the enterprise in order to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `read:enterprise` scope to use this endpoint. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.19.0")] + public partial class RepositoriesRequestBuilderGetQueryParameters + { + /// A cursor, as given in the [Link header](https://docs.github.com/enterprise-cloud@latest//rest/guides/using-pagination-in-the-rest-api#using-link-headers). If specified, the query only searches for results after this cursor. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("after")] + public string? After { get; set; } +#nullable restore +#else + [QueryParameter("after")] + public string After { get; set; } +#endif + /// A cursor, as given in the [Link header](https://docs.github.com/enterprise-cloud@latest//rest/guides/using-pagination-in-the-rest-api#using-link-headers). If specified, the query only searches for results before this cursor. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("before")] + public string? Before { get; set; } +#nullable restore +#else + [QueryParameter("before")] + public string Before { get; set; } +#endif + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + /// A comma-separated list of statuses. If specified, only repositories with these attachment statuses will be returned.Can be: `all`, `attached`, `attaching`, `removed`, `enforced`, `failed`, `updating`, `removed_by_enterprise` +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("status")] + public string? Status { get; set; } +#nullable restore +#else + [QueryParameter("status")] + public string Status { get; set; } +#endif + } + } +} +#pragma warning restore CS0618 diff --git a/src/GitHub/Enterprises/Item/CodeSecurity/Configurations/Item/WithConfiguration_ItemRequestBuilder.cs b/src/GitHub/Enterprises/Item/CodeSecurity/Configurations/Item/WithConfiguration_ItemRequestBuilder.cs new file mode 100644 index 00000000..c47667fe --- /dev/null +++ b/src/GitHub/Enterprises/Item/CodeSecurity/Configurations/Item/WithConfiguration_ItemRequestBuilder.cs @@ -0,0 +1,210 @@ +// +#pragma warning disable CS0618 +using GitHub.Enterprises.Item.CodeSecurity.Configurations.Item.Attach; +using GitHub.Enterprises.Item.CodeSecurity.Configurations.Item.Defaults; +using GitHub.Enterprises.Item.CodeSecurity.Configurations.Item.Repositories; +using GitHub.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace GitHub.Enterprises.Item.CodeSecurity.Configurations.Item +{ + /// + /// Builds and executes requests for operations under \enterprises\{enterprise}\code-security\configurations\{configuration_id} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.19.0")] + public partial class WithConfiguration_ItemRequestBuilder : BaseRequestBuilder + { + /// The attach property + public global::GitHub.Enterprises.Item.CodeSecurity.Configurations.Item.Attach.AttachRequestBuilder Attach + { + get => new global::GitHub.Enterprises.Item.CodeSecurity.Configurations.Item.Attach.AttachRequestBuilder(PathParameters, RequestAdapter); + } + /// The defaults property + public global::GitHub.Enterprises.Item.CodeSecurity.Configurations.Item.Defaults.DefaultsRequestBuilder Defaults + { + get => new global::GitHub.Enterprises.Item.CodeSecurity.Configurations.Item.Defaults.DefaultsRequestBuilder(PathParameters, RequestAdapter); + } + /// The repositories property + public global::GitHub.Enterprises.Item.CodeSecurity.Configurations.Item.Repositories.RepositoriesRequestBuilder Repositories + { + get => new global::GitHub.Enterprises.Item.CodeSecurity.Configurations.Item.Repositories.RepositoriesRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithConfiguration_ItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/enterprises/{enterprise}/code-security/configurations/{configuration_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 WithConfiguration_ItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/enterprises/{enterprise}/code-security/configurations/{configuration_id}", rawUrl) + { + } + /// + /// Deletes a code security configuration from an enterprise.Repositories attached to the configuration will retain their settings but will no longer be associated withthe configuration.The authenticated user must be an administrator for the enterprise to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `admin:enterprise` scope to use this endpoint. + /// API method documentation + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 403 status code + /// When receiving a 404 status code + /// When receiving a 409 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::GitHub.Models.BasicError.CreateFromDiscriminatorValue }, + { "403", global::GitHub.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::GitHub.Models.BasicError.CreateFromDiscriminatorValue }, + { "409", global::GitHub.Models.BasicError.CreateFromDiscriminatorValue }, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Gets a code security configuration available in an enterprise.The authenticated user must be an administrator of the enterprise in order to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `read:enterprise` scope to use this endpoint. + /// 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 403 status code + /// 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> + { + { "403", global::GitHub.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::GitHub.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::GitHub.Models.CodeSecurityConfiguration.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Updates a code security configuration in an enterprise.The authenticated user must be an administrator of the enterprise in order to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `admin:enterprise` scope to use this endpoint. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 403 status code + /// When receiving a 404 status code + /// When receiving a 409 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PatchAsync(global::GitHub.Enterprises.Item.CodeSecurity.Configurations.Item.WithConfiguration_PatchRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PatchAsync(global::GitHub.Enterprises.Item.CodeSecurity.Configurations.Item.WithConfiguration_PatchRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPatchRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "403", global::GitHub.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::GitHub.Models.BasicError.CreateFromDiscriminatorValue }, + { "409", global::GitHub.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::GitHub.Models.CodeSecurityConfiguration.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Deletes a code security configuration from an enterprise.Repositories attached to the configuration will retain their settings but will no longer be associated withthe configuration.The authenticated user must be an administrator for the enterprise to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `admin:enterprise` scope to use this endpoint. + /// + /// 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 ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json, application/scim+json"); + return requestInfo; + } + /// + /// Gets a code security configuration available in an enterprise.The authenticated user must be an administrator of the enterprise in order to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `read:enterprise` scope to use this endpoint. + /// + /// 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; + } + /// + /// Updates a code security configuration in an enterprise.The authenticated user must be an administrator of the enterprise in order to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `admin:enterprise` scope to use this endpoint. + /// + /// A + /// The request body + /// 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 ToPatchRequestInformation(global::GitHub.Enterprises.Item.CodeSecurity.Configurations.Item.WithConfiguration_PatchRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(global::GitHub.Enterprises.Item.CodeSecurity.Configurations.Item.WithConfiguration_PatchRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + 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 global::GitHub.Enterprises.Item.CodeSecurity.Configurations.Item.WithConfiguration_ItemRequestBuilder WithUrl(string rawUrl) + { + return new global::GitHub.Enterprises.Item.CodeSecurity.Configurations.Item.WithConfiguration_ItemRequestBuilder(rawUrl, RequestAdapter); + } + } +} +#pragma warning restore CS0618 diff --git a/src/GitHub/Enterprises/Item/CodeSecurity/Configurations/Item/WithConfiguration_PatchRequestBody.cs b/src/GitHub/Enterprises/Item/CodeSecurity/Configurations/Item/WithConfiguration_PatchRequestBody.cs new file mode 100644 index 00000000..44621a5a --- /dev/null +++ b/src/GitHub/Enterprises/Item/CodeSecurity/Configurations/Item/WithConfiguration_PatchRequestBody.cs @@ -0,0 +1,134 @@ +// +#pragma warning disable CS0618 +using GitHub.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace GitHub.Enterprises.Item.CodeSecurity.Configurations.Item +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.19.0")] + #pragma warning disable CS1591 + public partial class WithConfiguration_PatchRequestBody : IParsable + #pragma warning restore CS1591 + { + /// The enablement status of GitHub Advanced Security. Must be set to enabled if you want to enable any GHAS settings. + public global::GitHub.Enterprises.Item.CodeSecurity.Configurations.Item.WithConfiguration_PatchRequestBody_advanced_security? AdvancedSecurity { get; set; } + /// The enablement status of code scanning default setup + public global::GitHub.Enterprises.Item.CodeSecurity.Configurations.Item.WithConfiguration_PatchRequestBody_code_scanning_default_setup? CodeScanningDefaultSetup { get; set; } + /// Feature options for code scanning default setup +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::GitHub.Models.CodeScanningDefaultSetupOptions? CodeScanningDefaultSetupOptions { get; set; } +#nullable restore +#else + public global::GitHub.Models.CodeScanningDefaultSetupOptions CodeScanningDefaultSetupOptions { get; set; } +#endif + /// The enablement status of Dependabot alerts + public global::GitHub.Enterprises.Item.CodeSecurity.Configurations.Item.WithConfiguration_PatchRequestBody_dependabot_alerts? DependabotAlerts { get; set; } + /// The enablement status of Dependabot security updates + public global::GitHub.Enterprises.Item.CodeSecurity.Configurations.Item.WithConfiguration_PatchRequestBody_dependabot_security_updates? DependabotSecurityUpdates { get; set; } + /// The enablement status of Dependency Graph + public global::GitHub.Enterprises.Item.CodeSecurity.Configurations.Item.WithConfiguration_PatchRequestBody_dependency_graph? DependencyGraph { get; set; } + /// The enablement status of Automatic dependency submission + public global::GitHub.Enterprises.Item.CodeSecurity.Configurations.Item.WithConfiguration_PatchRequestBody_dependency_graph_autosubmit_action? DependencyGraphAutosubmitAction { get; set; } + /// Feature options for Automatic dependency submission +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::GitHub.Enterprises.Item.CodeSecurity.Configurations.Item.WithConfiguration_PatchRequestBody_dependency_graph_autosubmit_action_options? DependencyGraphAutosubmitActionOptions { get; set; } +#nullable restore +#else + public global::GitHub.Enterprises.Item.CodeSecurity.Configurations.Item.WithConfiguration_PatchRequestBody_dependency_graph_autosubmit_action_options DependencyGraphAutosubmitActionOptions { get; set; } +#endif + /// A description of the code security configuration +#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 enforcement status for a security configuration + public global::GitHub.Enterprises.Item.CodeSecurity.Configurations.Item.WithConfiguration_PatchRequestBody_enforcement? Enforcement { get; set; } + /// The name of the code security configuration. Must be unique across the enterprise. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// The enablement status of private vulnerability reporting + public global::GitHub.Enterprises.Item.CodeSecurity.Configurations.Item.WithConfiguration_PatchRequestBody_private_vulnerability_reporting? PrivateVulnerabilityReporting { get; set; } + /// The enablement status of secret scanning + public global::GitHub.Enterprises.Item.CodeSecurity.Configurations.Item.WithConfiguration_PatchRequestBody_secret_scanning? SecretScanning { get; set; } + /// The enablement status of secret scanning non-provider patterns + public global::GitHub.Enterprises.Item.CodeSecurity.Configurations.Item.WithConfiguration_PatchRequestBody_secret_scanning_non_provider_patterns? SecretScanningNonProviderPatterns { get; set; } + /// The enablement status of secret scanning push protection + public global::GitHub.Enterprises.Item.CodeSecurity.Configurations.Item.WithConfiguration_PatchRequestBody_secret_scanning_push_protection? SecretScanningPushProtection { get; set; } + /// The enablement status of secret scanning validity checks + public global::GitHub.Enterprises.Item.CodeSecurity.Configurations.Item.WithConfiguration_PatchRequestBody_secret_scanning_validity_checks? SecretScanningValidityChecks { get; set; } + /// + /// 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.Enterprises.Item.CodeSecurity.Configurations.Item.WithConfiguration_PatchRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::GitHub.Enterprises.Item.CodeSecurity.Configurations.Item.WithConfiguration_PatchRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "advanced_security", n => { AdvancedSecurity = n.GetEnumValue(); } }, + { "code_scanning_default_setup", n => { CodeScanningDefaultSetup = n.GetEnumValue(); } }, + { "code_scanning_default_setup_options", n => { CodeScanningDefaultSetupOptions = n.GetObjectValue(global::GitHub.Models.CodeScanningDefaultSetupOptions.CreateFromDiscriminatorValue); } }, + { "dependabot_alerts", n => { DependabotAlerts = n.GetEnumValue(); } }, + { "dependabot_security_updates", n => { DependabotSecurityUpdates = n.GetEnumValue(); } }, + { "dependency_graph", n => { DependencyGraph = n.GetEnumValue(); } }, + { "dependency_graph_autosubmit_action", n => { DependencyGraphAutosubmitAction = n.GetEnumValue(); } }, + { "dependency_graph_autosubmit_action_options", n => { DependencyGraphAutosubmitActionOptions = n.GetObjectValue(global::GitHub.Enterprises.Item.CodeSecurity.Configurations.Item.WithConfiguration_PatchRequestBody_dependency_graph_autosubmit_action_options.CreateFromDiscriminatorValue); } }, + { "description", n => { Description = n.GetStringValue(); } }, + { "enforcement", n => { Enforcement = n.GetEnumValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "private_vulnerability_reporting", n => { PrivateVulnerabilityReporting = n.GetEnumValue(); } }, + { "secret_scanning", n => { SecretScanning = n.GetEnumValue(); } }, + { "secret_scanning_non_provider_patterns", n => { SecretScanningNonProviderPatterns = n.GetEnumValue(); } }, + { "secret_scanning_push_protection", n => { SecretScanningPushProtection = n.GetEnumValue(); } }, + { "secret_scanning_validity_checks", n => { SecretScanningValidityChecks = n.GetEnumValue(); } }, + }; + } + /// + /// 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.WriteEnumValue("advanced_security", AdvancedSecurity); + writer.WriteEnumValue("code_scanning_default_setup", CodeScanningDefaultSetup); + writer.WriteObjectValue("code_scanning_default_setup_options", CodeScanningDefaultSetupOptions); + writer.WriteEnumValue("dependabot_alerts", DependabotAlerts); + writer.WriteEnumValue("dependabot_security_updates", DependabotSecurityUpdates); + writer.WriteEnumValue("dependency_graph", DependencyGraph); + writer.WriteEnumValue("dependency_graph_autosubmit_action", DependencyGraphAutosubmitAction); + writer.WriteObjectValue("dependency_graph_autosubmit_action_options", DependencyGraphAutosubmitActionOptions); + writer.WriteStringValue("description", Description); + writer.WriteEnumValue("enforcement", Enforcement); + writer.WriteStringValue("name", Name); + writer.WriteEnumValue("private_vulnerability_reporting", PrivateVulnerabilityReporting); + writer.WriteEnumValue("secret_scanning", SecretScanning); + writer.WriteEnumValue("secret_scanning_non_provider_patterns", SecretScanningNonProviderPatterns); + writer.WriteEnumValue("secret_scanning_push_protection", SecretScanningPushProtection); + writer.WriteEnumValue("secret_scanning_validity_checks", SecretScanningValidityChecks); + } + } +} +#pragma warning restore CS0618 diff --git a/src/GitHub/Enterprises/Item/CodeSecurity/Configurations/Item/WithConfiguration_PatchRequestBody_advanced_security.cs b/src/GitHub/Enterprises/Item/CodeSecurity/Configurations/Item/WithConfiguration_PatchRequestBody_advanced_security.cs new file mode 100644 index 00000000..e79ae52f --- /dev/null +++ b/src/GitHub/Enterprises/Item/CodeSecurity/Configurations/Item/WithConfiguration_PatchRequestBody_advanced_security.cs @@ -0,0 +1,19 @@ +// +using System.Runtime.Serialization; +using System; +namespace GitHub.Enterprises.Item.CodeSecurity.Configurations.Item +{ + /// The enablement status of GitHub Advanced Security. Must be set to enabled if you want to enable any GHAS settings. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.19.0")] + public enum WithConfiguration_PatchRequestBody_advanced_security + { + [EnumMember(Value = "enabled")] + #pragma warning disable CS1591 + Enabled, + #pragma warning restore CS1591 + [EnumMember(Value = "disabled")] + #pragma warning disable CS1591 + Disabled, + #pragma warning restore CS1591 + } +} diff --git a/src/GitHub/Enterprises/Item/CodeSecurity/Configurations/Item/WithConfiguration_PatchRequestBody_code_scanning_default_setup.cs b/src/GitHub/Enterprises/Item/CodeSecurity/Configurations/Item/WithConfiguration_PatchRequestBody_code_scanning_default_setup.cs new file mode 100644 index 00000000..3eb984bb --- /dev/null +++ b/src/GitHub/Enterprises/Item/CodeSecurity/Configurations/Item/WithConfiguration_PatchRequestBody_code_scanning_default_setup.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace GitHub.Enterprises.Item.CodeSecurity.Configurations.Item +{ + /// The enablement status of code scanning default setup + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.19.0")] + public enum WithConfiguration_PatchRequestBody_code_scanning_default_setup + { + [EnumMember(Value = "enabled")] + #pragma warning disable CS1591 + Enabled, + #pragma warning restore CS1591 + [EnumMember(Value = "disabled")] + #pragma warning disable CS1591 + Disabled, + #pragma warning restore CS1591 + [EnumMember(Value = "not_set")] + #pragma warning disable CS1591 + Not_set, + #pragma warning restore CS1591 + } +} diff --git a/src/GitHub/Enterprises/Item/CodeSecurity/Configurations/Item/WithConfiguration_PatchRequestBody_dependabot_alerts.cs b/src/GitHub/Enterprises/Item/CodeSecurity/Configurations/Item/WithConfiguration_PatchRequestBody_dependabot_alerts.cs new file mode 100644 index 00000000..c9d9e2ca --- /dev/null +++ b/src/GitHub/Enterprises/Item/CodeSecurity/Configurations/Item/WithConfiguration_PatchRequestBody_dependabot_alerts.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace GitHub.Enterprises.Item.CodeSecurity.Configurations.Item +{ + /// The enablement status of Dependabot alerts + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.19.0")] + public enum WithConfiguration_PatchRequestBody_dependabot_alerts + { + [EnumMember(Value = "enabled")] + #pragma warning disable CS1591 + Enabled, + #pragma warning restore CS1591 + [EnumMember(Value = "disabled")] + #pragma warning disable CS1591 + Disabled, + #pragma warning restore CS1591 + [EnumMember(Value = "not_set")] + #pragma warning disable CS1591 + Not_set, + #pragma warning restore CS1591 + } +} diff --git a/src/GitHub/Enterprises/Item/CodeSecurity/Configurations/Item/WithConfiguration_PatchRequestBody_dependabot_security_updates.cs b/src/GitHub/Enterprises/Item/CodeSecurity/Configurations/Item/WithConfiguration_PatchRequestBody_dependabot_security_updates.cs new file mode 100644 index 00000000..60463fd1 --- /dev/null +++ b/src/GitHub/Enterprises/Item/CodeSecurity/Configurations/Item/WithConfiguration_PatchRequestBody_dependabot_security_updates.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace GitHub.Enterprises.Item.CodeSecurity.Configurations.Item +{ + /// The enablement status of Dependabot security updates + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.19.0")] + public enum WithConfiguration_PatchRequestBody_dependabot_security_updates + { + [EnumMember(Value = "enabled")] + #pragma warning disable CS1591 + Enabled, + #pragma warning restore CS1591 + [EnumMember(Value = "disabled")] + #pragma warning disable CS1591 + Disabled, + #pragma warning restore CS1591 + [EnumMember(Value = "not_set")] + #pragma warning disable CS1591 + Not_set, + #pragma warning restore CS1591 + } +} diff --git a/src/GitHub/Enterprises/Item/CodeSecurity/Configurations/Item/WithConfiguration_PatchRequestBody_dependency_graph.cs b/src/GitHub/Enterprises/Item/CodeSecurity/Configurations/Item/WithConfiguration_PatchRequestBody_dependency_graph.cs new file mode 100644 index 00000000..28545c5d --- /dev/null +++ b/src/GitHub/Enterprises/Item/CodeSecurity/Configurations/Item/WithConfiguration_PatchRequestBody_dependency_graph.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace GitHub.Enterprises.Item.CodeSecurity.Configurations.Item +{ + /// The enablement status of Dependency Graph + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.19.0")] + public enum WithConfiguration_PatchRequestBody_dependency_graph + { + [EnumMember(Value = "enabled")] + #pragma warning disable CS1591 + Enabled, + #pragma warning restore CS1591 + [EnumMember(Value = "disabled")] + #pragma warning disable CS1591 + Disabled, + #pragma warning restore CS1591 + [EnumMember(Value = "not_set")] + #pragma warning disable CS1591 + Not_set, + #pragma warning restore CS1591 + } +} diff --git a/src/GitHub/Enterprises/Item/CodeSecurity/Configurations/Item/WithConfiguration_PatchRequestBody_dependency_graph_autosubmit_action.cs b/src/GitHub/Enterprises/Item/CodeSecurity/Configurations/Item/WithConfiguration_PatchRequestBody_dependency_graph_autosubmit_action.cs new file mode 100644 index 00000000..3ab4e8d2 --- /dev/null +++ b/src/GitHub/Enterprises/Item/CodeSecurity/Configurations/Item/WithConfiguration_PatchRequestBody_dependency_graph_autosubmit_action.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace GitHub.Enterprises.Item.CodeSecurity.Configurations.Item +{ + /// The enablement status of Automatic dependency submission + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.19.0")] + public enum WithConfiguration_PatchRequestBody_dependency_graph_autosubmit_action + { + [EnumMember(Value = "enabled")] + #pragma warning disable CS1591 + Enabled, + #pragma warning restore CS1591 + [EnumMember(Value = "disabled")] + #pragma warning disable CS1591 + Disabled, + #pragma warning restore CS1591 + [EnumMember(Value = "not_set")] + #pragma warning disable CS1591 + Not_set, + #pragma warning restore CS1591 + } +} diff --git a/src/GitHub/Enterprises/Item/CodeSecurity/Configurations/Item/WithConfiguration_PatchRequestBody_dependency_graph_autosubmit_action_options.cs b/src/GitHub/Enterprises/Item/CodeSecurity/Configurations/Item/WithConfiguration_PatchRequestBody_dependency_graph_autosubmit_action_options.cs new file mode 100644 index 00000000..8528463d --- /dev/null +++ b/src/GitHub/Enterprises/Item/CodeSecurity/Configurations/Item/WithConfiguration_PatchRequestBody_dependency_graph_autosubmit_action_options.cs @@ -0,0 +1,60 @@ +// +#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.Enterprises.Item.CodeSecurity.Configurations.Item +{ + /// + /// Feature options for Automatic dependency submission + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.19.0")] + public partial class WithConfiguration_PatchRequestBody_dependency_graph_autosubmit_action_options : 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 to use runners labeled with 'dependency-submission' or standard GitHub runners. + public bool? LabeledRunners { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public WithConfiguration_PatchRequestBody_dependency_graph_autosubmit_action_options() + { + 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.Enterprises.Item.CodeSecurity.Configurations.Item.WithConfiguration_PatchRequestBody_dependency_graph_autosubmit_action_options CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::GitHub.Enterprises.Item.CodeSecurity.Configurations.Item.WithConfiguration_PatchRequestBody_dependency_graph_autosubmit_action_options(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "labeled_runners", n => { LabeledRunners = n.GetBoolValue(); } }, + }; + } + /// + /// 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.WriteBoolValue("labeled_runners", LabeledRunners); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/GitHub/Enterprises/Item/CodeSecurity/Configurations/Item/WithConfiguration_PatchRequestBody_enforcement.cs b/src/GitHub/Enterprises/Item/CodeSecurity/Configurations/Item/WithConfiguration_PatchRequestBody_enforcement.cs new file mode 100644 index 00000000..fc8fd8ad --- /dev/null +++ b/src/GitHub/Enterprises/Item/CodeSecurity/Configurations/Item/WithConfiguration_PatchRequestBody_enforcement.cs @@ -0,0 +1,19 @@ +// +using System.Runtime.Serialization; +using System; +namespace GitHub.Enterprises.Item.CodeSecurity.Configurations.Item +{ + /// The enforcement status for a security configuration + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.19.0")] + public enum WithConfiguration_PatchRequestBody_enforcement + { + [EnumMember(Value = "enforced")] + #pragma warning disable CS1591 + Enforced, + #pragma warning restore CS1591 + [EnumMember(Value = "unenforced")] + #pragma warning disable CS1591 + Unenforced, + #pragma warning restore CS1591 + } +} diff --git a/src/GitHub/Enterprises/Item/CodeSecurity/Configurations/Item/WithConfiguration_PatchRequestBody_private_vulnerability_reporting.cs b/src/GitHub/Enterprises/Item/CodeSecurity/Configurations/Item/WithConfiguration_PatchRequestBody_private_vulnerability_reporting.cs new file mode 100644 index 00000000..2e844d52 --- /dev/null +++ b/src/GitHub/Enterprises/Item/CodeSecurity/Configurations/Item/WithConfiguration_PatchRequestBody_private_vulnerability_reporting.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace GitHub.Enterprises.Item.CodeSecurity.Configurations.Item +{ + /// The enablement status of private vulnerability reporting + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.19.0")] + public enum WithConfiguration_PatchRequestBody_private_vulnerability_reporting + { + [EnumMember(Value = "enabled")] + #pragma warning disable CS1591 + Enabled, + #pragma warning restore CS1591 + [EnumMember(Value = "disabled")] + #pragma warning disable CS1591 + Disabled, + #pragma warning restore CS1591 + [EnumMember(Value = "not_set")] + #pragma warning disable CS1591 + Not_set, + #pragma warning restore CS1591 + } +} diff --git a/src/GitHub/Enterprises/Item/CodeSecurity/Configurations/Item/WithConfiguration_PatchRequestBody_secret_scanning.cs b/src/GitHub/Enterprises/Item/CodeSecurity/Configurations/Item/WithConfiguration_PatchRequestBody_secret_scanning.cs new file mode 100644 index 00000000..7e2f67dc --- /dev/null +++ b/src/GitHub/Enterprises/Item/CodeSecurity/Configurations/Item/WithConfiguration_PatchRequestBody_secret_scanning.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace GitHub.Enterprises.Item.CodeSecurity.Configurations.Item +{ + /// The enablement status of secret scanning + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.19.0")] + public enum WithConfiguration_PatchRequestBody_secret_scanning + { + [EnumMember(Value = "enabled")] + #pragma warning disable CS1591 + Enabled, + #pragma warning restore CS1591 + [EnumMember(Value = "disabled")] + #pragma warning disable CS1591 + Disabled, + #pragma warning restore CS1591 + [EnumMember(Value = "not_set")] + #pragma warning disable CS1591 + Not_set, + #pragma warning restore CS1591 + } +} diff --git a/src/GitHub/Enterprises/Item/CodeSecurity/Configurations/Item/WithConfiguration_PatchRequestBody_secret_scanning_non_provider_patterns.cs b/src/GitHub/Enterprises/Item/CodeSecurity/Configurations/Item/WithConfiguration_PatchRequestBody_secret_scanning_non_provider_patterns.cs new file mode 100644 index 00000000..977cdf15 --- /dev/null +++ b/src/GitHub/Enterprises/Item/CodeSecurity/Configurations/Item/WithConfiguration_PatchRequestBody_secret_scanning_non_provider_patterns.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace GitHub.Enterprises.Item.CodeSecurity.Configurations.Item +{ + /// The enablement status of secret scanning non-provider patterns + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.19.0")] + public enum WithConfiguration_PatchRequestBody_secret_scanning_non_provider_patterns + { + [EnumMember(Value = "enabled")] + #pragma warning disable CS1591 + Enabled, + #pragma warning restore CS1591 + [EnumMember(Value = "disabled")] + #pragma warning disable CS1591 + Disabled, + #pragma warning restore CS1591 + [EnumMember(Value = "not_set")] + #pragma warning disable CS1591 + Not_set, + #pragma warning restore CS1591 + } +} diff --git a/src/GitHub/Enterprises/Item/CodeSecurity/Configurations/Item/WithConfiguration_PatchRequestBody_secret_scanning_push_protection.cs b/src/GitHub/Enterprises/Item/CodeSecurity/Configurations/Item/WithConfiguration_PatchRequestBody_secret_scanning_push_protection.cs new file mode 100644 index 00000000..8155ccb0 --- /dev/null +++ b/src/GitHub/Enterprises/Item/CodeSecurity/Configurations/Item/WithConfiguration_PatchRequestBody_secret_scanning_push_protection.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace GitHub.Enterprises.Item.CodeSecurity.Configurations.Item +{ + /// The enablement status of secret scanning push protection + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.19.0")] + public enum WithConfiguration_PatchRequestBody_secret_scanning_push_protection + { + [EnumMember(Value = "enabled")] + #pragma warning disable CS1591 + Enabled, + #pragma warning restore CS1591 + [EnumMember(Value = "disabled")] + #pragma warning disable CS1591 + Disabled, + #pragma warning restore CS1591 + [EnumMember(Value = "not_set")] + #pragma warning disable CS1591 + Not_set, + #pragma warning restore CS1591 + } +} diff --git a/src/GitHub/Enterprises/Item/CodeSecurity/Configurations/Item/WithConfiguration_PatchRequestBody_secret_scanning_validity_checks.cs b/src/GitHub/Enterprises/Item/CodeSecurity/Configurations/Item/WithConfiguration_PatchRequestBody_secret_scanning_validity_checks.cs new file mode 100644 index 00000000..8b3a4846 --- /dev/null +++ b/src/GitHub/Enterprises/Item/CodeSecurity/Configurations/Item/WithConfiguration_PatchRequestBody_secret_scanning_validity_checks.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace GitHub.Enterprises.Item.CodeSecurity.Configurations.Item +{ + /// The enablement status of secret scanning validity checks + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.19.0")] + public enum WithConfiguration_PatchRequestBody_secret_scanning_validity_checks + { + [EnumMember(Value = "enabled")] + #pragma warning disable CS1591 + Enabled, + #pragma warning restore CS1591 + [EnumMember(Value = "disabled")] + #pragma warning disable CS1591 + Disabled, + #pragma warning restore CS1591 + [EnumMember(Value = "not_set")] + #pragma warning disable CS1591 + Not_set, + #pragma warning restore CS1591 + } +} diff --git a/src/GitHub/Enterprises/Item/Copilot/Billing/Seats/SeatsRequestBuilder.cs b/src/GitHub/Enterprises/Item/Copilot/Billing/Seats/SeatsRequestBuilder.cs index 1133d082..23a815d9 100644 --- a/src/GitHub/Enterprises/Item/Copilot/Billing/Seats/SeatsRequestBuilder.cs +++ b/src/GitHub/Enterprises/Item/Copilot/Billing/Seats/SeatsRequestBuilder.cs @@ -34,7 +34,7 @@ public SeatsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base { } /// - /// > [!NOTE]> This endpoint is in public preview and is subject to change.Lists all active Copilot seats across organizations or enterprise teams for an enterprise with a Copilot Business or Copilot Enterprise subscription.Users with access through multiple organizations or enterprise teams will only be counted toward `total_seats` once.For each organization or enterprise team which grants Copilot access to a user, a seat detail object will appear in the `seats` array.Only enterprise owners and billing managers can view assigned Copilot seats across their child organizations or enterprise teams.Personal access tokens (classic) need either the `manage_billing:copilot` or `read:enterprise` scopes to use this endpoint. + /// > [!NOTE]> This endpoint is in public preview and is subject to change.Lists all Copilot seats currently being billed for across organizations or enterprise teams for an enterprise with a Copilot Business or Copilot Enterprise subscription.Users with access through multiple organizations or enterprise teams will only be counted toward `total_seats` once.For each organization or enterprise team which grants Copilot access to a user, a seat detail object will appear in the `seats` array.Each seat object contains information about the assigned user's most recent Copilot activity. Users must havetelemetry enabled in their IDE for Copilot in the IDE activity to be reflected in `last_activity_at`. For more information about activity data,see "[Reviewing user activity data for Copilot in your organization](https://docs.github.com/enterprise-cloud@latest//copilot/managing-copilot/managing-github-copilot-in-your-organization/reviewing-activity-related-to-github-copilot-in-your-organization/reviewing-user-activity-data-for-copilot-in-your-organization)."Only enterprise owners and billing managers can view assigned Copilot seats across their child organizations or enterprise teams.Personal access tokens (classic) need either the `manage_billing:copilot` or `read:enterprise` scopes to use this endpoint. /// API method documentation /// /// A @@ -64,7 +64,7 @@ public SeatsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base return await RequestAdapter.SendAsync(requestInfo, global::GitHub.Enterprises.Item.Copilot.Billing.Seats.SeatsGetResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } /// - /// > [!NOTE]> This endpoint is in public preview and is subject to change.Lists all active Copilot seats across organizations or enterprise teams for an enterprise with a Copilot Business or Copilot Enterprise subscription.Users with access through multiple organizations or enterprise teams will only be counted toward `total_seats` once.For each organization or enterprise team which grants Copilot access to a user, a seat detail object will appear in the `seats` array.Only enterprise owners and billing managers can view assigned Copilot seats across their child organizations or enterprise teams.Personal access tokens (classic) need either the `manage_billing:copilot` or `read:enterprise` scopes to use this endpoint. + /// > [!NOTE]> This endpoint is in public preview and is subject to change.Lists all Copilot seats currently being billed for across organizations or enterprise teams for an enterprise with a Copilot Business or Copilot Enterprise subscription.Users with access through multiple organizations or enterprise teams will only be counted toward `total_seats` once.For each organization or enterprise team which grants Copilot access to a user, a seat detail object will appear in the `seats` array.Each seat object contains information about the assigned user's most recent Copilot activity. Users must havetelemetry enabled in their IDE for Copilot in the IDE activity to be reflected in `last_activity_at`. For more information about activity data,see "[Reviewing user activity data for Copilot in your organization](https://docs.github.com/enterprise-cloud@latest//copilot/managing-copilot/managing-github-copilot-in-your-organization/reviewing-activity-related-to-github-copilot-in-your-organization/reviewing-user-activity-data-for-copilot-in-your-organization)."Only enterprise owners and billing managers can view assigned Copilot seats across their child organizations or enterprise teams.Personal access tokens (classic) need either the `manage_billing:copilot` or `read:enterprise` scopes to use this endpoint. /// /// A /// Configuration for the request such as headers, query parameters, and middleware options. @@ -92,7 +92,7 @@ public RequestInformation ToGetRequestInformation(Action - /// > [!NOTE]> This endpoint is in public preview and is subject to change.Lists all active Copilot seats across organizations or enterprise teams for an enterprise with a Copilot Business or Copilot Enterprise subscription.Users with access through multiple organizations or enterprise teams will only be counted toward `total_seats` once.For each organization or enterprise team which grants Copilot access to a user, a seat detail object will appear in the `seats` array.Only enterprise owners and billing managers can view assigned Copilot seats across their child organizations or enterprise teams.Personal access tokens (classic) need either the `manage_billing:copilot` or `read:enterprise` scopes to use this endpoint. + /// > [!NOTE]> This endpoint is in public preview and is subject to change.Lists all Copilot seats currently being billed for across organizations or enterprise teams for an enterprise with a Copilot Business or Copilot Enterprise subscription.Users with access through multiple organizations or enterprise teams will only be counted toward `total_seats` once.For each organization or enterprise team which grants Copilot access to a user, a seat detail object will appear in the `seats` array.Each seat object contains information about the assigned user's most recent Copilot activity. Users must havetelemetry enabled in their IDE for Copilot in the IDE activity to be reflected in `last_activity_at`. For more information about activity data,see "[Reviewing user activity data for Copilot in your organization](https://docs.github.com/enterprise-cloud@latest//copilot/managing-copilot/managing-github-copilot-in-your-organization/reviewing-activity-related-to-github-copilot-in-your-organization/reviewing-user-activity-data-for-copilot-in-your-organization)."Only enterprise owners and billing managers can view assigned Copilot seats across their child organizations or enterprise teams.Personal access tokens (classic) need either the `manage_billing:copilot` or `read:enterprise` scopes to use this endpoint. /// [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.19.0")] public partial class SeatsRequestBuilderGetQueryParameters diff --git a/src/GitHub/Enterprises/Item/Copilot/Usage/UsageRequestBuilder.cs b/src/GitHub/Enterprises/Item/Copilot/Usage/UsageRequestBuilder.cs index a21ab20c..8708f246 100644 --- a/src/GitHub/Enterprises/Item/Copilot/Usage/UsageRequestBuilder.cs +++ b/src/GitHub/Enterprises/Item/Copilot/Usage/UsageRequestBuilder.cs @@ -34,7 +34,7 @@ public UsageRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base { } /// - /// > [!NOTE]> This endpoint is in public preview and is subject to change.You can use this endpoint to see a daily breakdown of aggregated usage metrics for Copilot completions and Copilot Chat in the IDEfor all users across organizations with access to Copilot within your enterprise, with a further breakdown of suggestions, acceptances,and number of active users by editor and language for each day. See the response schema tab for detailed metrics definitions.The response contains metrics for up to 28 days prior. Usage metrics are processed once per day for the previous day,and the response will only include data up until yesterday. In order for an end user to be counted towards these metrics,they must have telemetry enabled in their IDE.Only owners and billing managers can view Copilot usage metrics for the enterprise.OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `read:enterprise` scopes to use this endpoint. + /// > [!NOTE]> This endpoint is in public preview and is subject to change.You can use this endpoint to see a daily breakdown of aggregated usage metrics for Copilot completions and Copilot Chat in the IDEfor all users across organizations with access to Copilot within your enterprise, with a further breakdown of suggestions, acceptances,and number of active users by editor and language for each day. See the response schema tab for detailed metrics definitions.The response contains metrics for up to 28 days prior. Usage metrics are processed once per day for the previous day,and the response will only include data up until yesterday. In order for an end user to be counted towards these metrics,they must have telemetry enabled in their IDE.The time zone in the response is in UTC time, that means that the cutoff time for the "day" is UTC time.Only owners and billing managers can view Copilot usage metrics for the enterprise.OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `read:enterprise` scopes to use this endpoint. /// API method documentation /// /// A List<global::GitHub.Models.CopilotUsageMetrics> @@ -65,7 +65,7 @@ public UsageRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base return collectionResult?.AsList(); } /// - /// > [!NOTE]> This endpoint is in public preview and is subject to change.You can use this endpoint to see a daily breakdown of aggregated usage metrics for Copilot completions and Copilot Chat in the IDEfor all users across organizations with access to Copilot within your enterprise, with a further breakdown of suggestions, acceptances,and number of active users by editor and language for each day. See the response schema tab for detailed metrics definitions.The response contains metrics for up to 28 days prior. Usage metrics are processed once per day for the previous day,and the response will only include data up until yesterday. In order for an end user to be counted towards these metrics,they must have telemetry enabled in their IDE.Only owners and billing managers can view Copilot usage metrics for the enterprise.OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `read:enterprise` scopes to use this endpoint. + /// > [!NOTE]> This endpoint is in public preview and is subject to change.You can use this endpoint to see a daily breakdown of aggregated usage metrics for Copilot completions and Copilot Chat in the IDEfor all users across organizations with access to Copilot within your enterprise, with a further breakdown of suggestions, acceptances,and number of active users by editor and language for each day. See the response schema tab for detailed metrics definitions.The response contains metrics for up to 28 days prior. Usage metrics are processed once per day for the previous day,and the response will only include data up until yesterday. In order for an end user to be counted towards these metrics,they must have telemetry enabled in their IDE.The time zone in the response is in UTC time, that means that the cutoff time for the "day" is UTC time.Only owners and billing managers can view Copilot usage metrics for the enterprise.OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `read:enterprise` scopes to use this endpoint. /// /// A /// Configuration for the request such as headers, query parameters, and middleware options. @@ -93,7 +93,7 @@ public RequestInformation ToGetRequestInformation(Action - /// > [!NOTE]> This endpoint is in public preview and is subject to change.You can use this endpoint to see a daily breakdown of aggregated usage metrics for Copilot completions and Copilot Chat in the IDEfor all users across organizations with access to Copilot within your enterprise, with a further breakdown of suggestions, acceptances,and number of active users by editor and language for each day. See the response schema tab for detailed metrics definitions.The response contains metrics for up to 28 days prior. Usage metrics are processed once per day for the previous day,and the response will only include data up until yesterday. In order for an end user to be counted towards these metrics,they must have telemetry enabled in their IDE.Only owners and billing managers can view Copilot usage metrics for the enterprise.OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `read:enterprise` scopes to use this endpoint. + /// > [!NOTE]> This endpoint is in public preview and is subject to change.You can use this endpoint to see a daily breakdown of aggregated usage metrics for Copilot completions and Copilot Chat in the IDEfor all users across organizations with access to Copilot within your enterprise, with a further breakdown of suggestions, acceptances,and number of active users by editor and language for each day. See the response schema tab for detailed metrics definitions.The response contains metrics for up to 28 days prior. Usage metrics are processed once per day for the previous day,and the response will only include data up until yesterday. In order for an end user to be counted towards these metrics,they must have telemetry enabled in their IDE.The time zone in the response is in UTC time, that means that the cutoff time for the "day" is UTC time.Only owners and billing managers can view Copilot usage metrics for the enterprise.OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `read:enterprise` scopes to use this endpoint. /// [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.19.0")] public partial class UsageRequestBuilderGetQueryParameters diff --git a/src/GitHub/Enterprises/Item/Properties/PropertiesRequestBuilder.cs b/src/GitHub/Enterprises/Item/Properties/PropertiesRequestBuilder.cs new file mode 100644 index 00000000..a24e4bfe --- /dev/null +++ b/src/GitHub/Enterprises/Item/Properties/PropertiesRequestBuilder.cs @@ -0,0 +1,41 @@ +// +#pragma warning disable CS0618 +using GitHub.Enterprises.Item.Properties.Schema; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System; +namespace GitHub.Enterprises.Item.Properties +{ + /// + /// Builds and executes requests for operations under \enterprises\{enterprise}\properties + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.19.0")] + public partial class PropertiesRequestBuilder : BaseRequestBuilder + { + /// The schema property + public global::GitHub.Enterprises.Item.Properties.Schema.SchemaRequestBuilder Schema + { + get => new global::GitHub.Enterprises.Item.Properties.Schema.SchemaRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public PropertiesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/enterprises/{enterprise}/properties", 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 PropertiesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/enterprises/{enterprise}/properties", rawUrl) + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/GitHub/Enterprises/Item/Properties/Schema/Item/WithCustom_property_nameItemRequestBuilder.cs b/src/GitHub/Enterprises/Item/Properties/Schema/Item/WithCustom_property_nameItemRequestBuilder.cs new file mode 100644 index 00000000..a402374c --- /dev/null +++ b/src/GitHub/Enterprises/Item/Properties/Schema/Item/WithCustom_property_nameItemRequestBuilder.cs @@ -0,0 +1,186 @@ +// +#pragma warning disable CS0618 +using GitHub.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace GitHub.Enterprises.Item.Properties.Schema.Item +{ + /// + /// Builds and executes requests for operations under \enterprises\{enterprise}\properties\schema\{custom_property_name} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.19.0")] + public partial class WithCustom_property_nameItemRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithCustom_property_nameItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/enterprises/{enterprise}/properties/schema/{custom_property_name}", 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 WithCustom_property_nameItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/enterprises/{enterprise}/properties/schema/{custom_property_name}", rawUrl) + { + } + /// + /// > [!NOTE]> This endpoint is in public preview and is subject to change.Remove a custom property that is defined for an enterprise.To use this endpoint, the authenticated user must be an administrator for the enterprise. + /// API method documentation + /// + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 403 status code + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "403", global::GitHub.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::GitHub.Models.BasicError.CreateFromDiscriminatorValue }, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// > [!NOTE]> This endpoint is in public preview and is subject to change.Gets a custom property that is defined for an enterprise.Enterprise members can read these properties. + /// 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 403 status code + /// 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> + { + { "403", global::GitHub.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::GitHub.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::GitHub.Models.CustomProperty.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// > [!NOTE]> This endpoint is in public preview and is subject to change.Creates a new or updates an existing custom property that is defined for an enterprise.To use this endpoint, the authenticated user must be an administrator for the enterprise. + /// API method documentation + /// + /// A + /// Custom property set payload + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 403 status code + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PutAsync(global::GitHub.Models.CustomPropertySetPayload body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PutAsync(global::GitHub.Models.CustomPropertySetPayload body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPutRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "403", global::GitHub.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::GitHub.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::GitHub.Models.CustomProperty.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// > [!NOTE]> This endpoint is in public preview and is subject to change.Remove a custom property that is defined for an enterprise.To use this endpoint, the authenticated user must be an administrator for the enterprise. + /// + /// 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 ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// > [!NOTE]> This endpoint is in public preview and is subject to change.Gets a custom property that is defined for an enterprise.Enterprise members can read these properties. + /// + /// 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; + } + /// + /// > [!NOTE]> This endpoint is in public preview and is subject to change.Creates a new or updates an existing custom property that is defined for an enterprise.To use this endpoint, the authenticated user must be an administrator for the enterprise. + /// + /// A + /// Custom property set payload + /// 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.Models.CustomPropertySetPayload body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPutRequestInformation(global::GitHub.Models.CustomPropertySetPayload body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + 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 global::GitHub.Enterprises.Item.Properties.Schema.Item.WithCustom_property_nameItemRequestBuilder WithUrl(string rawUrl) + { + return new global::GitHub.Enterprises.Item.Properties.Schema.Item.WithCustom_property_nameItemRequestBuilder(rawUrl, RequestAdapter); + } + } +} +#pragma warning restore CS0618 diff --git a/src/GitHub/Enterprises/Item/Properties/Schema/SchemaPatchRequestBody.cs b/src/GitHub/Enterprises/Item/Properties/Schema/SchemaPatchRequestBody.cs new file mode 100644 index 00000000..89ecfa8e --- /dev/null +++ b/src/GitHub/Enterprises/Item/Properties/Schema/SchemaPatchRequestBody.cs @@ -0,0 +1,66 @@ +// +#pragma warning disable CS0618 +using GitHub.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace GitHub.Enterprises.Item.Properties.Schema +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.19.0")] + #pragma warning disable CS1591 + public partial class SchemaPatchRequestBody : 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 array of custom properties to create or update. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Properties { get; set; } +#nullable restore +#else + public List Properties { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public SchemaPatchRequestBody() + { + 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.Enterprises.Item.Properties.Schema.SchemaPatchRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::GitHub.Enterprises.Item.Properties.Schema.SchemaPatchRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "properties", n => { Properties = n.GetCollectionOfObjectValues(global::GitHub.Models.CustomProperty.CreateFromDiscriminatorValue)?.AsList(); } }, + }; + } + /// + /// 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.WriteCollectionOfObjectValues("properties", Properties); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/GitHub/Enterprises/Item/Properties/Schema/SchemaRequestBuilder.cs b/src/GitHub/Enterprises/Item/Properties/Schema/SchemaRequestBuilder.cs new file mode 100644 index 00000000..7a4abb83 --- /dev/null +++ b/src/GitHub/Enterprises/Item/Properties/Schema/SchemaRequestBuilder.cs @@ -0,0 +1,157 @@ +// +#pragma warning disable CS0618 +using GitHub.Enterprises.Item.Properties.Schema.Item; +using GitHub.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace GitHub.Enterprises.Item.Properties.Schema +{ + /// + /// Builds and executes requests for operations under \enterprises\{enterprise}\properties\schema + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.19.0")] + public partial class SchemaRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the GitHub.enterprises.item.properties.schema.item collection + /// The custom property name + /// A + public global::GitHub.Enterprises.Item.Properties.Schema.Item.WithCustom_property_nameItemRequestBuilder this[string position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("custom_property_name", position); + return new global::GitHub.Enterprises.Item.Properties.Schema.Item.WithCustom_property_nameItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public SchemaRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/enterprises/{enterprise}/properties/schema", 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 SchemaRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/enterprises/{enterprise}/properties/schema", rawUrl) + { + } + /// + /// > [!NOTE]> This endpoint is in public preview and is subject to change.Gets all custom properties defined for an enterprise.Enterprise members can read these properties. + /// API method documentation + /// + /// A List<global::GitHub.Models.CustomProperty> + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 403 status code + /// 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> + { + { "403", global::GitHub.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::GitHub.Models.BasicError.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::GitHub.Models.CustomProperty.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// > [!NOTE]> This endpoint is in public preview and is subject to change.Creates new or updates existing custom properties defined for an enterprise in a batch.To use this endpoint, the authenticated user must be an administrator for the enterprise. + /// API method documentation + /// + /// A List<global::GitHub.Models.CustomProperty> + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 403 status code + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task?> PatchAsync(global::GitHub.Enterprises.Item.Properties.Schema.SchemaPatchRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task> PatchAsync(global::GitHub.Enterprises.Item.Properties.Schema.SchemaPatchRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPatchRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "403", global::GitHub.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::GitHub.Models.BasicError.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::GitHub.Models.CustomProperty.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// > [!NOTE]> This endpoint is in public preview and is subject to change.Gets all custom properties defined for an enterprise.Enterprise members can read these properties. + /// + /// 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; + } + /// + /// > [!NOTE]> This endpoint is in public preview and is subject to change.Creates new or updates existing custom properties defined for an enterprise in a batch.To use this endpoint, the authenticated user must be an administrator for the enterprise. + /// + /// A + /// The request body + /// 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 ToPatchRequestInformation(global::GitHub.Enterprises.Item.Properties.Schema.SchemaPatchRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(global::GitHub.Enterprises.Item.Properties.Schema.SchemaPatchRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + 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 global::GitHub.Enterprises.Item.Properties.Schema.SchemaRequestBuilder WithUrl(string rawUrl) + { + return new global::GitHub.Enterprises.Item.Properties.Schema.SchemaRequestBuilder(rawUrl, RequestAdapter); + } + } +} +#pragma warning restore CS0618 diff --git a/src/GitHub/Enterprises/Item/Rulesets/Item/WithRuleset_ItemRequestBuilder.cs b/src/GitHub/Enterprises/Item/Rulesets/Item/WithRuleset_ItemRequestBuilder.cs new file mode 100644 index 00000000..855220b9 --- /dev/null +++ b/src/GitHub/Enterprises/Item/Rulesets/Item/WithRuleset_ItemRequestBuilder.cs @@ -0,0 +1,186 @@ +// +#pragma warning disable CS0618 +using GitHub.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace GitHub.Enterprises.Item.Rulesets.Item +{ + /// + /// Builds and executes requests for operations under \enterprises\{enterprise}\rulesets\{ruleset_id} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.19.0")] + public partial class WithRuleset_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 WithRuleset_ItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/enterprises/{enterprise}/rulesets/{ruleset_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 WithRuleset_ItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/enterprises/{enterprise}/rulesets/{ruleset_id}", rawUrl) + { + } + /// + /// Delete a ruleset for an enterprise. + /// API method documentation + /// + /// 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 + /// When receiving a 500 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToDeleteRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::GitHub.Models.BasicError.CreateFromDiscriminatorValue }, + { "500", global::GitHub.Models.BasicError.CreateFromDiscriminatorValue }, + }; + await RequestAdapter.SendNoContentAsync(requestInfo, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Get a repository ruleset for an enterprise.**Note:** To prevent leaking sensitive information, the `bypass_actors` property is only returned if the usermaking the API request has write access to the ruleset. + /// 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 + /// When receiving a 500 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", global::GitHub.Models.BasicError.CreateFromDiscriminatorValue }, + { "500", global::GitHub.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::GitHub.Models.RepositoryRuleset.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Update a ruleset for an enterprise. + /// API method documentation + /// + /// A + /// The request body + /// 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 + /// When receiving a 500 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PutAsync(global::GitHub.Enterprises.Item.Rulesets.Item.WithRuleset_PutRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PutAsync(global::GitHub.Enterprises.Item.Rulesets.Item.WithRuleset_PutRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPutRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::GitHub.Models.BasicError.CreateFromDiscriminatorValue }, + { "500", global::GitHub.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::GitHub.Models.RepositoryRuleset.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Delete a ruleset for an enterprise. + /// + /// 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 ToDeleteRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + return requestInfo; + } + /// + /// Get a repository ruleset for an enterprise.**Note:** To prevent leaking sensitive information, the `bypass_actors` property is only returned if the usermaking the API request has write access to the ruleset. + /// + /// 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; + } + /// + /// Update a ruleset for an enterprise. + /// + /// A + /// The request body + /// 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.Enterprises.Item.Rulesets.Item.WithRuleset_PutRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPutRequestInformation(global::GitHub.Enterprises.Item.Rulesets.Item.WithRuleset_PutRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PUT, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + 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 global::GitHub.Enterprises.Item.Rulesets.Item.WithRuleset_ItemRequestBuilder WithUrl(string rawUrl) + { + return new global::GitHub.Enterprises.Item.Rulesets.Item.WithRuleset_ItemRequestBuilder(rawUrl, RequestAdapter); + } + } +} +#pragma warning restore CS0618 diff --git a/src/GitHub/Enterprises/Item/Rulesets/Item/WithRuleset_PutRequestBody.cs b/src/GitHub/Enterprises/Item/Rulesets/Item/WithRuleset_PutRequestBody.cs new file mode 100644 index 00000000..e041a6ff --- /dev/null +++ b/src/GitHub/Enterprises/Item/Rulesets/Item/WithRuleset_PutRequestBody.cs @@ -0,0 +1,104 @@ +// +#pragma warning disable CS0618 +using GitHub.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace GitHub.Enterprises.Item.Rulesets.Item +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.19.0")] + #pragma warning disable CS1591 + public partial class WithRuleset_PutRequestBody : 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 actors that can bypass the rules in this ruleset +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? BypassActors { get; set; } +#nullable restore +#else + public List BypassActors { get; set; } +#endif + /// Conditions for an enterprise ruleset. The conditions object should contain either the `organization_id` or `organization_name` property and the `repository_name` or `repository_property` property. For branch and tag rulesets, the conditions object should also contain the `ref_name` property. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::GitHub.Models.EnterpriseRulesetConditions? Conditions { get; set; } +#nullable restore +#else + public global::GitHub.Models.EnterpriseRulesetConditions Conditions { get; set; } +#endif + /// The enforcement level of the ruleset. `evaluate` allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page. `evaluate` is not available for the `repository` target. + public global::GitHub.Models.RepositoryRuleEnforcement? Enforcement { get; set; } + /// The name of the ruleset. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// An array of rules within the ruleset. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Rules { get; set; } +#nullable restore +#else + public List Rules { get; set; } +#endif + /// The target of the ruleset + public global::GitHub.Enterprises.Item.Rulesets.Item.WithRuleset_PutRequestBody_target? Target { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public WithRuleset_PutRequestBody() + { + 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.Enterprises.Item.Rulesets.Item.WithRuleset_PutRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::GitHub.Enterprises.Item.Rulesets.Item.WithRuleset_PutRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "bypass_actors", n => { BypassActors = n.GetCollectionOfObjectValues(global::GitHub.Models.RepositoryRulesetBypassActor.CreateFromDiscriminatorValue)?.AsList(); } }, + { "conditions", n => { Conditions = n.GetObjectValue(global::GitHub.Models.EnterpriseRulesetConditions.CreateFromDiscriminatorValue); } }, + { "enforcement", n => { Enforcement = n.GetEnumValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "rules", n => { Rules = n.GetCollectionOfObjectValues(global::GitHub.Models.RepositoryRule.CreateFromDiscriminatorValue)?.AsList(); } }, + { "target", n => { Target = n.GetEnumValue(); } }, + }; + } + /// + /// 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.WriteCollectionOfObjectValues("bypass_actors", BypassActors); + writer.WriteObjectValue("conditions", Conditions); + writer.WriteEnumValue("enforcement", Enforcement); + writer.WriteStringValue("name", Name); + writer.WriteCollectionOfObjectValues("rules", Rules); + writer.WriteEnumValue("target", Target); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/GitHub/Enterprises/Item/Rulesets/Item/WithRuleset_PutRequestBody_target.cs b/src/GitHub/Enterprises/Item/Rulesets/Item/WithRuleset_PutRequestBody_target.cs new file mode 100644 index 00000000..1a46a109 --- /dev/null +++ b/src/GitHub/Enterprises/Item/Rulesets/Item/WithRuleset_PutRequestBody_target.cs @@ -0,0 +1,27 @@ +// +using System.Runtime.Serialization; +using System; +namespace GitHub.Enterprises.Item.Rulesets.Item +{ + /// The target of the ruleset + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.19.0")] + public enum WithRuleset_PutRequestBody_target + { + [EnumMember(Value = "branch")] + #pragma warning disable CS1591 + Branch, + #pragma warning restore CS1591 + [EnumMember(Value = "tag")] + #pragma warning disable CS1591 + Tag, + #pragma warning restore CS1591 + [EnumMember(Value = "push")] + #pragma warning disable CS1591 + Push, + #pragma warning restore CS1591 + [EnumMember(Value = "repository")] + #pragma warning disable CS1591 + Repository, + #pragma warning restore CS1591 + } +} diff --git a/src/GitHub/Enterprises/Item/Rulesets/RulesetsPostRequestBody.cs b/src/GitHub/Enterprises/Item/Rulesets/RulesetsPostRequestBody.cs new file mode 100644 index 00000000..0a2d0eeb --- /dev/null +++ b/src/GitHub/Enterprises/Item/Rulesets/RulesetsPostRequestBody.cs @@ -0,0 +1,105 @@ +// +#pragma warning disable CS0618 +using GitHub.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using System.Collections.Generic; +using System.IO; +using System; +namespace GitHub.Enterprises.Item.Rulesets +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.19.0")] + #pragma warning disable CS1591 + public partial class RulesetsPostRequestBody : 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 actors that can bypass the rules in this ruleset +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? BypassActors { get; set; } +#nullable restore +#else + public List BypassActors { get; set; } +#endif + /// Conditions for an enterprise ruleset. The conditions object should contain either the `organization_id` or `organization_name` property and the `repository_name` or `repository_property` property. For branch and tag rulesets, the conditions object should also contain the `ref_name` property. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::GitHub.Models.EnterpriseRulesetConditions? Conditions { get; set; } +#nullable restore +#else + public global::GitHub.Models.EnterpriseRulesetConditions Conditions { get; set; } +#endif + /// The enforcement level of the ruleset. `evaluate` allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page. `evaluate` is not available for the `repository` target. + public global::GitHub.Models.RepositoryRuleEnforcement? Enforcement { get; set; } + /// The name of the ruleset. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// An array of rules within the ruleset. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Rules { get; set; } +#nullable restore +#else + public List Rules { get; set; } +#endif + /// The target of the ruleset + public global::GitHub.Enterprises.Item.Rulesets.RulesetsPostRequestBody_target? Target { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public RulesetsPostRequestBody() + { + AdditionalData = new Dictionary(); + Target = global::GitHub.Enterprises.Item.Rulesets.RulesetsPostRequestBody_target.Branch; + } + /// + /// 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.Enterprises.Item.Rulesets.RulesetsPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::GitHub.Enterprises.Item.Rulesets.RulesetsPostRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "bypass_actors", n => { BypassActors = n.GetCollectionOfObjectValues(global::GitHub.Models.RepositoryRulesetBypassActor.CreateFromDiscriminatorValue)?.AsList(); } }, + { "conditions", n => { Conditions = n.GetObjectValue(global::GitHub.Models.EnterpriseRulesetConditions.CreateFromDiscriminatorValue); } }, + { "enforcement", n => { Enforcement = n.GetEnumValue(); } }, + { "name", n => { Name = n.GetStringValue(); } }, + { "rules", n => { Rules = n.GetCollectionOfObjectValues(global::GitHub.Models.RepositoryRule.CreateFromDiscriminatorValue)?.AsList(); } }, + { "target", n => { Target = n.GetEnumValue(); } }, + }; + } + /// + /// 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.WriteCollectionOfObjectValues("bypass_actors", BypassActors); + writer.WriteObjectValue("conditions", Conditions); + writer.WriteEnumValue("enforcement", Enforcement); + writer.WriteStringValue("name", Name); + writer.WriteCollectionOfObjectValues("rules", Rules); + writer.WriteEnumValue("target", Target); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/GitHub/Enterprises/Item/Rulesets/RulesetsPostRequestBody_target.cs b/src/GitHub/Enterprises/Item/Rulesets/RulesetsPostRequestBody_target.cs new file mode 100644 index 00000000..dbf26b06 --- /dev/null +++ b/src/GitHub/Enterprises/Item/Rulesets/RulesetsPostRequestBody_target.cs @@ -0,0 +1,27 @@ +// +using System.Runtime.Serialization; +using System; +namespace GitHub.Enterprises.Item.Rulesets +{ + /// The target of the ruleset + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.19.0")] + public enum RulesetsPostRequestBody_target + { + [EnumMember(Value = "branch")] + #pragma warning disable CS1591 + Branch, + #pragma warning restore CS1591 + [EnumMember(Value = "tag")] + #pragma warning disable CS1591 + Tag, + #pragma warning restore CS1591 + [EnumMember(Value = "push")] + #pragma warning disable CS1591 + Push, + #pragma warning restore CS1591 + [EnumMember(Value = "repository")] + #pragma warning disable CS1591 + Repository, + #pragma warning restore CS1591 + } +} diff --git a/src/GitHub/Enterprises/Item/Rulesets/RulesetsRequestBuilder.cs b/src/GitHub/Enterprises/Item/Rulesets/RulesetsRequestBuilder.cs new file mode 100644 index 00000000..4f0d7a5b --- /dev/null +++ b/src/GitHub/Enterprises/Item/Rulesets/RulesetsRequestBuilder.cs @@ -0,0 +1,110 @@ +// +#pragma warning disable CS0618 +using GitHub.Enterprises.Item.Rulesets.Item; +using GitHub.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace GitHub.Enterprises.Item.Rulesets +{ + /// + /// Builds and executes requests for operations under \enterprises\{enterprise}\rulesets + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.19.0")] + public partial class RulesetsRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the GitHub.enterprises.item.rulesets.item collection + /// The ID of the ruleset. + /// A + public global::GitHub.Enterprises.Item.Rulesets.Item.WithRuleset_ItemRequestBuilder this[int position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("ruleset_id", position); + return new global::GitHub.Enterprises.Item.Rulesets.Item.WithRuleset_ItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public RulesetsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/enterprises/{enterprise}/rulesets", 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 RulesetsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/enterprises/{enterprise}/rulesets", rawUrl) + { + } + /// + /// Create a repository ruleset for an enterprise. + /// API method documentation + /// + /// A + /// The request body + /// 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 + /// When receiving a 500 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(global::GitHub.Enterprises.Item.Rulesets.RulesetsPostRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(global::GitHub.Enterprises.Item.Rulesets.RulesetsPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "404", global::GitHub.Models.BasicError.CreateFromDiscriminatorValue }, + { "500", global::GitHub.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::GitHub.Models.RepositoryRuleset.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Create a repository ruleset for an enterprise. + /// + /// A + /// The request body + /// 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 ToPostRequestInformation(global::GitHub.Enterprises.Item.Rulesets.RulesetsPostRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::GitHub.Enterprises.Item.Rulesets.RulesetsPostRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + 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 global::GitHub.Enterprises.Item.Rulesets.RulesetsRequestBuilder WithUrl(string rawUrl) + { + return new global::GitHub.Enterprises.Item.Rulesets.RulesetsRequestBuilder(rawUrl, RequestAdapter); + } + } +} +#pragma warning restore CS0618 diff --git a/src/GitHub/Enterprises/Item/SecretScanning/Alerts/AlertsRequestBuilder.cs b/src/GitHub/Enterprises/Item/SecretScanning/Alerts/AlertsRequestBuilder.cs index 72342b44..f1cc9fbb 100644 --- a/src/GitHub/Enterprises/Item/SecretScanning/Alerts/AlertsRequestBuilder.cs +++ b/src/GitHub/Enterprises/Item/SecretScanning/Alerts/AlertsRequestBuilder.cs @@ -136,7 +136,7 @@ public partial class AlertsRequestBuilderGetQueryParameters [QueryParameter("resolution")] public string Resolution { get; set; } #endif - /// A comma-separated list of secret types to return. By default all secret types are returned.See "[Supported secret scanning patterns](https://docs.github.com/enterprise-cloud@latest//code-security/secret-scanning/introduction/supported-secret-scanning-patterns#supported-secrets)"for a complete list of secret types. + /// A comma-separated list of secret types to return. All default secret patterns are returned. To return experimental patterns, pass the token name(s) in the parameter. See "[Supported secret scanning patterns](https://docs.github.com/enterprise-cloud@latest//enterprise-cloud@latest/code-security/secret-scanning/introduction/supported-secret-scanning-patterns#supported-secrets)" for a complete list of secret types. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable [QueryParameter("secret_type")] diff --git a/src/GitHub/Enterprises/Item/Settings/Billing/Usage/UsageRequestBuilder.cs b/src/GitHub/Enterprises/Item/Settings/Billing/Usage/UsageRequestBuilder.cs index e4cc7517..9e7e396b 100644 --- a/src/GitHub/Enterprises/Item/Settings/Billing/Usage/UsageRequestBuilder.cs +++ b/src/GitHub/Enterprises/Item/Settings/Billing/Usage/UsageRequestBuilder.cs @@ -34,7 +34,7 @@ public UsageRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base { } /// - /// Gets a report of the total usage for an enterprise. To use this endpoint, you must be an administrator or billing manager of the enterprise.**Note:** This endpoint is only available to enterprises with access to the enhanced billing platform. For more information, see "[About the enhanced billing platform for enterprises](https://docs.github.com/enterprise-cloud@latest//billing/using-the-enhanced-billing-platform-for-enterprises/about-the-enhanced-billing-platform-for-enterprises#how-do-i-know-if-i-can-access-the-enhanced-billing-platform)." + /// Gets a report of usage by cost center for an enterprise. To use this endpoint, you must be an administrator or billing manager of the enterprise. By default this endpoint will return usage that does not have a cost center.**Note:** This endpoint is only available to enterprises with access to the enhanced billing platform. For more information, see "[About the enhanced billing platform for enterprises](https://docs.github.com/enterprise-cloud@latest//billing/using-the-enhanced-billing-platform-for-enterprises/about-the-enhanced-billing-platform-for-enterprises#how-do-i-know-if-i-can-access-the-enhanced-billing-platform)." /// API method documentation /// /// A @@ -64,7 +64,7 @@ public UsageRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base return await RequestAdapter.SendAsync(requestInfo, global::GitHub.Models.BillingUsageReport.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } /// - /// Gets a report of the total usage for an enterprise. To use this endpoint, you must be an administrator or billing manager of the enterprise.**Note:** This endpoint is only available to enterprises with access to the enhanced billing platform. For more information, see "[About the enhanced billing platform for enterprises](https://docs.github.com/enterprise-cloud@latest//billing/using-the-enhanced-billing-platform-for-enterprises/about-the-enhanced-billing-platform-for-enterprises#how-do-i-know-if-i-can-access-the-enhanced-billing-platform)." + /// Gets a report of usage by cost center for an enterprise. To use this endpoint, you must be an administrator or billing manager of the enterprise. By default this endpoint will return usage that does not have a cost center.**Note:** This endpoint is only available to enterprises with access to the enhanced billing platform. For more information, see "[About the enhanced billing platform for enterprises](https://docs.github.com/enterprise-cloud@latest//billing/using-the-enhanced-billing-platform-for-enterprises/about-the-enhanced-billing-platform-for-enterprises#how-do-i-know-if-i-can-access-the-enhanced-billing-platform)." /// /// A /// Configuration for the request such as headers, query parameters, and middleware options. @@ -92,12 +92,12 @@ public RequestInformation ToGetRequestInformation(Action - /// Gets a report of the total usage for an enterprise. To use this endpoint, you must be an administrator or billing manager of the enterprise.**Note:** This endpoint is only available to enterprises with access to the enhanced billing platform. For more information, see "[About the enhanced billing platform for enterprises](https://docs.github.com/enterprise-cloud@latest//billing/using-the-enhanced-billing-platform-for-enterprises/about-the-enhanced-billing-platform-for-enterprises#how-do-i-know-if-i-can-access-the-enhanced-billing-platform)." + /// Gets a report of usage by cost center for an enterprise. To use this endpoint, you must be an administrator or billing manager of the enterprise. By default this endpoint will return usage that does not have a cost center.**Note:** This endpoint is only available to enterprises with access to the enhanced billing platform. For more information, see "[About the enhanced billing platform for enterprises](https://docs.github.com/enterprise-cloud@latest//billing/using-the-enhanced-billing-platform-for-enterprises/about-the-enhanced-billing-platform-for-enterprises#how-do-i-know-if-i-can-access-the-enhanced-billing-platform)." /// [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.19.0")] public partial class UsageRequestBuilderGetQueryParameters { - /// The ID corresponding to a cost center. + /// The ID corresponding to a cost center. The default value is no cost center. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable [QueryParameter("cost_center_id")] @@ -116,7 +116,7 @@ public partial class UsageRequestBuilderGetQueryParameters /// If specified, only return results for a single month. The value of `month` is an integer between `1` and `12`. [QueryParameter("month")] public int? Month { get; set; } - /// If specified, only return results for a single year. The value of `year` is an integer with four digits representing a year. For example, `2023`. + /// If specified, only return results for a single year. The value of `year` is an integer with four digits representing a year. For example, `2024`. Default value is the current year. [QueryParameter("year")] public int? Year { get; set; } } diff --git a/src/GitHub/Enterprises/Item/Team/Item/Copilot/Metrics/MetricsRequestBuilder.cs b/src/GitHub/Enterprises/Item/Team/Item/Copilot/Metrics/MetricsRequestBuilder.cs index a1a8bc03..362b1dfa 100644 --- a/src/GitHub/Enterprises/Item/Team/Item/Copilot/Metrics/MetricsRequestBuilder.cs +++ b/src/GitHub/Enterprises/Item/Team/Item/Copilot/Metrics/MetricsRequestBuilder.cs @@ -34,7 +34,7 @@ public MetricsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba { } /// - /// Use this endpoint to see a breakdown of aggregated metrics for various GitHub Copilot features. See the response schema tab for detailed metrics definitions.The response contains metrics for up to 28 days prior. Metrics are processed once per day for the previous day,and the response will only include data up until yesterday. In order for an end user to be counted towards these metrics,they must have telemetry enabled in their IDE.> [!NOTE]> This endpoint will only return results for a given day if the enterprise team had **five or more members with active Copilot licenses** on that day, as evaluated at the end of that day.To access this endpoint, the Copilot Metrics API access policy must be enabled or set to "no policy" for the enterprise within GitHub settings.Only owners and billing managers for the enterprise that contains the enterprise team can view Copilot metrics for the enterprise team.OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `read:enterprise` scopes to use this endpoint. + /// > [!NOTE]> This endpoint is only applicable to dedicated enterprise accounts for Copilot Business. See "[About enterprise accounts for Copilot Business](https://docs.github.com/enterprise-cloud@latest//admin/copilot-business-only/about-enterprise-accounts-for-copilot-business)."Use this endpoint to see a breakdown of aggregated metrics for various GitHub Copilot features. See the response schema tab for detailed metrics definitions.The response contains metrics for up to 28 days prior. Metrics are processed once per day for the previous day,and the response will only include data up until yesterday. In order for an end user to be counted towards these metrics,they must have telemetry enabled in their IDE.> [!NOTE]> This endpoint will only return results for a given day if the enterprise team had **five or more members with active Copilot licenses** on that day, as evaluated at the end of that day.To access this endpoint, the Copilot Metrics API access policy must be enabled or set to "no policy" for the enterprise within GitHub settings.Only owners and billing managers for the enterprise that contains the enterprise team can view Copilot metrics for the enterprise team.OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `read:enterprise` scopes to use this endpoint. /// API method documentation /// /// A List<global::GitHub.Models.CopilotUsageMetricsDay> @@ -65,7 +65,7 @@ public MetricsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba return collectionResult?.AsList(); } /// - /// Use this endpoint to see a breakdown of aggregated metrics for various GitHub Copilot features. See the response schema tab for detailed metrics definitions.The response contains metrics for up to 28 days prior. Metrics are processed once per day for the previous day,and the response will only include data up until yesterday. In order for an end user to be counted towards these metrics,they must have telemetry enabled in their IDE.> [!NOTE]> This endpoint will only return results for a given day if the enterprise team had **five or more members with active Copilot licenses** on that day, as evaluated at the end of that day.To access this endpoint, the Copilot Metrics API access policy must be enabled or set to "no policy" for the enterprise within GitHub settings.Only owners and billing managers for the enterprise that contains the enterprise team can view Copilot metrics for the enterprise team.OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `read:enterprise` scopes to use this endpoint. + /// > [!NOTE]> This endpoint is only applicable to dedicated enterprise accounts for Copilot Business. See "[About enterprise accounts for Copilot Business](https://docs.github.com/enterprise-cloud@latest//admin/copilot-business-only/about-enterprise-accounts-for-copilot-business)."Use this endpoint to see a breakdown of aggregated metrics for various GitHub Copilot features. See the response schema tab for detailed metrics definitions.The response contains metrics for up to 28 days prior. Metrics are processed once per day for the previous day,and the response will only include data up until yesterday. In order for an end user to be counted towards these metrics,they must have telemetry enabled in their IDE.> [!NOTE]> This endpoint will only return results for a given day if the enterprise team had **five or more members with active Copilot licenses** on that day, as evaluated at the end of that day.To access this endpoint, the Copilot Metrics API access policy must be enabled or set to "no policy" for the enterprise within GitHub settings.Only owners and billing managers for the enterprise that contains the enterprise team can view Copilot metrics for the enterprise team.OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `read:enterprise` scopes to use this endpoint. /// /// A /// Configuration for the request such as headers, query parameters, and middleware options. @@ -93,7 +93,7 @@ public RequestInformation ToGetRequestInformation(Action - /// Use this endpoint to see a breakdown of aggregated metrics for various GitHub Copilot features. See the response schema tab for detailed metrics definitions.The response contains metrics for up to 28 days prior. Metrics are processed once per day for the previous day,and the response will only include data up until yesterday. In order for an end user to be counted towards these metrics,they must have telemetry enabled in their IDE.> [!NOTE]> This endpoint will only return results for a given day if the enterprise team had **five or more members with active Copilot licenses** on that day, as evaluated at the end of that day.To access this endpoint, the Copilot Metrics API access policy must be enabled or set to "no policy" for the enterprise within GitHub settings.Only owners and billing managers for the enterprise that contains the enterprise team can view Copilot metrics for the enterprise team.OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `read:enterprise` scopes to use this endpoint. + /// > [!NOTE]> This endpoint is only applicable to dedicated enterprise accounts for Copilot Business. See "[About enterprise accounts for Copilot Business](https://docs.github.com/enterprise-cloud@latest//admin/copilot-business-only/about-enterprise-accounts-for-copilot-business)."Use this endpoint to see a breakdown of aggregated metrics for various GitHub Copilot features. See the response schema tab for detailed metrics definitions.The response contains metrics for up to 28 days prior. Metrics are processed once per day for the previous day,and the response will only include data up until yesterday. In order for an end user to be counted towards these metrics,they must have telemetry enabled in their IDE.> [!NOTE]> This endpoint will only return results for a given day if the enterprise team had **five or more members with active Copilot licenses** on that day, as evaluated at the end of that day.To access this endpoint, the Copilot Metrics API access policy must be enabled or set to "no policy" for the enterprise within GitHub settings.Only owners and billing managers for the enterprise that contains the enterprise team can view Copilot metrics for the enterprise team.OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `read:enterprise` scopes to use this endpoint. /// [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.19.0")] public partial class MetricsRequestBuilderGetQueryParameters diff --git a/src/GitHub/Enterprises/Item/Team/Item/Copilot/Usage/UsageRequestBuilder.cs b/src/GitHub/Enterprises/Item/Team/Item/Copilot/Usage/UsageRequestBuilder.cs index 53040917..e957ccee 100644 --- a/src/GitHub/Enterprises/Item/Team/Item/Copilot/Usage/UsageRequestBuilder.cs +++ b/src/GitHub/Enterprises/Item/Team/Item/Copilot/Usage/UsageRequestBuilder.cs @@ -34,7 +34,7 @@ public UsageRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base { } /// - /// > [!NOTE]> This endpoint is in public preview and is subject to change.You can use this endpoint to see a daily breakdown of aggregated usage metrics for Copilot completions and Copilot Chat in the IDEfor users within an enterprise team, with a further breakdown of suggestions, acceptances, and number of active users by editor and language for each day.See the response schema tab for detailed metrics definitions.The response contains metrics for up to 28 days prior. Usage metrics are processed once per day for the previous day,and the response will only include data up until yesterday. In order for an end user to be counted towards these metrics,they must have telemetry enabled in their IDE.> [!NOTE]> This endpoint will only return results for a given day if the enterprise team had five or more members with active Copilot licenses, as evaluated at the end of that day.Owners and billing managers for the enterprise that contains the enterprise team can view Copilot usage metrics for the enterprise team.OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `read:enterprise` scopes to use this endpoint. + /// > [!NOTE]> This endpoint is in public preview and is subject to change. This endpoint is only applicable to dedicated enterprise accounts for Copilot Business. See "[About enterprise accounts for Copilot Business](https://docs.github.com/enterprise-cloud@latest//admin/copilot-business-only/about-enterprise-accounts-for-copilot-business)."You can use this endpoint to see a daily breakdown of aggregated usage metrics for Copilot completions and Copilot Chat in the IDEfor users within an enterprise team, with a further breakdown of suggestions, acceptances, and number of active users by editor and language for each day.See the response schema tab for detailed metrics definitions.The response contains metrics for up to 28 days prior. Usage metrics are processed once per day for the previous day,and the response will only include data up until yesterday. In order for an end user to be counted towards these metrics,they must have telemetry enabled in their IDE.> [!NOTE]> This endpoint will only return results for a given day if the enterprise team had five or more members with active Copilot licenses, as evaluated at the end of that day.Owners and billing managers for the enterprise that contains the enterprise team can view Copilot usage metrics for the enterprise team.OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `read:enterprise` scopes to use this endpoint. /// API method documentation /// /// A List<global::GitHub.Models.CopilotUsageMetrics> @@ -65,7 +65,7 @@ public UsageRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base return collectionResult?.AsList(); } /// - /// > [!NOTE]> This endpoint is in public preview and is subject to change.You can use this endpoint to see a daily breakdown of aggregated usage metrics for Copilot completions and Copilot Chat in the IDEfor users within an enterprise team, with a further breakdown of suggestions, acceptances, and number of active users by editor and language for each day.See the response schema tab for detailed metrics definitions.The response contains metrics for up to 28 days prior. Usage metrics are processed once per day for the previous day,and the response will only include data up until yesterday. In order for an end user to be counted towards these metrics,they must have telemetry enabled in their IDE.> [!NOTE]> This endpoint will only return results for a given day if the enterprise team had five or more members with active Copilot licenses, as evaluated at the end of that day.Owners and billing managers for the enterprise that contains the enterprise team can view Copilot usage metrics for the enterprise team.OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `read:enterprise` scopes to use this endpoint. + /// > [!NOTE]> This endpoint is in public preview and is subject to change. This endpoint is only applicable to dedicated enterprise accounts for Copilot Business. See "[About enterprise accounts for Copilot Business](https://docs.github.com/enterprise-cloud@latest//admin/copilot-business-only/about-enterprise-accounts-for-copilot-business)."You can use this endpoint to see a daily breakdown of aggregated usage metrics for Copilot completions and Copilot Chat in the IDEfor users within an enterprise team, with a further breakdown of suggestions, acceptances, and number of active users by editor and language for each day.See the response schema tab for detailed metrics definitions.The response contains metrics for up to 28 days prior. Usage metrics are processed once per day for the previous day,and the response will only include data up until yesterday. In order for an end user to be counted towards these metrics,they must have telemetry enabled in their IDE.> [!NOTE]> This endpoint will only return results for a given day if the enterprise team had five or more members with active Copilot licenses, as evaluated at the end of that day.Owners and billing managers for the enterprise that contains the enterprise team can view Copilot usage metrics for the enterprise team.OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `read:enterprise` scopes to use this endpoint. /// /// A /// Configuration for the request such as headers, query parameters, and middleware options. @@ -93,7 +93,7 @@ public RequestInformation ToGetRequestInformation(Action - /// > [!NOTE]> This endpoint is in public preview and is subject to change.You can use this endpoint to see a daily breakdown of aggregated usage metrics for Copilot completions and Copilot Chat in the IDEfor users within an enterprise team, with a further breakdown of suggestions, acceptances, and number of active users by editor and language for each day.See the response schema tab for detailed metrics definitions.The response contains metrics for up to 28 days prior. Usage metrics are processed once per day for the previous day,and the response will only include data up until yesterday. In order for an end user to be counted towards these metrics,they must have telemetry enabled in their IDE.> [!NOTE]> This endpoint will only return results for a given day if the enterprise team had five or more members with active Copilot licenses, as evaluated at the end of that day.Owners and billing managers for the enterprise that contains the enterprise team can view Copilot usage metrics for the enterprise team.OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `read:enterprise` scopes to use this endpoint. + /// > [!NOTE]> This endpoint is in public preview and is subject to change. This endpoint is only applicable to dedicated enterprise accounts for Copilot Business. See "[About enterprise accounts for Copilot Business](https://docs.github.com/enterprise-cloud@latest//admin/copilot-business-only/about-enterprise-accounts-for-copilot-business)."You can use this endpoint to see a daily breakdown of aggregated usage metrics for Copilot completions and Copilot Chat in the IDEfor users within an enterprise team, with a further breakdown of suggestions, acceptances, and number of active users by editor and language for each day.See the response schema tab for detailed metrics definitions.The response contains metrics for up to 28 days prior. Usage metrics are processed once per day for the previous day,and the response will only include data up until yesterday. In order for an end user to be counted towards these metrics,they must have telemetry enabled in their IDE.> [!NOTE]> This endpoint will only return results for a given day if the enterprise team had five or more members with active Copilot licenses, as evaluated at the end of that day.Owners and billing managers for the enterprise that contains the enterprise team can view Copilot usage metrics for the enterprise team.OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `read:enterprise` scopes to use this endpoint. /// [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.19.0")] public partial class UsageRequestBuilderGetQueryParameters diff --git a/src/GitHub/Enterprises/Item/WithEnterpriseItemRequestBuilder.cs b/src/GitHub/Enterprises/Item/WithEnterpriseItemRequestBuilder.cs index 06c7f23a..5e8ff937 100644 --- a/src/GitHub/Enterprises/Item/WithEnterpriseItemRequestBuilder.cs +++ b/src/GitHub/Enterprises/Item/WithEnterpriseItemRequestBuilder.cs @@ -4,12 +4,15 @@ using GitHub.Enterprises.Item.Announcement; using GitHub.Enterprises.Item.AuditLog; using GitHub.Enterprises.Item.CodeScanning; +using GitHub.Enterprises.Item.CodeSecurity; using GitHub.Enterprises.Item.Code_security_and_analysis; using GitHub.Enterprises.Item.ConsumedLicenses; using GitHub.Enterprises.Item.Copilot; using GitHub.Enterprises.Item.Dependabot; using GitHub.Enterprises.Item.Item; using GitHub.Enterprises.Item.LicenseSyncStatus; +using GitHub.Enterprises.Item.Properties; +using GitHub.Enterprises.Item.Rulesets; using GitHub.Enterprises.Item.SecretScanning; using GitHub.Enterprises.Item.Settings; using GitHub.Enterprises.Item.Team; @@ -52,6 +55,11 @@ public partial class WithEnterpriseItemRequestBuilder : BaseRequestBuilder { get => new global::GitHub.Enterprises.Item.CodeScanning.CodeScanningRequestBuilder(PathParameters, RequestAdapter); } + /// The codeSecurity property + public global::GitHub.Enterprises.Item.CodeSecurity.CodeSecurityRequestBuilder CodeSecurity + { + get => new global::GitHub.Enterprises.Item.CodeSecurity.CodeSecurityRequestBuilder(PathParameters, RequestAdapter); + } /// The consumedLicenses property public global::GitHub.Enterprises.Item.ConsumedLicenses.ConsumedLicensesRequestBuilder ConsumedLicenses { @@ -72,6 +80,16 @@ public partial class WithEnterpriseItemRequestBuilder : BaseRequestBuilder { get => new global::GitHub.Enterprises.Item.LicenseSyncStatus.LicenseSyncStatusRequestBuilder(PathParameters, RequestAdapter); } + /// The properties property + public global::GitHub.Enterprises.Item.Properties.PropertiesRequestBuilder Properties + { + get => new global::GitHub.Enterprises.Item.Properties.PropertiesRequestBuilder(PathParameters, RequestAdapter); + } + /// The rulesets property + public global::GitHub.Enterprises.Item.Rulesets.RulesetsRequestBuilder Rulesets + { + get => new global::GitHub.Enterprises.Item.Rulesets.RulesetsRequestBuilder(PathParameters, RequestAdapter); + } /// The secretScanning property public global::GitHub.Enterprises.Item.SecretScanning.SecretScanningRequestBuilder SecretScanning { diff --git a/src/GitHub/Models/AmazonS3AccessKeysConfig.cs b/src/GitHub/Models/AmazonS3AccessKeysConfig.cs new file mode 100644 index 00000000..bcaec542 --- /dev/null +++ b/src/GitHub/Models/AmazonS3AccessKeysConfig.cs @@ -0,0 +1,110 @@ +// +#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 +{ + /// + /// Amazon S3 Access Keys Config for audit log streaming configuration. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.19.0")] + public partial class AmazonS3AccessKeysConfig : 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; } + /// Authentication Type for Amazon S3. + public global::GitHub.Models.AmazonS3AccessKeysConfig_authentication_type? AuthenticationType { get; set; } + /// Amazon S3 Bucket Name. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Bucket { get; set; } +#nullable restore +#else + public string Bucket { get; set; } +#endif + /// Encrypted AWS Access Key ID. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? EncryptedAccessKeyId { get; set; } +#nullable restore +#else + public string EncryptedAccessKeyId { get; set; } +#endif + /// Encrypted AWS Secret Key. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? EncryptedSecretKey { get; set; } +#nullable restore +#else + public string EncryptedSecretKey { get; set; } +#endif + /// Key ID obtained from the audit log stream key endpoint used to encrypt secrets. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? KeyId { get; set; } +#nullable restore +#else + public string KeyId { get; set; } +#endif + /// Amazon S3 Bucket Name. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Region { get; set; } +#nullable restore +#else + public string Region { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public AmazonS3AccessKeysConfig() + { + 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.AmazonS3AccessKeysConfig CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::GitHub.Models.AmazonS3AccessKeysConfig(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "authentication_type", n => { AuthenticationType = n.GetEnumValue(); } }, + { "bucket", n => { Bucket = n.GetStringValue(); } }, + { "encrypted_access_key_id", n => { EncryptedAccessKeyId = n.GetStringValue(); } }, + { "encrypted_secret_key", n => { EncryptedSecretKey = n.GetStringValue(); } }, + { "key_id", n => { KeyId = n.GetStringValue(); } }, + { "region", n => { Region = 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.WriteEnumValue("authentication_type", AuthenticationType); + writer.WriteStringValue("bucket", Bucket); + writer.WriteStringValue("encrypted_access_key_id", EncryptedAccessKeyId); + writer.WriteStringValue("encrypted_secret_key", EncryptedSecretKey); + writer.WriteStringValue("key_id", KeyId); + writer.WriteStringValue("region", Region); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/GitHub/Models/AmazonS3AccessKeysConfig_authentication_type.cs b/src/GitHub/Models/AmazonS3AccessKeysConfig_authentication_type.cs new file mode 100644 index 00000000..855bfcc2 --- /dev/null +++ b/src/GitHub/Models/AmazonS3AccessKeysConfig_authentication_type.cs @@ -0,0 +1,15 @@ +// +using System.Runtime.Serialization; +using System; +namespace GitHub.Models +{ + /// Authentication Type for Amazon S3. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.19.0")] + public enum AmazonS3AccessKeysConfig_authentication_type + { + [EnumMember(Value = "access_keys")] + #pragma warning disable CS1591 + Access_keys, + #pragma warning restore CS1591 + } +} diff --git a/src/GitHub/Models/AmazonS3OidcConfig.cs b/src/GitHub/Models/AmazonS3OidcConfig.cs new file mode 100644 index 00000000..22145de1 --- /dev/null +++ b/src/GitHub/Models/AmazonS3OidcConfig.cs @@ -0,0 +1,100 @@ +// +#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 +{ + /// + /// Amazon S3 OIDC Config for audit log streaming configuration. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.19.0")] + public partial class AmazonS3OidcConfig : 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 arn_role property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ArnRole { get; set; } +#nullable restore +#else + public string ArnRole { get; set; } +#endif + /// Authentication Type for Amazon S3. + public global::GitHub.Models.AmazonS3OidcConfig_authentication_type? AuthenticationType { get; set; } + /// Amazon S3 Bucket Name. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Bucket { get; set; } +#nullable restore +#else + public string Bucket { get; set; } +#endif + /// Key ID obtained from the audit log stream key endpoint used to encrypt secrets. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? KeyId { get; set; } +#nullable restore +#else + public string KeyId { get; set; } +#endif + /// AWS S3 Bucket Region. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Region { get; set; } +#nullable restore +#else + public string Region { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public AmazonS3OidcConfig() + { + 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.AmazonS3OidcConfig CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::GitHub.Models.AmazonS3OidcConfig(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "arn_role", n => { ArnRole = n.GetStringValue(); } }, + { "authentication_type", n => { AuthenticationType = n.GetEnumValue(); } }, + { "bucket", n => { Bucket = n.GetStringValue(); } }, + { "key_id", n => { KeyId = n.GetStringValue(); } }, + { "region", n => { Region = 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("arn_role", ArnRole); + writer.WriteEnumValue("authentication_type", AuthenticationType); + writer.WriteStringValue("bucket", Bucket); + writer.WriteStringValue("key_id", KeyId); + writer.WriteStringValue("region", Region); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/GitHub/Models/AmazonS3OidcConfig_authentication_type.cs b/src/GitHub/Models/AmazonS3OidcConfig_authentication_type.cs new file mode 100644 index 00000000..6a30abfb --- /dev/null +++ b/src/GitHub/Models/AmazonS3OidcConfig_authentication_type.cs @@ -0,0 +1,15 @@ +// +using System.Runtime.Serialization; +using System; +namespace GitHub.Models +{ + /// Authentication Type for Amazon S3. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.19.0")] + public enum AmazonS3OidcConfig_authentication_type + { + [EnumMember(Value = "oidc")] + #pragma warning disable CS1591 + Oidc, + #pragma warning restore CS1591 + } +} diff --git a/src/GitHub/Models/ApiOverview_domains.cs b/src/GitHub/Models/ApiOverview_domains.cs index 51f15c83..01c7e3d3 100644 --- a/src/GitHub/Models/ApiOverview_domains.cs +++ b/src/GitHub/Models/ApiOverview_domains.cs @@ -19,6 +19,14 @@ public partial class ApiOverview_domains : IAdditionalDataHolder, IParsable #nullable restore #else public List Actions { get; set; } +#endif + /// The actions_inbound property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::GitHub.Models.ApiOverview_domains_actions_inbound? ActionsInbound { get; set; } +#nullable restore +#else + public global::GitHub.Models.ApiOverview_domains_actions_inbound ActionsInbound { get; set; } #endif /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } @@ -88,6 +96,7 @@ public virtual IDictionary> GetFieldDeserializers() return new Dictionary> { { "actions", n => { Actions = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "actions_inbound", n => { ActionsInbound = n.GetObjectValue(global::GitHub.Models.ApiOverview_domains_actions_inbound.CreateFromDiscriminatorValue); } }, { "artifact_attestations", n => { ArtifactAttestations = n.GetObjectValue(global::GitHub.Models.ApiOverview_domains_artifact_attestations.CreateFromDiscriminatorValue); } }, { "codespaces", n => { Codespaces = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, { "copilot", n => { Copilot = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, @@ -103,6 +112,7 @@ public virtual void Serialize(ISerializationWriter writer) { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("actions", Actions); + writer.WriteObjectValue("actions_inbound", ActionsInbound); writer.WriteObjectValue("artifact_attestations", ArtifactAttestations); writer.WriteCollectionOfPrimitiveValues("codespaces", Codespaces); writer.WriteCollectionOfPrimitiveValues("copilot", Copilot); diff --git a/src/GitHub/Models/ApiOverview_domains_actions_inbound.cs b/src/GitHub/Models/ApiOverview_domains_actions_inbound.cs new file mode 100644 index 00000000..048a510b --- /dev/null +++ b/src/GitHub/Models/ApiOverview_domains_actions_inbound.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.19.0")] + #pragma warning disable CS1591 + public partial class ApiOverview_domains_actions_inbound : 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 full_domains property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? FullDomains { get; set; } +#nullable restore +#else + public List FullDomains { get; set; } +#endif + /// The wildcard_domains property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? WildcardDomains { get; set; } +#nullable restore +#else + public List WildcardDomains { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public ApiOverview_domains_actions_inbound() + { + 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.ApiOverview_domains_actions_inbound CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::GitHub.Models.ApiOverview_domains_actions_inbound(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "full_domains", n => { FullDomains = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "wildcard_domains", n => { WildcardDomains = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + }; + } + /// + /// 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("full_domains", FullDomains); + writer.WriteCollectionOfPrimitiveValues("wildcard_domains", WildcardDomains); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/GitHub/Models/AuditLogStreamKey.cs b/src/GitHub/Models/AuditLogStreamKey.cs new file mode 100644 index 00000000..f7b47ff0 --- /dev/null +++ b/src/GitHub/Models/AuditLogStreamKey.cs @@ -0,0 +1,76 @@ +// +#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 +{ + /// + /// Audit Log Streaming Public Key + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.19.0")] + public partial class AuditLogStreamKey : 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 key property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Key { get; set; } +#nullable restore +#else + public string Key { get; set; } +#endif + /// The key_id property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? KeyId { get; set; } +#nullable restore +#else + public string KeyId { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public AuditLogStreamKey() + { + 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.AuditLogStreamKey CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::GitHub.Models.AuditLogStreamKey(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "key", n => { Key = n.GetStringValue(); } }, + { "key_id", n => { KeyId = 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("key", Key); + writer.WriteStringValue("key_id", KeyId); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/GitHub/Models/AzureBlobConfig.cs b/src/GitHub/Models/AzureBlobConfig.cs new file mode 100644 index 00000000..a531a900 --- /dev/null +++ b/src/GitHub/Models/AzureBlobConfig.cs @@ -0,0 +1,76 @@ +// +#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 +{ + /// + /// Azure Blob Config for audit log streaming configuration. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.19.0")] + public partial class AzureBlobConfig : 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 encrypted_sas_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? EncryptedSasUrl { get; set; } +#nullable restore +#else + public string EncryptedSasUrl { get; set; } +#endif + /// Key ID obtained from the audit log stream key endpoint used to encrypt secrets. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? KeyId { get; set; } +#nullable restore +#else + public string KeyId { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public AzureBlobConfig() + { + 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.AzureBlobConfig CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::GitHub.Models.AzureBlobConfig(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "encrypted_sas_url", n => { EncryptedSasUrl = n.GetStringValue(); } }, + { "key_id", n => { KeyId = 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("encrypted_sas_url", EncryptedSasUrl); + writer.WriteStringValue("key_id", KeyId); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/GitHub/Models/AzureHubConfig.cs b/src/GitHub/Models/AzureHubConfig.cs new file mode 100644 index 00000000..780d4ae2 --- /dev/null +++ b/src/GitHub/Models/AzureHubConfig.cs @@ -0,0 +1,86 @@ +// +#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 +{ + /// + /// Azure Event Hubs Config for audit log streaming configuration. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.19.0")] + public partial class AzureHubConfig : 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; } + /// Encrypted Connection String for Azure Event Hubs +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? EncryptedConnstring { get; set; } +#nullable restore +#else + public string EncryptedConnstring { get; set; } +#endif + /// Key ID obtained from the audit log stream key endpoint used to encrypt secrets. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? KeyId { get; set; } +#nullable restore +#else + public string KeyId { get; set; } +#endif + /// Instance name of Azure Event Hubs +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public AzureHubConfig() + { + 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.AzureHubConfig CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::GitHub.Models.AzureHubConfig(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "encrypted_connstring", n => { EncryptedConnstring = n.GetStringValue(); } }, + { "key_id", n => { KeyId = n.GetStringValue(); } }, + { "name", n => { Name = 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("encrypted_connstring", EncryptedConnstring); + writer.WriteStringValue("key_id", KeyId); + writer.WriteStringValue("name", Name); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/GitHub/Models/BypassResponse.cs b/src/GitHub/Models/BypassResponse.cs new file mode 100644 index 00000000..a476e698 --- /dev/null +++ b/src/GitHub/Models/BypassResponse.cs @@ -0,0 +1,78 @@ +// +#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 response made by a delegated bypasser to a bypass request. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.19.0")] + public partial class BypassResponse : 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 date and time the response to the bypass request was created. + public DateTimeOffset? CreatedAt { get; set; } + /// The ID of the response to the bypass request. + public int? Id { get; set; } + /// The user who reviewed the bypass request. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::GitHub.Models.BypassResponse_reviewer? Reviewer { get; set; } +#nullable restore +#else + public global::GitHub.Models.BypassResponse_reviewer Reviewer { get; set; } +#endif + /// The response status to the bypass request until dismissed. + public global::GitHub.Models.BypassResponse_status? Status { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public BypassResponse() + { + 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.BypassResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::GitHub.Models.BypassResponse(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "created_at", n => { CreatedAt = n.GetDateTimeOffsetValue(); } }, + { "id", n => { Id = n.GetIntValue(); } }, + { "reviewer", n => { Reviewer = n.GetObjectValue(global::GitHub.Models.BypassResponse_reviewer.CreateFromDiscriminatorValue); } }, + { "status", n => { Status = n.GetEnumValue(); } }, + }; + } + /// + /// 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.WriteDateTimeOffsetValue("created_at", CreatedAt); + writer.WriteIntValue("id", Id); + writer.WriteObjectValue("reviewer", Reviewer); + writer.WriteEnumValue("status", Status); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/GitHub/Models/BypassResponse_reviewer.cs b/src/GitHub/Models/BypassResponse_reviewer.cs new file mode 100644 index 00000000..1445aa20 --- /dev/null +++ b/src/GitHub/Models/BypassResponse_reviewer.cs @@ -0,0 +1,70 @@ +// +#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 user who reviewed the bypass request. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.19.0")] + public partial class BypassResponse_reviewer : IAdditionalDataHolder, IParsable + { + /// The ID of the GitHub user who reviewed the bypass request. + public int? ActorId { get; set; } + /// The name of the GitHub user who reviewed the bypass request. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ActorName { get; set; } +#nullable restore +#else + public string ActorName { get; set; } +#endif + /// 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 BypassResponse_reviewer() + { + 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.BypassResponse_reviewer CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::GitHub.Models.BypassResponse_reviewer(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "actor_id", n => { ActorId = n.GetIntValue(); } }, + { "actor_name", n => { ActorName = 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.WriteIntValue("actor_id", ActorId); + writer.WriteStringValue("actor_name", ActorName); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/GitHub/Models/BypassResponse_status.cs b/src/GitHub/Models/BypassResponse_status.cs new file mode 100644 index 00000000..0fe721e6 --- /dev/null +++ b/src/GitHub/Models/BypassResponse_status.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace GitHub.Models +{ + /// The response status to the bypass request until dismissed. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.19.0")] + public enum BypassResponse_status + { + [EnumMember(Value = "approved")] + #pragma warning disable CS1591 + Approved, + #pragma warning restore CS1591 + [EnumMember(Value = "denied")] + #pragma warning disable CS1591 + Denied, + #pragma warning restore CS1591 + [EnumMember(Value = "dismissed")] + #pragma warning disable CS1591 + Dismissed, + #pragma warning restore CS1591 + } +} diff --git a/src/GitHub/Models/CodeScanningAutofix.cs b/src/GitHub/Models/CodeScanningAutofix.cs new file mode 100644 index 00000000..927432f4 --- /dev/null +++ b/src/GitHub/Models/CodeScanningAutofix.cs @@ -0,0 +1,72 @@ +// +#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.19.0")] + #pragma warning disable CS1591 + public partial class CodeScanningAutofix : 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 description of an autofix. +#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 start time of an autofix in ISO 8601 format: `YYYY-MM-DDTHH:MM:SSZ`. + public DateTimeOffset? StartedAt { get; private set; } + /// The status of an autofix. + public global::GitHub.Models.CodeScanningAutofixStatus? Status { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public CodeScanningAutofix() + { + 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.CodeScanningAutofix CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::GitHub.Models.CodeScanningAutofix(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "description", n => { Description = n.GetStringValue(); } }, + { "started_at", n => { StartedAt = n.GetDateTimeOffsetValue(); } }, + { "status", n => { Status = n.GetEnumValue(); } }, + }; + } + /// + /// 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("description", Description); + writer.WriteEnumValue("status", Status); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/GitHub/Models/CodeScanningAutofix503Error.cs b/src/GitHub/Models/CodeScanningAutofix503Error.cs new file mode 100644 index 00000000..99ebbd1e --- /dev/null +++ b/src/GitHub/Models/CodeScanningAutofix503Error.cs @@ -0,0 +1,88 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System; +namespace GitHub.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.19.0")] + #pragma warning disable CS1591 + public partial class CodeScanningAutofix503Error : ApiException, 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 code property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Code { get; set; } +#nullable restore +#else + public string Code { get; set; } +#endif + /// The documentation_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DocumentationUrl { get; set; } +#nullable restore +#else + public string DocumentationUrl { get; set; } +#endif + /// The primary error message. + public override string Message { get => MessageEscaped ?? string.Empty; } + /// The message property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? MessageEscaped { get; set; } +#nullable restore +#else + public string MessageEscaped { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public CodeScanningAutofix503Error() + { + 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.CodeScanningAutofix503Error CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::GitHub.Models.CodeScanningAutofix503Error(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "code", n => { Code = n.GetStringValue(); } }, + { "documentation_url", n => { DocumentationUrl = n.GetStringValue(); } }, + { "message", n => { MessageEscaped = 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("code", Code); + writer.WriteStringValue("documentation_url", DocumentationUrl); + writer.WriteStringValue("message", MessageEscaped); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/GitHub/Models/CodeScanningAutofixCommits.cs b/src/GitHub/Models/CodeScanningAutofixCommits.cs new file mode 100644 index 00000000..e016ee55 --- /dev/null +++ b/src/GitHub/Models/CodeScanningAutofixCommits.cs @@ -0,0 +1,76 @@ +// +#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 +{ + /// + /// Commit an autofix for a code scanning alert + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.19.0")] + public partial class CodeScanningAutofixCommits : 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; } + /// Commit message to be used. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Message { get; set; } +#nullable restore +#else + public string Message { get; set; } +#endif + /// The Git reference of target branch for the commit. Branch needs to already exist. For more information, see "[Git References](https://git-scm.com/book/en/v2/Git-Internals-Git-References)" in the Git documentation. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? TargetRef { get; set; } +#nullable restore +#else + public string TargetRef { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public CodeScanningAutofixCommits() + { + 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.CodeScanningAutofixCommits CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::GitHub.Models.CodeScanningAutofixCommits(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "message", n => { Message = n.GetStringValue(); } }, + { "target_ref", n => { TargetRef = 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("message", Message); + writer.WriteStringValue("target_ref", TargetRef); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/GitHub/Models/CodeScanningAutofixCommitsResponse.cs b/src/GitHub/Models/CodeScanningAutofixCommitsResponse.cs new file mode 100644 index 00000000..bfead7f3 --- /dev/null +++ b/src/GitHub/Models/CodeScanningAutofixCommitsResponse.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.19.0")] + #pragma warning disable CS1591 + public partial class CodeScanningAutofixCommitsResponse : 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; } + /// SHA of commit with autofix. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Sha { get; set; } +#nullable restore +#else + public string Sha { get; set; } +#endif + /// The Git reference of target branch for the commit. For more information, see "[Git References](https://git-scm.com/book/en/v2/Git-Internals-Git-References)" in the Git documentation. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? TargetRef { get; set; } +#nullable restore +#else + public string TargetRef { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public CodeScanningAutofixCommitsResponse() + { + 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.CodeScanningAutofixCommitsResponse CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::GitHub.Models.CodeScanningAutofixCommitsResponse(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "sha", n => { Sha = n.GetStringValue(); } }, + { "target_ref", n => { TargetRef = 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("sha", Sha); + writer.WriteStringValue("target_ref", TargetRef); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/GitHub/Models/CodeScanningAutofixCommitsResponse503Error.cs b/src/GitHub/Models/CodeScanningAutofixCommitsResponse503Error.cs new file mode 100644 index 00000000..267cc09c --- /dev/null +++ b/src/GitHub/Models/CodeScanningAutofixCommitsResponse503Error.cs @@ -0,0 +1,88 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System; +namespace GitHub.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.19.0")] + #pragma warning disable CS1591 + public partial class CodeScanningAutofixCommitsResponse503Error : ApiException, 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 code property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Code { get; set; } +#nullable restore +#else + public string Code { get; set; } +#endif + /// The documentation_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DocumentationUrl { get; set; } +#nullable restore +#else + public string DocumentationUrl { get; set; } +#endif + /// The primary error message. + public override string Message { get => MessageEscaped ?? string.Empty; } + /// The message property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? MessageEscaped { get; set; } +#nullable restore +#else + public string MessageEscaped { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public CodeScanningAutofixCommitsResponse503Error() + { + 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.CodeScanningAutofixCommitsResponse503Error CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::GitHub.Models.CodeScanningAutofixCommitsResponse503Error(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "code", n => { Code = n.GetStringValue(); } }, + { "documentation_url", n => { DocumentationUrl = n.GetStringValue(); } }, + { "message", n => { MessageEscaped = 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("code", Code); + writer.WriteStringValue("documentation_url", DocumentationUrl); + writer.WriteStringValue("message", MessageEscaped); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/GitHub/Models/CodeScanningAutofixStatus.cs b/src/GitHub/Models/CodeScanningAutofixStatus.cs new file mode 100644 index 00000000..9a86b2ba --- /dev/null +++ b/src/GitHub/Models/CodeScanningAutofixStatus.cs @@ -0,0 +1,27 @@ +// +using System.Runtime.Serialization; +using System; +namespace GitHub.Models +{ + /// The status of an autofix. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.19.0")] + public enum CodeScanningAutofixStatus + { + [EnumMember(Value = "pending")] + #pragma warning disable CS1591 + Pending, + #pragma warning restore CS1591 + [EnumMember(Value = "error")] + #pragma warning disable CS1591 + Error, + #pragma warning restore CS1591 + [EnumMember(Value = "success")] + #pragma warning disable CS1591 + Success, + #pragma warning restore CS1591 + [EnumMember(Value = "outdated")] + #pragma warning disable CS1591 + Outdated, + #pragma warning restore CS1591 + } +} diff --git a/src/GitHub/Models/CodeScanningDefaultSetupOptions.cs b/src/GitHub/Models/CodeScanningDefaultSetupOptions.cs new file mode 100644 index 00000000..4c228962 --- /dev/null +++ b/src/GitHub/Models/CodeScanningDefaultSetupOptions.cs @@ -0,0 +1,70 @@ +// +#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 +{ + /// + /// Feature options for code scanning default setup + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.19.0")] + public partial class CodeScanningDefaultSetupOptions : 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 label of the runner to use for code scanning default setup when runner_type is 'labeled'. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? RunnerLabel { get; set; } +#nullable restore +#else + public string RunnerLabel { get; set; } +#endif + /// Whether to use labeled runners or standard GitHub runners. + public global::GitHub.Models.CodeScanningDefaultSetupOptions_runner_type? RunnerType { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public CodeScanningDefaultSetupOptions() + { + 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.CodeScanningDefaultSetupOptions CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::GitHub.Models.CodeScanningDefaultSetupOptions(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "runner_label", n => { RunnerLabel = n.GetStringValue(); } }, + { "runner_type", n => { RunnerType = n.GetEnumValue(); } }, + }; + } + /// + /// 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("runner_label", RunnerLabel); + writer.WriteEnumValue("runner_type", RunnerType); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/GitHub/Models/CodeScanningDefaultSetupOptions_runner_type.cs b/src/GitHub/Models/CodeScanningDefaultSetupOptions_runner_type.cs new file mode 100644 index 00000000..b9e0aa19 --- /dev/null +++ b/src/GitHub/Models/CodeScanningDefaultSetupOptions_runner_type.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace GitHub.Models +{ + /// Whether to use labeled runners or standard GitHub runners. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.19.0")] + public enum CodeScanningDefaultSetupOptions_runner_type + { + [EnumMember(Value = "standard")] + #pragma warning disable CS1591 + Standard, + #pragma warning restore CS1591 + [EnumMember(Value = "labeled")] + #pragma warning disable CS1591 + Labeled, + #pragma warning restore CS1591 + [EnumMember(Value = "not_set")] + #pragma warning disable CS1591 + Not_set, + #pragma warning restore CS1591 + } +} diff --git a/src/GitHub/Models/CodeScanningDefaultSetupUpdate.cs b/src/GitHub/Models/CodeScanningDefaultSetupUpdate.cs index 5c5005fd..ad390fa5 100644 --- a/src/GitHub/Models/CodeScanningDefaultSetupUpdate.cs +++ b/src/GitHub/Models/CodeScanningDefaultSetupUpdate.cs @@ -23,6 +23,16 @@ public partial class CodeScanningDefaultSetupUpdate : IParsable #endif /// CodeQL query suite to be used. public global::GitHub.Models.CodeScanningDefaultSetupUpdate_query_suite? QuerySuite { get; set; } + /// Runner label to be used if the runner type is labeled. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? RunnerLabel { get; set; } +#nullable restore +#else + public string RunnerLabel { get; set; } +#endif + /// Runner type to be used. + public global::GitHub.Models.CodeScanningDefaultSetupUpdate_runner_type? RunnerType { get; set; } /// The desired state of code scanning default setup. public global::GitHub.Models.CodeScanningDefaultSetupUpdate_state? State { get; set; } /// @@ -45,6 +55,8 @@ public virtual IDictionary> GetFieldDeserializers() { { "languages", n => { Languages = n.GetCollectionOfEnumValues()?.AsList(); } }, { "query_suite", n => { QuerySuite = n.GetEnumValue(); } }, + { "runner_label", n => { RunnerLabel = n.GetStringValue(); } }, + { "runner_type", n => { RunnerType = n.GetEnumValue(); } }, { "state", n => { State = n.GetEnumValue(); } }, }; } @@ -57,6 +69,8 @@ public virtual void Serialize(ISerializationWriter writer) _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfEnumValues("languages", Languages); writer.WriteEnumValue("query_suite", QuerySuite); + writer.WriteStringValue("runner_label", RunnerLabel); + writer.WriteEnumValue("runner_type", RunnerType); writer.WriteEnumValue("state", State); } } diff --git a/src/GitHub/Models/CodeScanningDefaultSetupUpdate_runner_type.cs b/src/GitHub/Models/CodeScanningDefaultSetupUpdate_runner_type.cs new file mode 100644 index 00000000..33aa6392 --- /dev/null +++ b/src/GitHub/Models/CodeScanningDefaultSetupUpdate_runner_type.cs @@ -0,0 +1,19 @@ +// +using System.Runtime.Serialization; +using System; +namespace GitHub.Models +{ + /// Runner type to be used. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.19.0")] + public enum CodeScanningDefaultSetupUpdate_runner_type + { + [EnumMember(Value = "standard")] + #pragma warning disable CS1591 + Standard, + #pragma warning restore CS1591 + [EnumMember(Value = "labeled")] + #pragma warning disable CS1591 + Labeled, + #pragma warning restore CS1591 + } +} diff --git a/src/GitHub/Models/CodeSecurityConfiguration.cs b/src/GitHub/Models/CodeSecurityConfiguration.cs index 177642d6..a034c82c 100644 --- a/src/GitHub/Models/CodeSecurityConfiguration.cs +++ b/src/GitHub/Models/CodeSecurityConfiguration.cs @@ -19,6 +19,14 @@ public partial class CodeSecurityConfiguration : IAdditionalDataHolder, IParsabl public global::GitHub.Models.CodeSecurityConfiguration_advanced_security? AdvancedSecurity { get; set; } /// The enablement status of code scanning default setup public global::GitHub.Models.CodeSecurityConfiguration_code_scanning_default_setup? CodeScanningDefaultSetup { get; set; } + /// Feature options for code scanning default setup +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::GitHub.Models.CodeSecurityConfiguration_code_scanning_default_setup_options? CodeScanningDefaultSetupOptions { get; set; } +#nullable restore +#else + public global::GitHub.Models.CodeSecurityConfiguration_code_scanning_default_setup_options CodeScanningDefaultSetupOptions { get; set; } +#endif /// The created_at property public DateTimeOffset? CreatedAt { get; set; } /// The enablement status of Dependabot alerts @@ -124,6 +132,7 @@ public virtual IDictionary> GetFieldDeserializers() { { "advanced_security", n => { AdvancedSecurity = n.GetEnumValue(); } }, { "code_scanning_default_setup", n => { CodeScanningDefaultSetup = n.GetEnumValue(); } }, + { "code_scanning_default_setup_options", n => { CodeScanningDefaultSetupOptions = n.GetObjectValue(global::GitHub.Models.CodeSecurityConfiguration_code_scanning_default_setup_options.CreateFromDiscriminatorValue); } }, { "created_at", n => { CreatedAt = n.GetDateTimeOffsetValue(); } }, { "dependabot_alerts", n => { DependabotAlerts = n.GetEnumValue(); } }, { "dependabot_security_updates", n => { DependabotSecurityUpdates = n.GetEnumValue(); } }, @@ -156,6 +165,7 @@ public virtual void Serialize(ISerializationWriter writer) _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteEnumValue("advanced_security", AdvancedSecurity); writer.WriteEnumValue("code_scanning_default_setup", CodeScanningDefaultSetup); + writer.WriteObjectValue("code_scanning_default_setup_options", CodeScanningDefaultSetupOptions); writer.WriteDateTimeOffsetValue("created_at", CreatedAt); writer.WriteEnumValue("dependabot_alerts", DependabotAlerts); writer.WriteEnumValue("dependabot_security_updates", DependabotSecurityUpdates); diff --git a/src/GitHub/Models/CodeSecurityConfiguration_code_scanning_default_setup_options.cs b/src/GitHub/Models/CodeSecurityConfiguration_code_scanning_default_setup_options.cs new file mode 100644 index 00000000..78e965be --- /dev/null +++ b/src/GitHub/Models/CodeSecurityConfiguration_code_scanning_default_setup_options.cs @@ -0,0 +1,70 @@ +// +#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 +{ + /// + /// Feature options for code scanning default setup + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.19.0")] + public partial class CodeSecurityConfiguration_code_scanning_default_setup_options : 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 label of the runner to use for code scanning when runner_type is 'labeled'. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? RunnerLabel { get; set; } +#nullable restore +#else + public string RunnerLabel { get; set; } +#endif + /// Whether to use labeled runners or standard GitHub runners. + public global::GitHub.Models.CodeSecurityConfiguration_code_scanning_default_setup_options_runner_type? RunnerType { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public CodeSecurityConfiguration_code_scanning_default_setup_options() + { + 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.CodeSecurityConfiguration_code_scanning_default_setup_options CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::GitHub.Models.CodeSecurityConfiguration_code_scanning_default_setup_options(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "runner_label", n => { RunnerLabel = n.GetStringValue(); } }, + { "runner_type", n => { RunnerType = n.GetEnumValue(); } }, + }; + } + /// + /// 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("runner_label", RunnerLabel); + writer.WriteEnumValue("runner_type", RunnerType); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/GitHub/Models/CodeSecurityConfiguration_code_scanning_default_setup_options_runner_type.cs b/src/GitHub/Models/CodeSecurityConfiguration_code_scanning_default_setup_options_runner_type.cs new file mode 100644 index 00000000..1807b5ef --- /dev/null +++ b/src/GitHub/Models/CodeSecurityConfiguration_code_scanning_default_setup_options_runner_type.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace GitHub.Models +{ + /// Whether to use labeled runners or standard GitHub runners. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.19.0")] + public enum CodeSecurityConfiguration_code_scanning_default_setup_options_runner_type + { + [EnumMember(Value = "standard")] + #pragma warning disable CS1591 + Standard, + #pragma warning restore CS1591 + [EnumMember(Value = "labeled")] + #pragma warning disable CS1591 + Labeled, + #pragma warning restore CS1591 + [EnumMember(Value = "not_set")] + #pragma warning disable CS1591 + Not_set, + #pragma warning restore CS1591 + } +} diff --git a/src/GitHub/Models/CopilotDotcomChat_models.cs b/src/GitHub/Models/CopilotDotcomChat_models.cs index f2d79064..855770a5 100644 --- a/src/GitHub/Models/CopilotDotcomChat_models.cs +++ b/src/GitHub/Models/CopilotDotcomChat_models.cs @@ -24,7 +24,7 @@ public partial class CopilotDotcomChat_models : IAdditionalDataHolder, IParsable #endif /// Indicates whether a model is custom or default. public bool? IsCustomModel { get; set; } - /// Name of the language used for Copilot code completion suggestions, for the given editor. + /// Name of the model used for Copilot code completion suggestions. If the default model is used will appear as 'default'. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? Name { get; set; } diff --git a/src/GitHub/Models/CopilotDotcomPullRequests_repositories_models.cs b/src/GitHub/Models/CopilotDotcomPullRequests_repositories_models.cs index f28a3866..56e6acdb 100644 --- a/src/GitHub/Models/CopilotDotcomPullRequests_repositories_models.cs +++ b/src/GitHub/Models/CopilotDotcomPullRequests_repositories_models.cs @@ -24,7 +24,7 @@ public partial class CopilotDotcomPullRequests_repositories_models : IAdditional #endif /// Indicates whether a model is custom or default. public bool? IsCustomModel { get; set; } - /// Name of the language used for Copilot code completion suggestions, for the given editor. + /// Name of the model used for Copilot code completion suggestions. If the default model is used will appear as 'default'. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? Name { get; set; } diff --git a/src/GitHub/Models/CopilotIdeChat_editors_models.cs b/src/GitHub/Models/CopilotIdeChat_editors_models.cs index 4a6c7314..9be76add 100644 --- a/src/GitHub/Models/CopilotIdeChat_editors_models.cs +++ b/src/GitHub/Models/CopilotIdeChat_editors_models.cs @@ -24,7 +24,7 @@ public partial class CopilotIdeChat_editors_models : IAdditionalDataHolder, IPar #endif /// Indicates whether a model is custom or default. public bool? IsCustomModel { get; set; } - /// Name of the language used for Copilot code completion suggestions, for the given editor. + /// Name of the model used for Copilot code completion suggestions. If the default model is used will appear as 'default'. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? Name { get; set; } diff --git a/src/GitHub/Models/CopilotIdeCodeCompletions_editors_models.cs b/src/GitHub/Models/CopilotIdeCodeCompletions_editors_models.cs index 44ebc125..607b2c49 100644 --- a/src/GitHub/Models/CopilotIdeCodeCompletions_editors_models.cs +++ b/src/GitHub/Models/CopilotIdeCodeCompletions_editors_models.cs @@ -32,7 +32,7 @@ public partial class CopilotIdeCodeCompletions_editors_models : IAdditionalDataH #else public List Languages { get; set; } #endif - /// Name of the language used for Copilot code completion suggestions, for the given editor. + /// Name of the model used for Copilot code completion suggestions. If the default model is used will appear as 'default'. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public string? Name { get; set; } diff --git a/src/GitHub/Models/CopilotSeatDetails.cs b/src/GitHub/Models/CopilotSeatDetails.cs index 9a0a211d..e66fabbd 100644 --- a/src/GitHub/Models/CopilotSeatDetails.cs +++ b/src/GitHub/Models/CopilotSeatDetails.cs @@ -54,7 +54,8 @@ public partial class CopilotSeatDetails : IParsable public Date? PendingCancellationDate { get; set; } /// The Copilot plan of the organization, or the parent enterprise, when applicable. public global::GitHub.Models.CopilotSeatDetails_plan_type? PlanType { get; set; } - /// Timestamp of when the assignee's GitHub Copilot access was last updated, in ISO 8601 format. + /// **Closing down notice:** This field is no longer relevant and is closing down. Use the `created_at` field to determine when the assignee was last granted access to GitHub Copilot. Timestamp of when the assignee's GitHub Copilot access was last updated, in ISO 8601 format. + [Obsolete("")] public DateTimeOffset? UpdatedAt { get; set; } /// /// Creates a new instance of the appropriate class based on discriminator value diff --git a/src/GitHub/Models/CustomProperty.cs b/src/GitHub/Models/CustomProperty.cs index bec80963..9505689a 100644 --- a/src/GitHub/Models/CustomProperty.cs +++ b/src/GitHub/Models/CustomProperty.cs @@ -49,6 +49,8 @@ public partial class CustomProperty : IAdditionalDataHolder, IParsable #endif /// Whether the property is required. public bool? Required { get; set; } + /// The source type of the property + public global::GitHub.Models.CustomProperty_source_type? SourceType { get; set; } /// The URL that can be used to fetch, update, or delete info about this property via the API. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -91,6 +93,7 @@ public virtual IDictionary> GetFieldDeserializers() { "description", n => { Description = n.GetStringValue(); } }, { "property_name", n => { PropertyName = n.GetStringValue(); } }, { "required", n => { Required = n.GetBoolValue(); } }, + { "source_type", n => { SourceType = n.GetEnumValue(); } }, { "url", n => { Url = n.GetStringValue(); } }, { "value_type", n => { ValueType = n.GetEnumValue(); } }, { "values_editable_by", n => { ValuesEditableBy = n.GetEnumValue(); } }, @@ -108,6 +111,7 @@ public virtual void Serialize(ISerializationWriter writer) writer.WriteStringValue("description", Description); writer.WriteStringValue("property_name", PropertyName); writer.WriteBoolValue("required", Required); + writer.WriteEnumValue("source_type", SourceType); writer.WriteStringValue("url", Url); writer.WriteEnumValue("values_editable_by", ValuesEditableBy); writer.WriteEnumValue("value_type", ValueType); diff --git a/src/GitHub/Orgs/Item/Properties/Schema/Item/WithCustom_property_namePutRequestBody.cs b/src/GitHub/Models/CustomPropertySetPayload.cs similarity index 62% rename from src/GitHub/Orgs/Item/Properties/Schema/Item/WithCustom_property_namePutRequestBody.cs rename to src/GitHub/Models/CustomPropertySetPayload.cs index d7c3afc6..59f2e7b7 100644 --- a/src/GitHub/Orgs/Item/Properties/Schema/Item/WithCustom_property_namePutRequestBody.cs +++ b/src/GitHub/Models/CustomPropertySetPayload.cs @@ -5,12 +5,13 @@ using System.Collections.Generic; using System.IO; using System; -namespace GitHub.Orgs.Item.Properties.Schema.Item +namespace GitHub.Models { + /// + /// Custom property set payload + /// [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.19.0")] - #pragma warning disable CS1591 - public partial class WithCustom_property_namePutRequestBody : IAdditionalDataHolder, IParsable - #pragma warning restore CS1591 + public partial class CustomPropertySetPayload : 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; } @@ -25,10 +26,10 @@ public partial class WithCustom_property_namePutRequestBody : IAdditionalDataHol /// Default value of the property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public global::GitHub.Orgs.Item.Properties.Schema.Item.WithCustom_property_namePutRequestBody.WithCustom_property_namePutRequestBody_default_value? DefaultValue { get; set; } + public global::GitHub.Models.CustomPropertySetPayload.CustomPropertySetPayload_default_value? DefaultValue { get; set; } #nullable restore #else - public global::GitHub.Orgs.Item.Properties.Schema.Item.WithCustom_property_namePutRequestBody.WithCustom_property_namePutRequestBody_default_value DefaultValue { get; set; } + public global::GitHub.Models.CustomPropertySetPayload.CustomPropertySetPayload_default_value DefaultValue { get; set; } #endif /// Short description of the property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -41,23 +42,23 @@ public partial class WithCustom_property_namePutRequestBody : IAdditionalDataHol /// Whether the property is required. public bool? Required { get; set; } /// The type of the value for the property - public global::GitHub.Orgs.Item.Properties.Schema.Item.WithCustom_property_namePutRequestBody_value_type? ValueType { get; set; } + public global::GitHub.Models.CustomPropertySetPayload_value_type? ValueType { get; set; } /// - /// Instantiates a new and sets the default values. + /// Instantiates a new and sets the default values. /// - public WithCustom_property_namePutRequestBody() + public CustomPropertySetPayload() { 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.Orgs.Item.Properties.Schema.Item.WithCustom_property_namePutRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + public static global::GitHub.Models.CustomPropertySetPayload CreateFromDiscriminatorValue(IParseNode parseNode) { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); - return new global::GitHub.Orgs.Item.Properties.Schema.Item.WithCustom_property_namePutRequestBody(); + return new global::GitHub.Models.CustomPropertySetPayload(); } /// /// The deserialization information for the current model @@ -68,10 +69,10 @@ public virtual IDictionary> GetFieldDeserializers() return new Dictionary> { { "allowed_values", n => { AllowedValues = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, - { "default_value", n => { DefaultValue = n.GetObjectValue(global::GitHub.Orgs.Item.Properties.Schema.Item.WithCustom_property_namePutRequestBody.WithCustom_property_namePutRequestBody_default_value.CreateFromDiscriminatorValue); } }, + { "default_value", n => { DefaultValue = n.GetObjectValue(global::GitHub.Models.CustomPropertySetPayload.CustomPropertySetPayload_default_value.CreateFromDiscriminatorValue); } }, { "description", n => { Description = n.GetStringValue(); } }, { "required", n => { Required = n.GetBoolValue(); } }, - { "value_type", n => { ValueType = n.GetEnumValue(); } }, + { "value_type", n => { ValueType = n.GetEnumValue(); } }, }; } /// @@ -82,47 +83,47 @@ public virtual void Serialize(ISerializationWriter writer) { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteCollectionOfPrimitiveValues("allowed_values", AllowedValues); - writer.WriteObjectValue("default_value", DefaultValue); + writer.WriteObjectValue("default_value", DefaultValue); writer.WriteStringValue("description", Description); writer.WriteBoolValue("required", Required); - writer.WriteEnumValue("value_type", ValueType); + writer.WriteEnumValue("value_type", ValueType); writer.WriteAdditionalData(AdditionalData); } /// /// Composed type wrapper for classes , List<string> /// [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.19.0")] - public partial class WithCustom_property_namePutRequestBody_default_value : IComposedTypeWrapper, IParsable + public partial class CustomPropertySetPayload_default_value : IComposedTypeWrapper, IParsable { - /// Composed type representation for type List<string> + /// Composed type representation for type #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public List? String { get; set; } + public string? CustomPropertySetPayloadDefaultValueString { get; set; } #nullable restore #else - public List String { get; set; } + public string CustomPropertySetPayloadDefaultValueString { get; set; } #endif - /// Composed type representation for type + /// Composed type representation for type List<string> #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public string? WithCustomPropertyNamePutRequestBodyDefaultValueString { get; set; } + public List? String { get; set; } #nullable restore #else - public string WithCustomPropertyNamePutRequestBodyDefaultValueString { get; set; } + public List String { get; set; } #endif /// /// 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.Orgs.Item.Properties.Schema.Item.WithCustom_property_namePutRequestBody.WithCustom_property_namePutRequestBody_default_value CreateFromDiscriminatorValue(IParseNode parseNode) + public static global::GitHub.Models.CustomPropertySetPayload.CustomPropertySetPayload_default_value CreateFromDiscriminatorValue(IParseNode parseNode) { _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); var mappingValue = parseNode.GetChildNode("")?.GetStringValue(); - var result = new global::GitHub.Orgs.Item.Properties.Schema.Item.WithCustom_property_namePutRequestBody.WithCustom_property_namePutRequestBody_default_value(); - if(parseNode.GetStringValue() is string withCustomPropertyNamePutRequestBodyDefaultValueStringValue) + var result = new global::GitHub.Models.CustomPropertySetPayload.CustomPropertySetPayload_default_value(); + if(parseNode.GetStringValue() is string customPropertySetPayloadDefaultValueStringValue) { - result.WithCustomPropertyNamePutRequestBodyDefaultValueString = withCustomPropertyNamePutRequestBodyDefaultValueStringValue; + result.CustomPropertySetPayloadDefaultValueString = customPropertySetPayloadDefaultValueStringValue; } else if(parseNode.GetCollectionOfPrimitiveValues()?.AsList() is List stringValue) { @@ -145,9 +146,9 @@ public virtual IDictionary> GetFieldDeserializers() public virtual void Serialize(ISerializationWriter writer) { _ = writer ?? throw new ArgumentNullException(nameof(writer)); - if(WithCustomPropertyNamePutRequestBodyDefaultValueString != null) + if(CustomPropertySetPayloadDefaultValueString != null) { - writer.WriteStringValue(null, WithCustomPropertyNamePutRequestBodyDefaultValueString); + writer.WriteStringValue(null, CustomPropertySetPayloadDefaultValueString); } else if(String != null) { diff --git a/src/GitHub/Orgs/Item/Properties/Schema/Item/WithCustom_property_namePutRequestBody_value_type.cs b/src/GitHub/Models/CustomPropertySetPayload_value_type.cs similarity index 87% rename from src/GitHub/Orgs/Item/Properties/Schema/Item/WithCustom_property_namePutRequestBody_value_type.cs rename to src/GitHub/Models/CustomPropertySetPayload_value_type.cs index 8d43c3c0..fea35ed5 100644 --- a/src/GitHub/Orgs/Item/Properties/Schema/Item/WithCustom_property_namePutRequestBody_value_type.cs +++ b/src/GitHub/Models/CustomPropertySetPayload_value_type.cs @@ -1,11 +1,11 @@ // using System.Runtime.Serialization; using System; -namespace GitHub.Orgs.Item.Properties.Schema.Item +namespace GitHub.Models { /// The type of the value for the property [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.19.0")] - public enum WithCustom_property_namePutRequestBody_value_type + public enum CustomPropertySetPayload_value_type { [EnumMember(Value = "string")] #pragma warning disable CS1591 diff --git a/src/GitHub/Models/CustomProperty_source_type.cs b/src/GitHub/Models/CustomProperty_source_type.cs new file mode 100644 index 00000000..a5295d2d --- /dev/null +++ b/src/GitHub/Models/CustomProperty_source_type.cs @@ -0,0 +1,19 @@ +// +using System.Runtime.Serialization; +using System; +namespace GitHub.Models +{ + /// The source type of the property + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.19.0")] + public enum CustomProperty_source_type + { + [EnumMember(Value = "organization")] + #pragma warning disable CS1591 + Organization, + #pragma warning restore CS1591 + [EnumMember(Value = "enterprise")] + #pragma warning disable CS1591 + Enterprise, + #pragma warning restore CS1591 + } +} diff --git a/src/GitHub/Models/DatadogConfig.cs b/src/GitHub/Models/DatadogConfig.cs new file mode 100644 index 00000000..dc113c7c --- /dev/null +++ b/src/GitHub/Models/DatadogConfig.cs @@ -0,0 +1,80 @@ +// +#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 +{ + /// + /// Datadog Config for audit log streaming configuration. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.19.0")] + public partial class DatadogConfig : 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; } + /// Encrypted Splunk token. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? EncryptedToken { get; set; } +#nullable restore +#else + public string EncryptedToken { get; set; } +#endif + /// Key ID obtained from the audit log stream key endpoint used to encrypt secrets. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? KeyId { get; set; } +#nullable restore +#else + public string KeyId { get; set; } +#endif + /// Datadog Site to use. + public global::GitHub.Models.DatadogConfig_site? Site { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public DatadogConfig() + { + 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.DatadogConfig CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::GitHub.Models.DatadogConfig(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "encrypted_token", n => { EncryptedToken = n.GetStringValue(); } }, + { "key_id", n => { KeyId = n.GetStringValue(); } }, + { "site", n => { Site = n.GetEnumValue(); } }, + }; + } + /// + /// 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("encrypted_token", EncryptedToken); + writer.WriteStringValue("key_id", KeyId); + writer.WriteEnumValue("site", Site); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/GitHub/Models/DatadogConfig_site.cs b/src/GitHub/Models/DatadogConfig_site.cs new file mode 100644 index 00000000..366b4c42 --- /dev/null +++ b/src/GitHub/Models/DatadogConfig_site.cs @@ -0,0 +1,35 @@ +// +using System.Runtime.Serialization; +using System; +namespace GitHub.Models +{ + /// Datadog Site to use. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.19.0")] + public enum DatadogConfig_site + { + [EnumMember(Value = "US")] + #pragma warning disable CS1591 + US, + #pragma warning restore CS1591 + [EnumMember(Value = "US3")] + #pragma warning disable CS1591 + US3, + #pragma warning restore CS1591 + [EnumMember(Value = "US5")] + #pragma warning disable CS1591 + US5, + #pragma warning restore CS1591 + [EnumMember(Value = "EU1")] + #pragma warning disable CS1591 + EU1, + #pragma warning restore CS1591 + [EnumMember(Value = "US1-FED")] + #pragma warning disable CS1591 + US1FED, + #pragma warning restore CS1591 + [EnumMember(Value = "AP1")] + #pragma warning disable CS1591 + AP1, + #pragma warning restore CS1591 + } +} diff --git a/src/GitHub/Models/DependencyGraphSpdxSbom_sbom.cs b/src/GitHub/Models/DependencyGraphSpdxSbom_sbom.cs index 6a15b86f..ee63f458 100644 --- a/src/GitHub/Models/DependencyGraphSpdxSbom_sbom.cs +++ b/src/GitHub/Models/DependencyGraphSpdxSbom_sbom.cs @@ -14,6 +14,14 @@ public partial class DependencyGraphSpdxSbom_sbom : IAdditionalDataHolder, IPars { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } + /// An optional comment about the SPDX document. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Comment { get; set; } +#nullable restore +#else + public string Comment { get; set; } +#endif /// The creationInfo property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -29,14 +37,6 @@ public partial class DependencyGraphSpdxSbom_sbom : IAdditionalDataHolder, IPars #nullable restore #else public string DataLicense { get; set; } -#endif - /// The name of the repository that the SPDX document describes. -#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER -#nullable enable - public List? DocumentDescribes { get; set; } -#nullable restore -#else - public List DocumentDescribes { get; set; } #endif /// The namespace for the SPDX document. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -61,6 +61,14 @@ public partial class DependencyGraphSpdxSbom_sbom : IAdditionalDataHolder, IPars #nullable restore #else public List Packages { get; set; } +#endif + /// The relationships property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Relationships { get; set; } +#nullable restore +#else + public List Relationships { get; set; } #endif /// The SPDX identifier for the SPDX document. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -103,12 +111,13 @@ public virtual IDictionary> GetFieldDeserializers() { return new Dictionary> { + { "comment", n => { Comment = n.GetStringValue(); } }, { "creationInfo", n => { CreationInfo = n.GetObjectValue(global::GitHub.Models.DependencyGraphSpdxSbom_sbom_creationInfo.CreateFromDiscriminatorValue); } }, { "dataLicense", n => { DataLicense = n.GetStringValue(); } }, - { "documentDescribes", n => { DocumentDescribes = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, { "documentNamespace", n => { DocumentNamespace = n.GetStringValue(); } }, { "name", n => { Name = n.GetStringValue(); } }, { "packages", n => { Packages = n.GetCollectionOfObjectValues(global::GitHub.Models.DependencyGraphSpdxSbom_sbom_packages.CreateFromDiscriminatorValue)?.AsList(); } }, + { "relationships", n => { Relationships = n.GetCollectionOfObjectValues(global::GitHub.Models.DependencyGraphSpdxSbom_sbom_relationships.CreateFromDiscriminatorValue)?.AsList(); } }, { "SPDXID", n => { SPDXID = n.GetStringValue(); } }, { "spdxVersion", n => { SpdxVersion = n.GetStringValue(); } }, }; @@ -120,12 +129,13 @@ public virtual IDictionary> GetFieldDeserializers() public virtual void Serialize(ISerializationWriter writer) { _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteStringValue("comment", Comment); writer.WriteObjectValue("creationInfo", CreationInfo); writer.WriteStringValue("dataLicense", DataLicense); - writer.WriteCollectionOfPrimitiveValues("documentDescribes", DocumentDescribes); writer.WriteStringValue("documentNamespace", DocumentNamespace); writer.WriteStringValue("name", Name); writer.WriteCollectionOfObjectValues("packages", Packages); + writer.WriteCollectionOfObjectValues("relationships", Relationships); writer.WriteStringValue("SPDXID", SPDXID); writer.WriteStringValue("spdxVersion", SpdxVersion); writer.WriteAdditionalData(AdditionalData); diff --git a/src/GitHub/Models/DependencyGraphSpdxSbom_sbom_relationships.cs b/src/GitHub/Models/DependencyGraphSpdxSbom_sbom_relationships.cs new file mode 100644 index 00000000..735284d6 --- /dev/null +++ b/src/GitHub/Models/DependencyGraphSpdxSbom_sbom_relationships.cs @@ -0,0 +1,85 @@ +// +#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.19.0")] + #pragma warning disable CS1591 + public partial class DependencyGraphSpdxSbom_sbom_relationships : 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 SPDX identifier of the package that is the target of the relationship. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? RelatedSpdxElement { get; set; } +#nullable restore +#else + public string RelatedSpdxElement { get; set; } +#endif + /// The type of relationship between the two SPDX elements. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? RelationshipType { get; set; } +#nullable restore +#else + public string RelationshipType { get; set; } +#endif + /// The SPDX identifier of the package that is the source of the relationship. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? SpdxElementId { get; set; } +#nullable restore +#else + public string SpdxElementId { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public DependencyGraphSpdxSbom_sbom_relationships() + { + 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.DependencyGraphSpdxSbom_sbom_relationships CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::GitHub.Models.DependencyGraphSpdxSbom_sbom_relationships(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "relatedSpdxElement", n => { RelatedSpdxElement = n.GetStringValue(); } }, + { "relationshipType", n => { RelationshipType = n.GetStringValue(); } }, + { "spdxElementId", n => { SpdxElementId = 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("relatedSpdxElement", RelatedSpdxElement); + writer.WriteStringValue("relationshipType", RelationshipType); + writer.WriteStringValue("spdxElementId", SpdxElementId); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/GitHub/Models/DeployKey.cs b/src/GitHub/Models/DeployKey.cs index 6c87836e..9229bfa6 100644 --- a/src/GitHub/Models/DeployKey.cs +++ b/src/GitHub/Models/DeployKey.cs @@ -31,6 +31,8 @@ public partial class DeployKey : IAdditionalDataHolder, IParsable #else public string CreatedAt { get; set; } #endif + /// The enabled property + public bool? Enabled { get; set; } /// The id property public int? Id { get; set; } /// The key property @@ -96,6 +98,7 @@ public virtual IDictionary> GetFieldDeserializers() { { "added_by", n => { AddedBy = n.GetStringValue(); } }, { "created_at", n => { CreatedAt = n.GetStringValue(); } }, + { "enabled", n => { Enabled = n.GetBoolValue(); } }, { "id", n => { Id = n.GetIntValue(); } }, { "key", n => { Key = n.GetStringValue(); } }, { "last_used", n => { LastUsed = n.GetStringValue(); } }, @@ -114,6 +117,7 @@ public virtual void Serialize(ISerializationWriter writer) _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteStringValue("added_by", AddedBy); writer.WriteStringValue("created_at", CreatedAt); + writer.WriteBoolValue("enabled", Enabled); writer.WriteIntValue("id", Id); writer.WriteStringValue("key", Key); writer.WriteStringValue("last_used", LastUsed); diff --git a/src/GitHub/Models/EnterpriseRulesetConditions.cs b/src/GitHub/Models/EnterpriseRulesetConditions.cs new file mode 100644 index 00000000..5ac016cb --- /dev/null +++ b/src/GitHub/Models/EnterpriseRulesetConditions.cs @@ -0,0 +1,56 @@ +// +#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 +{ + /// + /// Conditions for an enterprise ruleset. The conditions object should contain either the `organization_id` or `organization_name` property and the `repository_name` or `repository_property` property. For branch and tag rulesets, the conditions object should also contain the `ref_name` property. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.19.0")] + public partial class EnterpriseRulesetConditions : 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 EnterpriseRulesetConditions() + { + 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.EnterpriseRulesetConditions CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::GitHub.Models.EnterpriseRulesetConditions(); + } + /// + /// 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/EnterpriseTeam.cs b/src/GitHub/Models/EnterpriseTeam.cs index 84b6837b..22261ec8 100644 --- a/src/GitHub/Models/EnterpriseTeam.cs +++ b/src/GitHub/Models/EnterpriseTeam.cs @@ -18,7 +18,13 @@ public partial class EnterpriseTeam : IAdditionalDataHolder, IParsable /// The created_at property public DateTimeOffset? CreatedAt { get; set; } /// The group_id property - public int? GroupId { get; set; } +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? GroupId { get; set; } +#nullable restore +#else + public string GroupId { get; set; } +#endif /// The html_url property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -97,7 +103,7 @@ public virtual IDictionary> GetFieldDeserializers() return new Dictionary> { { "created_at", n => { CreatedAt = n.GetDateTimeOffsetValue(); } }, - { "group_id", n => { GroupId = n.GetIntValue(); } }, + { "group_id", n => { GroupId = n.GetStringValue(); } }, { "html_url", n => { HtmlUrl = n.GetStringValue(); } }, { "id", n => { Id = n.GetLongValue(); } }, { "members_url", n => { MembersUrl = n.GetStringValue(); } }, @@ -116,7 +122,7 @@ public virtual void Serialize(ISerializationWriter writer) { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteDateTimeOffsetValue("created_at", CreatedAt); - writer.WriteIntValue("group_id", GroupId); + writer.WriteStringValue("group_id", GroupId); writer.WriteStringValue("html_url", HtmlUrl); writer.WriteLongValue("id", Id); writer.WriteStringValue("members_url", MembersUrl); diff --git a/src/GitHub/Models/FileCommit_commit_verification.cs b/src/GitHub/Models/FileCommit_commit_verification.cs index 4a0f58b9..7e0c563b 100644 --- a/src/GitHub/Models/FileCommit_commit_verification.cs +++ b/src/GitHub/Models/FileCommit_commit_verification.cs @@ -40,6 +40,14 @@ public partial class FileCommit_commit_verification : IAdditionalDataHolder, IPa #endif /// The verified property public bool? Verified { get; set; } + /// The verified_at property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? VerifiedAt { get; set; } +#nullable restore +#else + public string VerifiedAt { get; set; } +#endif /// /// Instantiates a new and sets the default values. /// @@ -69,6 +77,7 @@ public virtual IDictionary> GetFieldDeserializers() { "reason", n => { Reason = n.GetStringValue(); } }, { "signature", n => { Signature = n.GetStringValue(); } }, { "verified", n => { Verified = n.GetBoolValue(); } }, + { "verified_at", n => { VerifiedAt = n.GetStringValue(); } }, }; } /// @@ -82,6 +91,7 @@ public virtual void Serialize(ISerializationWriter writer) writer.WriteStringValue("reason", Reason); writer.WriteStringValue("signature", Signature); writer.WriteBoolValue("verified", Verified); + writer.WriteStringValue("verified_at", VerifiedAt); writer.WriteAdditionalData(AdditionalData); } } diff --git a/src/GitHub/Models/GetAuditLogStreamConfig.cs b/src/GitHub/Models/GetAuditLogStreamConfig.cs new file mode 100644 index 00000000..6a3e28c7 --- /dev/null +++ b/src/GitHub/Models/GetAuditLogStreamConfig.cs @@ -0,0 +1,96 @@ +// +#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 +{ + /// + /// Get an audit log streaming configuration for an enterprise. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.19.0")] + public partial class GetAuditLogStreamConfig : 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 created_at property + public DateTimeOffset? CreatedAt { get; set; } + /// The enabled property + public bool? Enabled { get; set; } + /// The id property + public int? Id { get; set; } + /// The paused_at property + public DateTimeOffset? PausedAt { get; set; } + /// The stream_details property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? StreamDetails { get; set; } +#nullable restore +#else + public string StreamDetails { get; set; } +#endif + /// The stream_type property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? StreamType { get; set; } +#nullable restore +#else + public string StreamType { get; set; } +#endif + /// The updated_at property + public DateTimeOffset? UpdatedAt { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public GetAuditLogStreamConfig() + { + 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.GetAuditLogStreamConfig CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::GitHub.Models.GetAuditLogStreamConfig(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "created_at", n => { CreatedAt = n.GetDateTimeOffsetValue(); } }, + { "enabled", n => { Enabled = n.GetBoolValue(); } }, + { "id", n => { Id = n.GetIntValue(); } }, + { "paused_at", n => { PausedAt = n.GetDateTimeOffsetValue(); } }, + { "stream_details", n => { StreamDetails = n.GetStringValue(); } }, + { "stream_type", n => { StreamType = n.GetStringValue(); } }, + { "updated_at", n => { UpdatedAt = n.GetDateTimeOffsetValue(); } }, + }; + } + /// + /// 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.WriteDateTimeOffsetValue("created_at", CreatedAt); + writer.WriteBoolValue("enabled", Enabled); + writer.WriteIntValue("id", Id); + writer.WriteDateTimeOffsetValue("paused_at", PausedAt); + writer.WriteStringValue("stream_details", StreamDetails); + writer.WriteStringValue("stream_type", StreamType); + writer.WriteDateTimeOffsetValue("updated_at", UpdatedAt); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/GitHub/Models/GetAuditLogStreamConfigs.cs b/src/GitHub/Models/GetAuditLogStreamConfigs.cs new file mode 100644 index 00000000..1b15587b --- /dev/null +++ b/src/GitHub/Models/GetAuditLogStreamConfigs.cs @@ -0,0 +1,95 @@ +// +#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.19.0")] + #pragma warning disable CS1591 + public partial class GetAuditLogStreamConfigs : 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 created_at property + public DateTimeOffset? CreatedAt { get; set; } + /// The enabled property + public bool? Enabled { get; set; } + /// The id property + public int? Id { get; set; } + /// The paused_at property + public DateTimeOffset? PausedAt { get; set; } + /// The stream_details property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? StreamDetails { get; set; } +#nullable restore +#else + public string StreamDetails { get; set; } +#endif + /// The stream_type property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? StreamType { get; set; } +#nullable restore +#else + public string StreamType { get; set; } +#endif + /// The updated_at property + public DateTimeOffset? UpdatedAt { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public GetAuditLogStreamConfigs() + { + 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.GetAuditLogStreamConfigs CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::GitHub.Models.GetAuditLogStreamConfigs(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "created_at", n => { CreatedAt = n.GetDateTimeOffsetValue(); } }, + { "enabled", n => { Enabled = n.GetBoolValue(); } }, + { "id", n => { Id = n.GetIntValue(); } }, + { "paused_at", n => { PausedAt = n.GetDateTimeOffsetValue(); } }, + { "stream_details", n => { StreamDetails = n.GetStringValue(); } }, + { "stream_type", n => { StreamType = n.GetStringValue(); } }, + { "updated_at", n => { UpdatedAt = n.GetDateTimeOffsetValue(); } }, + }; + } + /// + /// 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.WriteDateTimeOffsetValue("created_at", CreatedAt); + writer.WriteBoolValue("enabled", Enabled); + writer.WriteIntValue("id", Id); + writer.WriteDateTimeOffsetValue("paused_at", PausedAt); + writer.WriteStringValue("stream_details", StreamDetails); + writer.WriteStringValue("stream_type", StreamType); + writer.WriteDateTimeOffsetValue("updated_at", UpdatedAt); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/GitHub/Models/GitCommit_verification.cs b/src/GitHub/Models/GitCommit_verification.cs index 380b7f92..56403bac 100644 --- a/src/GitHub/Models/GitCommit_verification.cs +++ b/src/GitHub/Models/GitCommit_verification.cs @@ -40,6 +40,14 @@ public partial class GitCommit_verification : IAdditionalDataHolder, IParsable #endif /// The verified property public bool? Verified { get; set; } + /// The verified_at property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? VerifiedAt { get; set; } +#nullable restore +#else + public string VerifiedAt { get; set; } +#endif /// /// Instantiates a new and sets the default values. /// @@ -69,6 +77,7 @@ public virtual IDictionary> GetFieldDeserializers() { "reason", n => { Reason = n.GetStringValue(); } }, { "signature", n => { Signature = n.GetStringValue(); } }, { "verified", n => { Verified = n.GetBoolValue(); } }, + { "verified_at", n => { VerifiedAt = n.GetStringValue(); } }, }; } /// @@ -82,6 +91,7 @@ public virtual void Serialize(ISerializationWriter writer) writer.WriteStringValue("reason", Reason); writer.WriteStringValue("signature", Signature); writer.WriteBoolValue("verified", Verified); + writer.WriteStringValue("verified_at", VerifiedAt); writer.WriteAdditionalData(AdditionalData); } } diff --git a/src/GitHub/Models/GoogleCloudConfig.cs b/src/GitHub/Models/GoogleCloudConfig.cs new file mode 100644 index 00000000..d6e44317 --- /dev/null +++ b/src/GitHub/Models/GoogleCloudConfig.cs @@ -0,0 +1,86 @@ +// +#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 +{ + /// + /// Google Cloud Config for audit log streaming configuration. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.19.0")] + public partial class GoogleCloudConfig : 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; } + /// Google Cloud Bucket Name +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Bucket { get; set; } +#nullable restore +#else + public string Bucket { get; set; } +#endif + /// The encrypted_json_credentials property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? EncryptedJsonCredentials { get; set; } +#nullable restore +#else + public string EncryptedJsonCredentials { get; set; } +#endif + /// Key ID obtained from the audit log stream key endpoint used to encrypt secrets. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? KeyId { get; set; } +#nullable restore +#else + public string KeyId { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public GoogleCloudConfig() + { + 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.GoogleCloudConfig CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::GitHub.Models.GoogleCloudConfig(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "bucket", n => { Bucket = n.GetStringValue(); } }, + { "encrypted_json_credentials", n => { EncryptedJsonCredentials = n.GetStringValue(); } }, + { "key_id", n => { KeyId = 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("bucket", Bucket); + writer.WriteStringValue("encrypted_json_credentials", EncryptedJsonCredentials); + writer.WriteStringValue("key_id", KeyId); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/GitHub/Models/Issue.cs b/src/GitHub/Models/Issue.cs index 94f1f9b1..113c6ac8 100644 --- a/src/GitHub/Models/Issue.cs +++ b/src/GitHub/Models/Issue.cs @@ -193,6 +193,14 @@ public partial class Issue : IAdditionalDataHolder, IParsable #endif /// The reason for the current state public global::GitHub.Models.Issue_state_reason? StateReason { get; set; } + /// The sub_issues_summary property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::GitHub.Models.SubIssuesSummary? SubIssuesSummary { get; set; } +#nullable restore +#else + public global::GitHub.Models.SubIssuesSummary SubIssuesSummary { get; set; } +#endif /// The timeline_url property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -281,6 +289,7 @@ public virtual IDictionary> GetFieldDeserializers() { "repository_url", n => { RepositoryUrl = n.GetStringValue(); } }, { "state", n => { State = n.GetStringValue(); } }, { "state_reason", n => { StateReason = n.GetEnumValue(); } }, + { "sub_issues_summary", n => { SubIssuesSummary = n.GetObjectValue(global::GitHub.Models.SubIssuesSummary.CreateFromDiscriminatorValue); } }, { "timeline_url", n => { TimelineUrl = n.GetStringValue(); } }, { "title", n => { Title = n.GetStringValue(); } }, { "updated_at", n => { UpdatedAt = n.GetDateTimeOffsetValue(); } }, @@ -324,6 +333,7 @@ public virtual void Serialize(ISerializationWriter writer) writer.WriteStringValue("repository_url", RepositoryUrl); writer.WriteStringValue("state", State); writer.WriteEnumValue("state_reason", StateReason); + writer.WriteObjectValue("sub_issues_summary", SubIssuesSummary); writer.WriteStringValue("timeline_url", TimelineUrl); writer.WriteStringValue("title", Title); writer.WriteDateTimeOffsetValue("updated_at", UpdatedAt); diff --git a/src/GitHub/Models/IssueSearchResultItem.cs b/src/GitHub/Models/IssueSearchResultItem.cs index 8f2c0ec4..192a23df 100644 --- a/src/GitHub/Models/IssueSearchResultItem.cs +++ b/src/GitHub/Models/IssueSearchResultItem.cs @@ -192,6 +192,14 @@ public partial class IssueSearchResultItem : IAdditionalDataHolder, IParsable #nullable restore #else public string StateReason { get; set; } +#endif + /// The sub_issues_summary property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::GitHub.Models.IssueSearchResultItem_sub_issues_summary? SubIssuesSummary { get; set; } +#nullable restore +#else + public global::GitHub.Models.IssueSearchResultItem_sub_issues_summary SubIssuesSummary { get; set; } #endif /// The text_matches property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -289,6 +297,7 @@ public virtual IDictionary> GetFieldDeserializers() { "score", n => { Score = n.GetDoubleValue(); } }, { "state", n => { State = n.GetStringValue(); } }, { "state_reason", n => { StateReason = n.GetStringValue(); } }, + { "sub_issues_summary", n => { SubIssuesSummary = n.GetObjectValue(global::GitHub.Models.IssueSearchResultItem_sub_issues_summary.CreateFromDiscriminatorValue); } }, { "text_matches", n => { TextMatches = n.GetCollectionOfObjectValues(global::GitHub.Models.Issues.CreateFromDiscriminatorValue)?.AsList(); } }, { "timeline_url", n => { TimelineUrl = n.GetStringValue(); } }, { "title", n => { Title = n.GetStringValue(); } }, @@ -333,6 +342,7 @@ public virtual void Serialize(ISerializationWriter writer) writer.WriteDoubleValue("score", Score); writer.WriteStringValue("state", State); writer.WriteStringValue("state_reason", StateReason); + writer.WriteObjectValue("sub_issues_summary", SubIssuesSummary); writer.WriteCollectionOfObjectValues("text_matches", TextMatches); writer.WriteStringValue("timeline_url", TimelineUrl); writer.WriteStringValue("title", Title); diff --git a/src/GitHub/Models/IssueSearchResultItem_sub_issues_summary.cs b/src/GitHub/Models/IssueSearchResultItem_sub_issues_summary.cs new file mode 100644 index 00000000..cd830acb --- /dev/null +++ b/src/GitHub/Models/IssueSearchResultItem_sub_issues_summary.cs @@ -0,0 +1,67 @@ +// +#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.19.0")] + #pragma warning disable CS1591 + public partial class IssueSearchResultItem_sub_issues_summary : 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 completed property + public int? Completed { get; set; } + /// The percent_completed property + public int? PercentCompleted { get; set; } + /// The total property + public int? Total { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public IssueSearchResultItem_sub_issues_summary() + { + 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.IssueSearchResultItem_sub_issues_summary CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::GitHub.Models.IssueSearchResultItem_sub_issues_summary(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "completed", n => { Completed = n.GetIntValue(); } }, + { "percent_completed", n => { PercentCompleted = n.GetIntValue(); } }, + { "total", n => { Total = n.GetIntValue(); } }, + }; + } + /// + /// 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.WriteIntValue("completed", Completed); + writer.WriteIntValue("percent_completed", PercentCompleted); + writer.WriteIntValue("total", Total); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/GitHub/Models/NullableIssue.cs b/src/GitHub/Models/NullableIssue.cs index 813d805d..f8a5a59b 100644 --- a/src/GitHub/Models/NullableIssue.cs +++ b/src/GitHub/Models/NullableIssue.cs @@ -193,6 +193,14 @@ public partial class NullableIssue : IAdditionalDataHolder, IParsable #endif /// The reason for the current state public global::GitHub.Models.NullableIssue_state_reason? StateReason { get; set; } + /// The sub_issues_summary property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::GitHub.Models.SubIssuesSummary? SubIssuesSummary { get; set; } +#nullable restore +#else + public global::GitHub.Models.SubIssuesSummary SubIssuesSummary { get; set; } +#endif /// The timeline_url property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -281,6 +289,7 @@ public virtual IDictionary> GetFieldDeserializers() { "repository_url", n => { RepositoryUrl = n.GetStringValue(); } }, { "state", n => { State = n.GetStringValue(); } }, { "state_reason", n => { StateReason = n.GetEnumValue(); } }, + { "sub_issues_summary", n => { SubIssuesSummary = n.GetObjectValue(global::GitHub.Models.SubIssuesSummary.CreateFromDiscriminatorValue); } }, { "timeline_url", n => { TimelineUrl = n.GetStringValue(); } }, { "title", n => { Title = n.GetStringValue(); } }, { "updated_at", n => { UpdatedAt = n.GetDateTimeOffsetValue(); } }, @@ -324,6 +333,7 @@ public virtual void Serialize(ISerializationWriter writer) writer.WriteStringValue("repository_url", RepositoryUrl); writer.WriteStringValue("state", State); writer.WriteEnumValue("state_reason", StateReason); + writer.WriteObjectValue("sub_issues_summary", SubIssuesSummary); writer.WriteStringValue("timeline_url", TimelineUrl); writer.WriteStringValue("title", Title); writer.WriteDateTimeOffsetValue("updated_at", UpdatedAt); diff --git a/src/GitHub/Models/OrgRulesetConditions.cs b/src/GitHub/Models/OrgRulesetConditions.cs index 54355e47..64e35acf 100644 --- a/src/GitHub/Models/OrgRulesetConditions.cs +++ b/src/GitHub/Models/OrgRulesetConditions.cs @@ -8,7 +8,7 @@ namespace GitHub.Models { /// - /// Conditions for an organization ruleset.The branch and tag rulesets conditions object should contain both `repository_name` and `ref_name` properties, or both `repository_id` and `ref_name` properties, or both `repository_property` and `ref_name` properties.The push rulesets conditions object does not require the `ref_name` property. + /// Conditions for an organization ruleset.The branch and tag rulesets conditions object should contain both `repository_name` and `ref_name` properties, or both `repository_id` and `ref_name` properties, or both `repository_property` and `ref_name` properties.The push rulesets conditions object does not require the `ref_name` property.For repository policy rulesets, the conditions object should only contain the `repository_name`, the `repository_id`, or the `repository_property`. /// [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.19.0")] public partial class OrgRulesetConditions : IAdditionalDataHolder, IParsable diff --git a/src/GitHub/Models/OrganizationFull.cs b/src/GitHub/Models/OrganizationFull.cs index c28aa935..d2fd26f4 100644 --- a/src/GitHub/Models/OrganizationFull.cs +++ b/src/GitHub/Models/OrganizationFull.cs @@ -8,7 +8,7 @@ namespace GitHub.Models { /// - /// Prevents users in the organization from using insecure methods of two-factor authentication to fulfill a two-factor requirement.GitHub currently defines SMS as an insecure method of two-factor authentication.If your users are managed by the enterprise this policy will not affect them. The first admin account of the enterprise will still be affected. + /// Prevents users in the organization from using insecure methods of two-factor authentication to fulfill a two-factor requirement.Removes non-compliant outside collaborators from the organization and its repositories.GitHub currently defines SMS as an insecure method of two-factor authentication.If your users are managed by the enterprise this policy will not affect them. The first admin account of the enterprise will still be affected. /// [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.19.0")] public partial class OrganizationFull : IAdditionalDataHolder, IParsable @@ -73,6 +73,8 @@ public partial class OrganizationFull : IAdditionalDataHolder, IParsable /// **Endpoint closing down notice.** Please use [code security configurations](https://docs.github.com/enterprise-cloud@latest//rest/code-security/configurations) instead.Whether dependency graph is automatically enabled for new repositories and repositories transferred to this organization.This field is only visible to organization owners or members of a team with the security manager role. [Obsolete("")] public bool? DependencyGraphEnabledForNewRepositories { get; set; } + /// Controls whether or not deploy keys may be added and used for repositories in the organization. + public bool? DeployKeysEnabledForRepositories { get; set; } /// The description property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -319,6 +321,7 @@ public virtual IDictionary> GetFieldDeserializers() { "dependabot_alerts_enabled_for_new_repositories", n => { DependabotAlertsEnabledForNewRepositories = n.GetBoolValue(); } }, { "dependabot_security_updates_enabled_for_new_repositories", n => { DependabotSecurityUpdatesEnabledForNewRepositories = n.GetBoolValue(); } }, { "dependency_graph_enabled_for_new_repositories", n => { DependencyGraphEnabledForNewRepositories = n.GetBoolValue(); } }, + { "deploy_keys_enabled_for_repositories", n => { DeployKeysEnabledForRepositories = n.GetBoolValue(); } }, { "description", n => { Description = n.GetStringValue(); } }, { "disk_usage", n => { DiskUsage = n.GetIntValue(); } }, { "email", n => { Email = n.GetStringValue(); } }, @@ -386,6 +389,7 @@ public virtual void Serialize(ISerializationWriter writer) writer.WriteBoolValue("dependabot_alerts_enabled_for_new_repositories", DependabotAlertsEnabledForNewRepositories); writer.WriteBoolValue("dependabot_security_updates_enabled_for_new_repositories", DependabotSecurityUpdatesEnabledForNewRepositories); writer.WriteBoolValue("dependency_graph_enabled_for_new_repositories", DependencyGraphEnabledForNewRepositories); + writer.WriteBoolValue("deploy_keys_enabled_for_repositories", DeployKeysEnabledForRepositories); writer.WriteStringValue("description", Description); writer.WriteIntValue("disk_usage", DiskUsage); writer.WriteStringValue("email", Email); diff --git a/src/GitHub/Models/OrganizationProgrammaticAccessGrant.cs b/src/GitHub/Models/OrganizationProgrammaticAccessGrant.cs index bee2ba3d..b3d1b3ec 100644 --- a/src/GitHub/Models/OrganizationProgrammaticAccessGrant.cs +++ b/src/GitHub/Models/OrganizationProgrammaticAccessGrant.cs @@ -70,6 +70,14 @@ public partial class OrganizationProgrammaticAccessGrant : IAdditionalDataHolder #nullable restore #else public string TokenLastUsedAt { get; set; } +#endif + /// The name given to the user's token. This field can also be found in an organization's settings page for Active Tokens. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? TokenName { get; set; } +#nullable restore +#else + public string TokenName { get; set; } #endif /// /// Instantiates a new and sets the default values. @@ -106,6 +114,7 @@ public virtual IDictionary> GetFieldDeserializers() { "token_expires_at", n => { TokenExpiresAt = n.GetStringValue(); } }, { "token_id", n => { TokenId = n.GetIntValue(); } }, { "token_last_used_at", n => { TokenLastUsedAt = n.GetStringValue(); } }, + { "token_name", n => { TokenName = n.GetStringValue(); } }, }; } /// @@ -125,6 +134,7 @@ public virtual void Serialize(ISerializationWriter writer) writer.WriteStringValue("token_expires_at", TokenExpiresAt); writer.WriteIntValue("token_id", TokenId); writer.WriteStringValue("token_last_used_at", TokenLastUsedAt); + writer.WriteStringValue("token_name", TokenName); writer.WriteAdditionalData(AdditionalData); } } diff --git a/src/GitHub/Models/OrganizationProgrammaticAccessGrantRequest.cs b/src/GitHub/Models/OrganizationProgrammaticAccessGrantRequest.cs index b8e475cd..1908cefb 100644 --- a/src/GitHub/Models/OrganizationProgrammaticAccessGrantRequest.cs +++ b/src/GitHub/Models/OrganizationProgrammaticAccessGrantRequest.cs @@ -78,6 +78,14 @@ public partial class OrganizationProgrammaticAccessGrantRequest : IAdditionalDat #nullable restore #else public string TokenLastUsedAt { get; set; } +#endif + /// The name given to the user's token. This field can also be found in an organization's settings page for Active Tokens. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? TokenName { get; set; } +#nullable restore +#else + public string TokenName { get; set; } #endif /// /// Instantiates a new and sets the default values. @@ -115,6 +123,7 @@ public virtual IDictionary> GetFieldDeserializers() { "token_expires_at", n => { TokenExpiresAt = n.GetStringValue(); } }, { "token_id", n => { TokenId = n.GetIntValue(); } }, { "token_last_used_at", n => { TokenLastUsedAt = n.GetStringValue(); } }, + { "token_name", n => { TokenName = n.GetStringValue(); } }, }; } /// @@ -135,6 +144,7 @@ public virtual void Serialize(ISerializationWriter writer) writer.WriteStringValue("token_expires_at", TokenExpiresAt); writer.WriteIntValue("token_id", TokenId); writer.WriteStringValue("token_last_used_at", TokenLastUsedAt); + writer.WriteStringValue("token_name", TokenName); writer.WriteAdditionalData(AdditionalData); } } diff --git a/src/GitHub/Models/OrganizationRole.cs b/src/GitHub/Models/OrganizationRole.cs index 2cd888b1..959cfa66 100644 --- a/src/GitHub/Models/OrganizationRole.cs +++ b/src/GitHub/Models/OrganizationRole.cs @@ -15,6 +15,8 @@ public partial class OrganizationRole : 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 system role from which this role inherits permissions. + public global::GitHub.Models.OrganizationRole_base_role? BaseRole { get; set; } /// The date and time the role was created. public DateTimeOffset? CreatedAt { get; set; } /// A short description about who this role is for or what permissions it grants. @@ -51,6 +53,8 @@ public partial class OrganizationRole : IAdditionalDataHolder, IParsable #else public List Permissions { get; set; } #endif + /// Source answers the question, "where did this role come from?" + public global::GitHub.Models.OrganizationRole_source? Source { get; set; } /// The date and time the role was last updated. public DateTimeOffset? UpdatedAt { get; set; } /// @@ -78,12 +82,14 @@ public virtual IDictionary> GetFieldDeserializers() { return new Dictionary> { + { "base_role", n => { BaseRole = n.GetEnumValue(); } }, { "created_at", n => { CreatedAt = n.GetDateTimeOffsetValue(); } }, { "description", n => { Description = n.GetStringValue(); } }, { "id", n => { Id = n.GetLongValue(); } }, { "name", n => { Name = n.GetStringValue(); } }, { "organization", n => { Organization = n.GetObjectValue(global::GitHub.Models.NullableSimpleUser.CreateFromDiscriminatorValue); } }, { "permissions", n => { Permissions = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, + { "source", n => { Source = n.GetEnumValue(); } }, { "updated_at", n => { UpdatedAt = n.GetDateTimeOffsetValue(); } }, }; } @@ -94,12 +100,14 @@ public virtual IDictionary> GetFieldDeserializers() public virtual void Serialize(ISerializationWriter writer) { _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteEnumValue("base_role", BaseRole); writer.WriteDateTimeOffsetValue("created_at", CreatedAt); writer.WriteStringValue("description", Description); writer.WriteLongValue("id", Id); writer.WriteStringValue("name", Name); writer.WriteObjectValue("organization", Organization); writer.WriteCollectionOfPrimitiveValues("permissions", Permissions); + writer.WriteEnumValue("source", Source); writer.WriteDateTimeOffsetValue("updated_at", UpdatedAt); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/GitHub/Models/OrganizationRole_base_role.cs b/src/GitHub/Models/OrganizationRole_base_role.cs new file mode 100644 index 00000000..11249829 --- /dev/null +++ b/src/GitHub/Models/OrganizationRole_base_role.cs @@ -0,0 +1,31 @@ +// +using System.Runtime.Serialization; +using System; +namespace GitHub.Models +{ + /// The system role from which this role inherits permissions. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.19.0")] + public enum OrganizationRole_base_role + { + [EnumMember(Value = "read")] + #pragma warning disable CS1591 + Read, + #pragma warning restore CS1591 + [EnumMember(Value = "triage")] + #pragma warning disable CS1591 + Triage, + #pragma warning restore CS1591 + [EnumMember(Value = "write")] + #pragma warning disable CS1591 + Write, + #pragma warning restore CS1591 + [EnumMember(Value = "maintain")] + #pragma warning disable CS1591 + Maintain, + #pragma warning restore CS1591 + [EnumMember(Value = "admin")] + #pragma warning disable CS1591 + Admin, + #pragma warning restore CS1591 + } +} diff --git a/src/GitHub/Models/OrganizationRole_source.cs b/src/GitHub/Models/OrganizationRole_source.cs new file mode 100644 index 00000000..dcfac5b2 --- /dev/null +++ b/src/GitHub/Models/OrganizationRole_source.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace GitHub.Models +{ + /// Source answers the question, "where did this role come from?" + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.19.0")] + public enum OrganizationRole_source + { + [EnumMember(Value = "Organization")] + #pragma warning disable CS1591 + Organization, + #pragma warning restore CS1591 + [EnumMember(Value = "Enterprise")] + #pragma warning disable CS1591 + Enterprise, + #pragma warning restore CS1591 + [EnumMember(Value = "Predefined")] + #pragma warning disable CS1591 + Predefined, + #pragma warning restore CS1591 + } +} diff --git a/src/GitHub/Models/OrganizationSecretScanningAlert.cs b/src/GitHub/Models/OrganizationSecretScanningAlert.cs index 35392752..d840af66 100644 --- a/src/GitHub/Models/OrganizationSecretScanningAlert.cs +++ b/src/GitHub/Models/OrganizationSecretScanningAlert.cs @@ -49,6 +49,38 @@ public partial class OrganizationSecretScanningAlert : IAdditionalDataHolder, IP #nullable restore #else public global::GitHub.Models.NullableSimpleUser PushProtectionBypassedBy { get; set; } +#endif + /// An optional comment when requesting a push protection bypass. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? PushProtectionBypassRequestComment { get; set; } +#nullable restore +#else + public string PushProtectionBypassRequestComment { get; set; } +#endif + /// The URL to a push protection bypass request. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? PushProtectionBypassRequestHtmlUrl { get; set; } +#nullable restore +#else + public string PushProtectionBypassRequestHtmlUrl { get; set; } +#endif + /// A GitHub user. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::GitHub.Models.NullableSimpleUser? PushProtectionBypassRequestReviewer { get; set; } +#nullable restore +#else + public global::GitHub.Models.NullableSimpleUser PushProtectionBypassRequestReviewer { get; set; } +#endif + /// An optional comment when reviewing a push protection bypass. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? PushProtectionBypassRequestReviewerComment { get; set; } +#nullable restore +#else + public string PushProtectionBypassRequestReviewerComment { get; set; } #endif /// A GitHub repository. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -147,6 +179,10 @@ public virtual IDictionary> GetFieldDeserializers() { "multi_repo", n => { MultiRepo = n.GetBoolValue(); } }, { "number", n => { Number = n.GetIntValue(); } }, { "publicly_leaked", n => { PubliclyLeaked = n.GetBoolValue(); } }, + { "push_protection_bypass_request_comment", n => { PushProtectionBypassRequestComment = n.GetStringValue(); } }, + { "push_protection_bypass_request_html_url", n => { PushProtectionBypassRequestHtmlUrl = n.GetStringValue(); } }, + { "push_protection_bypass_request_reviewer", n => { PushProtectionBypassRequestReviewer = n.GetObjectValue(global::GitHub.Models.NullableSimpleUser.CreateFromDiscriminatorValue); } }, + { "push_protection_bypass_request_reviewer_comment", n => { PushProtectionBypassRequestReviewerComment = n.GetStringValue(); } }, { "push_protection_bypassed", n => { PushProtectionBypassed = n.GetBoolValue(); } }, { "push_protection_bypassed_at", n => { PushProtectionBypassedAt = n.GetDateTimeOffsetValue(); } }, { "push_protection_bypassed_by", n => { PushProtectionBypassedBy = n.GetObjectValue(global::GitHub.Models.NullableSimpleUser.CreateFromDiscriminatorValue); } }, @@ -177,6 +213,10 @@ public virtual void Serialize(ISerializationWriter writer) writer.WriteBoolValue("push_protection_bypassed", PushProtectionBypassed); writer.WriteDateTimeOffsetValue("push_protection_bypassed_at", PushProtectionBypassedAt); writer.WriteObjectValue("push_protection_bypassed_by", PushProtectionBypassedBy); + writer.WriteStringValue("push_protection_bypass_request_comment", PushProtectionBypassRequestComment); + writer.WriteStringValue("push_protection_bypass_request_html_url", PushProtectionBypassRequestHtmlUrl); + writer.WriteObjectValue("push_protection_bypass_request_reviewer", PushProtectionBypassRequestReviewer); + writer.WriteStringValue("push_protection_bypass_request_reviewer_comment", PushProtectionBypassRequestReviewerComment); writer.WriteObjectValue("repository", Repository); writer.WriteEnumValue("resolution", Resolution); writer.WriteStringValue("resolution_comment", ResolutionComment); diff --git a/src/GitHub/Models/PushRuleBypassRequest.cs b/src/GitHub/Models/PushRuleBypassRequest.cs new file mode 100644 index 00000000..f2cf00cd --- /dev/null +++ b/src/GitHub/Models/PushRuleBypassRequest.cs @@ -0,0 +1,176 @@ +// +#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 bypass request made by a user asking to be exempted from a push rule in this repository. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.19.0")] + public partial class PushRuleBypassRequest : 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 date and time the bypass request was created. + public DateTimeOffset? CreatedAt { get; set; } + /// Data describing the push rules that are being requested to be bypassed. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Data { get; set; } +#nullable restore +#else + public List Data { get; set; } +#endif + /// The date and time the bypass request will expire. + public DateTimeOffset? ExpiresAt { get; set; } + /// The URL to view the bypass request in a browser. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? HtmlUrl { get; set; } +#nullable restore +#else + public string HtmlUrl { get; set; } +#endif + /// The unique identifier of the bypass request. + public int? Id { get; set; } + /// The number uniquely identifying the bypass request within its repository. + public int? Number { get; set; } + /// The organization associated with the repository the bypass request is for. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::GitHub.Models.PushRuleBypassRequest_organization? Organization { get; set; } +#nullable restore +#else + public global::GitHub.Models.PushRuleBypassRequest_organization Organization { get; set; } +#endif + /// The repository the bypass request is for. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::GitHub.Models.PushRuleBypassRequest_repository? Repository { get; set; } +#nullable restore +#else + public global::GitHub.Models.PushRuleBypassRequest_repository Repository { get; set; } +#endif + /// The user who requested the bypass. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::GitHub.Models.PushRuleBypassRequest_requester? Requester { get; set; } +#nullable restore +#else + public global::GitHub.Models.PushRuleBypassRequest_requester Requester { get; set; } +#endif + /// The comment the requester provided when creating the bypass request. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? RequesterComment { get; set; } +#nullable restore +#else + public string RequesterComment { get; set; } +#endif + /// The type of request. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? RequestType { get; set; } +#nullable restore +#else + public string RequestType { get; set; } +#endif + /// The unique identifier for the request type of the bypass request. For example, a commit SHA. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ResourceIdentifier { get; set; } +#nullable restore +#else + public string ResourceIdentifier { get; set; } +#endif + /// The responses to the bypass request. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? Responses { get; set; } +#nullable restore +#else + public List Responses { get; set; } +#endif + /// The status of the bypass request. + public global::GitHub.Models.PushRuleBypassRequest_status? Status { get; set; } + /// 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 PushRuleBypassRequest() + { + 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.PushRuleBypassRequest CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::GitHub.Models.PushRuleBypassRequest(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "created_at", n => { CreatedAt = n.GetDateTimeOffsetValue(); } }, + { "data", n => { Data = n.GetCollectionOfObjectValues(global::GitHub.Models.PushRuleBypassRequest_data.CreateFromDiscriminatorValue)?.AsList(); } }, + { "expires_at", n => { ExpiresAt = n.GetDateTimeOffsetValue(); } }, + { "html_url", n => { HtmlUrl = n.GetStringValue(); } }, + { "id", n => { Id = n.GetIntValue(); } }, + { "number", n => { Number = n.GetIntValue(); } }, + { "organization", n => { Organization = n.GetObjectValue(global::GitHub.Models.PushRuleBypassRequest_organization.CreateFromDiscriminatorValue); } }, + { "repository", n => { Repository = n.GetObjectValue(global::GitHub.Models.PushRuleBypassRequest_repository.CreateFromDiscriminatorValue); } }, + { "request_type", n => { RequestType = n.GetStringValue(); } }, + { "requester", n => { Requester = n.GetObjectValue(global::GitHub.Models.PushRuleBypassRequest_requester.CreateFromDiscriminatorValue); } }, + { "requester_comment", n => { RequesterComment = n.GetStringValue(); } }, + { "resource_identifier", n => { ResourceIdentifier = n.GetStringValue(); } }, + { "responses", n => { Responses = n.GetCollectionOfObjectValues(global::GitHub.Models.BypassResponse.CreateFromDiscriminatorValue)?.AsList(); } }, + { "status", n => { Status = n.GetEnumValue(); } }, + { "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.WriteDateTimeOffsetValue("created_at", CreatedAt); + writer.WriteCollectionOfObjectValues("data", Data); + writer.WriteDateTimeOffsetValue("expires_at", ExpiresAt); + writer.WriteStringValue("html_url", HtmlUrl); + writer.WriteIntValue("id", Id); + writer.WriteIntValue("number", Number); + writer.WriteObjectValue("organization", Organization); + writer.WriteObjectValue("repository", Repository); + writer.WriteObjectValue("requester", Requester); + writer.WriteStringValue("requester_comment", RequesterComment); + writer.WriteStringValue("request_type", RequestType); + writer.WriteStringValue("resource_identifier", ResourceIdentifier); + writer.WriteCollectionOfObjectValues("responses", Responses); + writer.WriteEnumValue("status", Status); + writer.WriteStringValue("url", Url); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/GitHub/Models/PushRuleBypassRequest_data.cs b/src/GitHub/Models/PushRuleBypassRequest_data.cs new file mode 100644 index 00000000..1bf9e82b --- /dev/null +++ b/src/GitHub/Models/PushRuleBypassRequest_data.cs @@ -0,0 +1,83 @@ +// +#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.19.0")] + #pragma warning disable CS1591 + public partial class PushRuleBypassRequest_data : 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 ID of the ruleset for the rules that were violated. + public int? RulesetId { get; set; } + /// The name of the ruleset for the rules that were violated. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? RulesetName { get; set; } +#nullable restore +#else + public string RulesetName { get; set; } +#endif + /// The type of rule that was violated. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? RuleType { get; set; } +#nullable restore +#else + public string RuleType { get; set; } +#endif + /// The number of rule violations generated from the push associated with this request. + public int? TotalViolations { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public PushRuleBypassRequest_data() + { + 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.PushRuleBypassRequest_data CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::GitHub.Models.PushRuleBypassRequest_data(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "rule_type", n => { RuleType = n.GetStringValue(); } }, + { "ruleset_id", n => { RulesetId = n.GetIntValue(); } }, + { "ruleset_name", n => { RulesetName = n.GetStringValue(); } }, + { "total_violations", n => { TotalViolations = n.GetIntValue(); } }, + }; + } + /// + /// 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.WriteIntValue("ruleset_id", RulesetId); + writer.WriteStringValue("ruleset_name", RulesetName); + writer.WriteStringValue("rule_type", RuleType); + writer.WriteIntValue("total_violations", TotalViolations); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/GitHub/Models/PushRuleBypassRequest_organization.cs b/src/GitHub/Models/PushRuleBypassRequest_organization.cs new file mode 100644 index 00000000..453b207f --- /dev/null +++ b/src/GitHub/Models/PushRuleBypassRequest_organization.cs @@ -0,0 +1,70 @@ +// +#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 associated with the repository the bypass request is for. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.19.0")] + public partial class PushRuleBypassRequest_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; } + /// The ID of the organization. + public int? Id { get; set; } + /// The name of the organization. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public PushRuleBypassRequest_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.PushRuleBypassRequest_organization CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::GitHub.Models.PushRuleBypassRequest_organization(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "id", n => { Id = n.GetIntValue(); } }, + { "name", n => { Name = 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.WriteIntValue("id", Id); + writer.WriteStringValue("name", Name); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/GitHub/Models/PushRuleBypassRequest_repository.cs b/src/GitHub/Models/PushRuleBypassRequest_repository.cs new file mode 100644 index 00000000..3ab36b06 --- /dev/null +++ b/src/GitHub/Models/PushRuleBypassRequest_repository.cs @@ -0,0 +1,80 @@ +// +#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 repository the bypass request is for. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.19.0")] + public partial class PushRuleBypassRequest_repository : 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 full name of the repository the bypass request is for. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? FullName { get; set; } +#nullable restore +#else + public string FullName { get; set; } +#endif + /// The ID of the repository the bypass request is for. + public int? Id { get; set; } + /// The name of the repository the bypass request is for. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Name { get; set; } +#nullable restore +#else + public string Name { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public PushRuleBypassRequest_repository() + { + 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.PushRuleBypassRequest_repository CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::GitHub.Models.PushRuleBypassRequest_repository(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "full_name", n => { FullName = n.GetStringValue(); } }, + { "id", n => { Id = n.GetIntValue(); } }, + { "name", n => { Name = 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("full_name", FullName); + writer.WriteIntValue("id", Id); + writer.WriteStringValue("name", Name); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/GitHub/Models/PushRuleBypassRequest_requester.cs b/src/GitHub/Models/PushRuleBypassRequest_requester.cs new file mode 100644 index 00000000..c46ca53a --- /dev/null +++ b/src/GitHub/Models/PushRuleBypassRequest_requester.cs @@ -0,0 +1,70 @@ +// +#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 user who requested the bypass. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.19.0")] + public partial class PushRuleBypassRequest_requester : IAdditionalDataHolder, IParsable + { + /// The ID of the GitHub user who requested the bypass. + public int? ActorId { get; set; } + /// The name of the GitHub user who requested the bypass. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? ActorName { get; set; } +#nullable restore +#else + public string ActorName { get; set; } +#endif + /// 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 PushRuleBypassRequest_requester() + { + 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.PushRuleBypassRequest_requester CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::GitHub.Models.PushRuleBypassRequest_requester(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "actor_id", n => { ActorId = n.GetIntValue(); } }, + { "actor_name", n => { ActorName = 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.WriteIntValue("actor_id", ActorId); + writer.WriteStringValue("actor_name", ActorName); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/GitHub/Models/PushRuleBypassRequest_status.cs b/src/GitHub/Models/PushRuleBypassRequest_status.cs new file mode 100644 index 00000000..a9518b98 --- /dev/null +++ b/src/GitHub/Models/PushRuleBypassRequest_status.cs @@ -0,0 +1,39 @@ +// +using System.Runtime.Serialization; +using System; +namespace GitHub.Models +{ + /// The status of the bypass request. + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.19.0")] + public enum PushRuleBypassRequest_status + { + [EnumMember(Value = "pending")] + #pragma warning disable CS1591 + Pending, + #pragma warning restore CS1591 + [EnumMember(Value = "denied")] + #pragma warning disable CS1591 + Denied, + #pragma warning restore CS1591 + [EnumMember(Value = "approved")] + #pragma warning disable CS1591 + Approved, + #pragma warning restore CS1591 + [EnumMember(Value = "cancelled")] + #pragma warning disable CS1591 + Cancelled, + #pragma warning restore CS1591 + [EnumMember(Value = "completed")] + #pragma warning disable CS1591 + Completed, + #pragma warning restore CS1591 + [EnumMember(Value = "expired")] + #pragma warning disable CS1591 + Expired, + #pragma warning restore CS1591 + [EnumMember(Value = "open")] + #pragma warning disable CS1591 + Open, + #pragma warning restore CS1591 + } +} diff --git a/src/GitHub/Models/RateLimitOverview_resources.cs b/src/GitHub/Models/RateLimitOverview_resources.cs index 163f0f2f..bf7838b3 100644 --- a/src/GitHub/Models/RateLimitOverview_resources.cs +++ b/src/GitHub/Models/RateLimitOverview_resources.cs @@ -22,6 +22,14 @@ public partial class RateLimitOverview_resources : IAdditionalDataHolder, IParsa #endif /// 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 code_scanning_autofix property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::GitHub.Models.RateLimit? CodeScanningAutofix { get; set; } +#nullable restore +#else + public global::GitHub.Models.RateLimit CodeScanningAutofix { get; set; } +#endif /// The code_scanning_upload property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -120,6 +128,7 @@ public virtual IDictionary> GetFieldDeserializers() return new Dictionary> { { "actions_runner_registration", n => { ActionsRunnerRegistration = n.GetObjectValue(global::GitHub.Models.RateLimit.CreateFromDiscriminatorValue); } }, + { "code_scanning_autofix", n => { CodeScanningAutofix = n.GetObjectValue(global::GitHub.Models.RateLimit.CreateFromDiscriminatorValue); } }, { "code_scanning_upload", n => { CodeScanningUpload = n.GetObjectValue(global::GitHub.Models.RateLimit.CreateFromDiscriminatorValue); } }, { "code_search", n => { CodeSearch = n.GetObjectValue(global::GitHub.Models.RateLimit.CreateFromDiscriminatorValue); } }, { "core", n => { Core = n.GetObjectValue(global::GitHub.Models.RateLimit.CreateFromDiscriminatorValue); } }, @@ -139,6 +148,7 @@ public virtual void Serialize(ISerializationWriter writer) { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("actions_runner_registration", ActionsRunnerRegistration); + writer.WriteObjectValue("code_scanning_autofix", CodeScanningAutofix); writer.WriteObjectValue("code_scanning_upload", CodeScanningUpload); writer.WriteObjectValue("code_search", CodeSearch); writer.WriteObjectValue("core", Core); diff --git a/src/GitHub/Models/RepositoryRule.cs b/src/GitHub/Models/RepositoryRule.cs index 47c1da54..bbea0c7e 100644 --- a/src/GitHub/Models/RepositoryRule.cs +++ b/src/GitHub/Models/RepositoryRule.cs @@ -157,6 +157,22 @@ public partial class RepositoryRule : IComposedTypeWrapper, IParsable #nullable restore #else public global::GitHub.Models.RepositoryRuleBranchNamePattern RepositoryRuleRepositoryRuleBranchNamePattern2 { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::GitHub.Models.RepositoryRuleBranchNamePattern? RepositoryRuleRepositoryRuleBranchNamePattern3 { get; set; } +#nullable restore +#else + public global::GitHub.Models.RepositoryRuleBranchNamePattern RepositoryRuleRepositoryRuleBranchNamePattern3 { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::GitHub.Models.RepositoryRuleBranchNamePattern? RepositoryRuleRepositoryRuleBranchNamePattern4 { get; set; } +#nullable restore +#else + public global::GitHub.Models.RepositoryRuleBranchNamePattern RepositoryRuleRepositoryRuleBranchNamePattern4 { get; set; } #endif /// Composed type representation for type #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -189,6 +205,22 @@ public partial class RepositoryRule : IComposedTypeWrapper, IParsable #nullable restore #else public global::GitHub.Models.RepositoryRuleCodeScanning RepositoryRuleRepositoryRuleCodeScanning2 { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::GitHub.Models.RepositoryRuleCodeScanning? RepositoryRuleRepositoryRuleCodeScanning3 { get; set; } +#nullable restore +#else + public global::GitHub.Models.RepositoryRuleCodeScanning RepositoryRuleRepositoryRuleCodeScanning3 { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::GitHub.Models.RepositoryRuleCodeScanning? RepositoryRuleRepositoryRuleCodeScanning4 { get; set; } +#nullable restore +#else + public global::GitHub.Models.RepositoryRuleCodeScanning RepositoryRuleRepositoryRuleCodeScanning4 { get; set; } #endif /// Composed type representation for type #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -221,6 +253,22 @@ public partial class RepositoryRule : IComposedTypeWrapper, IParsable #nullable restore #else public global::GitHub.Models.RepositoryRuleCommitAuthorEmailPattern RepositoryRuleRepositoryRuleCommitAuthorEmailPattern2 { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::GitHub.Models.RepositoryRuleCommitAuthorEmailPattern? RepositoryRuleRepositoryRuleCommitAuthorEmailPattern3 { get; set; } +#nullable restore +#else + public global::GitHub.Models.RepositoryRuleCommitAuthorEmailPattern RepositoryRuleRepositoryRuleCommitAuthorEmailPattern3 { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::GitHub.Models.RepositoryRuleCommitAuthorEmailPattern? RepositoryRuleRepositoryRuleCommitAuthorEmailPattern4 { get; set; } +#nullable restore +#else + public global::GitHub.Models.RepositoryRuleCommitAuthorEmailPattern RepositoryRuleRepositoryRuleCommitAuthorEmailPattern4 { get; set; } #endif /// Composed type representation for type #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -253,6 +301,22 @@ public partial class RepositoryRule : IComposedTypeWrapper, IParsable #nullable restore #else public global::GitHub.Models.RepositoryRuleCommitMessagePattern RepositoryRuleRepositoryRuleCommitMessagePattern2 { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::GitHub.Models.RepositoryRuleCommitMessagePattern? RepositoryRuleRepositoryRuleCommitMessagePattern3 { get; set; } +#nullable restore +#else + public global::GitHub.Models.RepositoryRuleCommitMessagePattern RepositoryRuleRepositoryRuleCommitMessagePattern3 { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::GitHub.Models.RepositoryRuleCommitMessagePattern? RepositoryRuleRepositoryRuleCommitMessagePattern4 { get; set; } +#nullable restore +#else + public global::GitHub.Models.RepositoryRuleCommitMessagePattern RepositoryRuleRepositoryRuleCommitMessagePattern4 { get; set; } #endif /// Composed type representation for type #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -285,6 +349,22 @@ public partial class RepositoryRule : IComposedTypeWrapper, IParsable #nullable restore #else public global::GitHub.Models.RepositoryRuleCommitterEmailPattern RepositoryRuleRepositoryRuleCommitterEmailPattern2 { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::GitHub.Models.RepositoryRuleCommitterEmailPattern? RepositoryRuleRepositoryRuleCommitterEmailPattern3 { get; set; } +#nullable restore +#else + public global::GitHub.Models.RepositoryRuleCommitterEmailPattern RepositoryRuleRepositoryRuleCommitterEmailPattern3 { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::GitHub.Models.RepositoryRuleCommitterEmailPattern? RepositoryRuleRepositoryRuleCommitterEmailPattern4 { get; set; } +#nullable restore +#else + public global::GitHub.Models.RepositoryRuleCommitterEmailPattern RepositoryRuleRepositoryRuleCommitterEmailPattern4 { get; set; } #endif /// Composed type representation for type #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -317,6 +397,22 @@ public partial class RepositoryRule : IComposedTypeWrapper, IParsable #nullable restore #else public global::GitHub.Models.RepositoryRuleCreation RepositoryRuleRepositoryRuleCreation2 { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::GitHub.Models.RepositoryRuleCreation? RepositoryRuleRepositoryRuleCreation3 { get; set; } +#nullable restore +#else + public global::GitHub.Models.RepositoryRuleCreation RepositoryRuleRepositoryRuleCreation3 { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::GitHub.Models.RepositoryRuleCreation? RepositoryRuleRepositoryRuleCreation4 { get; set; } +#nullable restore +#else + public global::GitHub.Models.RepositoryRuleCreation RepositoryRuleRepositoryRuleCreation4 { get; set; } #endif /// Composed type representation for type #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -349,6 +445,22 @@ public partial class RepositoryRule : IComposedTypeWrapper, IParsable #nullable restore #else public global::GitHub.Models.RepositoryRuleDeletion RepositoryRuleRepositoryRuleDeletion2 { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::GitHub.Models.RepositoryRuleDeletion? RepositoryRuleRepositoryRuleDeletion3 { get; set; } +#nullable restore +#else + public global::GitHub.Models.RepositoryRuleDeletion RepositoryRuleRepositoryRuleDeletion3 { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::GitHub.Models.RepositoryRuleDeletion? RepositoryRuleRepositoryRuleDeletion4 { get; set; } +#nullable restore +#else + public global::GitHub.Models.RepositoryRuleDeletion RepositoryRuleRepositoryRuleDeletion4 { get; set; } #endif /// Composed type representation for type #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -381,6 +493,22 @@ public partial class RepositoryRule : IComposedTypeWrapper, IParsable #nullable restore #else public global::GitHub.Models.RepositoryRuleMember1 RepositoryRuleRepositoryRuleMember12 { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::GitHub.Models.RepositoryRuleMember1? RepositoryRuleRepositoryRuleMember13 { get; set; } +#nullable restore +#else + public global::GitHub.Models.RepositoryRuleMember1 RepositoryRuleRepositoryRuleMember13 { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::GitHub.Models.RepositoryRuleMember1? RepositoryRuleRepositoryRuleMember14 { get; set; } +#nullable restore +#else + public global::GitHub.Models.RepositoryRuleMember1 RepositoryRuleRepositoryRuleMember14 { get; set; } #endif /// Composed type representation for type #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -413,6 +541,22 @@ public partial class RepositoryRule : IComposedTypeWrapper, IParsable #nullable restore #else public global::GitHub.Models.RepositoryRuleMember2 RepositoryRuleRepositoryRuleMember22 { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::GitHub.Models.RepositoryRuleMember2? RepositoryRuleRepositoryRuleMember23 { get; set; } +#nullable restore +#else + public global::GitHub.Models.RepositoryRuleMember2 RepositoryRuleRepositoryRuleMember23 { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::GitHub.Models.RepositoryRuleMember2? RepositoryRuleRepositoryRuleMember24 { get; set; } +#nullable restore +#else + public global::GitHub.Models.RepositoryRuleMember2 RepositoryRuleRepositoryRuleMember24 { get; set; } #endif /// Composed type representation for type #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -445,6 +589,22 @@ public partial class RepositoryRule : IComposedTypeWrapper, IParsable #nullable restore #else public global::GitHub.Models.RepositoryRuleMember3 RepositoryRuleRepositoryRuleMember32 { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::GitHub.Models.RepositoryRuleMember3? RepositoryRuleRepositoryRuleMember33 { get; set; } +#nullable restore +#else + public global::GitHub.Models.RepositoryRuleMember3 RepositoryRuleRepositoryRuleMember33 { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::GitHub.Models.RepositoryRuleMember3? RepositoryRuleRepositoryRuleMember34 { get; set; } +#nullable restore +#else + public global::GitHub.Models.RepositoryRuleMember3 RepositoryRuleRepositoryRuleMember34 { get; set; } #endif /// Composed type representation for type #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -477,6 +637,22 @@ public partial class RepositoryRule : IComposedTypeWrapper, IParsable #nullable restore #else public global::GitHub.Models.RepositoryRuleMember4 RepositoryRuleRepositoryRuleMember42 { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::GitHub.Models.RepositoryRuleMember4? RepositoryRuleRepositoryRuleMember43 { get; set; } +#nullable restore +#else + public global::GitHub.Models.RepositoryRuleMember4 RepositoryRuleRepositoryRuleMember43 { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::GitHub.Models.RepositoryRuleMember4? RepositoryRuleRepositoryRuleMember44 { get; set; } +#nullable restore +#else + public global::GitHub.Models.RepositoryRuleMember4 RepositoryRuleRepositoryRuleMember44 { get; set; } #endif /// Composed type representation for type #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -509,6 +685,22 @@ public partial class RepositoryRule : IComposedTypeWrapper, IParsable #nullable restore #else public global::GitHub.Models.RepositoryRuleMergeQueue RepositoryRuleRepositoryRuleMergeQueue2 { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::GitHub.Models.RepositoryRuleMergeQueue? RepositoryRuleRepositoryRuleMergeQueue3 { get; set; } +#nullable restore +#else + public global::GitHub.Models.RepositoryRuleMergeQueue RepositoryRuleRepositoryRuleMergeQueue3 { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::GitHub.Models.RepositoryRuleMergeQueue? RepositoryRuleRepositoryRuleMergeQueue4 { get; set; } +#nullable restore +#else + public global::GitHub.Models.RepositoryRuleMergeQueue RepositoryRuleRepositoryRuleMergeQueue4 { get; set; } #endif /// Composed type representation for type #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -541,6 +733,22 @@ public partial class RepositoryRule : IComposedTypeWrapper, IParsable #nullable restore #else public global::GitHub.Models.RepositoryRuleNonFastForward RepositoryRuleRepositoryRuleNonFastForward2 { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::GitHub.Models.RepositoryRuleNonFastForward? RepositoryRuleRepositoryRuleNonFastForward3 { get; set; } +#nullable restore +#else + public global::GitHub.Models.RepositoryRuleNonFastForward RepositoryRuleRepositoryRuleNonFastForward3 { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::GitHub.Models.RepositoryRuleNonFastForward? RepositoryRuleRepositoryRuleNonFastForward4 { get; set; } +#nullable restore +#else + public global::GitHub.Models.RepositoryRuleNonFastForward RepositoryRuleRepositoryRuleNonFastForward4 { get; set; } #endif /// Composed type representation for type #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -573,6 +781,22 @@ public partial class RepositoryRule : IComposedTypeWrapper, IParsable #nullable restore #else public global::GitHub.Models.RepositoryRulePullRequest RepositoryRuleRepositoryRulePullRequest2 { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::GitHub.Models.RepositoryRulePullRequest? RepositoryRuleRepositoryRulePullRequest3 { get; set; } +#nullable restore +#else + public global::GitHub.Models.RepositoryRulePullRequest RepositoryRuleRepositoryRulePullRequest3 { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::GitHub.Models.RepositoryRulePullRequest? RepositoryRuleRepositoryRulePullRequest4 { get; set; } +#nullable restore +#else + public global::GitHub.Models.RepositoryRulePullRequest RepositoryRuleRepositoryRulePullRequest4 { get; set; } #endif /// Composed type representation for type #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -605,6 +829,22 @@ public partial class RepositoryRule : IComposedTypeWrapper, IParsable #nullable restore #else public global::GitHub.Models.RepositoryRuleRequiredDeployments RepositoryRuleRepositoryRuleRequiredDeployments2 { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::GitHub.Models.RepositoryRuleRequiredDeployments? RepositoryRuleRepositoryRuleRequiredDeployments3 { get; set; } +#nullable restore +#else + public global::GitHub.Models.RepositoryRuleRequiredDeployments RepositoryRuleRepositoryRuleRequiredDeployments3 { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::GitHub.Models.RepositoryRuleRequiredDeployments? RepositoryRuleRepositoryRuleRequiredDeployments4 { get; set; } +#nullable restore +#else + public global::GitHub.Models.RepositoryRuleRequiredDeployments RepositoryRuleRepositoryRuleRequiredDeployments4 { get; set; } #endif /// Composed type representation for type #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -637,6 +877,22 @@ public partial class RepositoryRule : IComposedTypeWrapper, IParsable #nullable restore #else public global::GitHub.Models.RepositoryRuleRequiredLinearHistory RepositoryRuleRepositoryRuleRequiredLinearHistory2 { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::GitHub.Models.RepositoryRuleRequiredLinearHistory? RepositoryRuleRepositoryRuleRequiredLinearHistory3 { get; set; } +#nullable restore +#else + public global::GitHub.Models.RepositoryRuleRequiredLinearHistory RepositoryRuleRepositoryRuleRequiredLinearHistory3 { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::GitHub.Models.RepositoryRuleRequiredLinearHistory? RepositoryRuleRepositoryRuleRequiredLinearHistory4 { get; set; } +#nullable restore +#else + public global::GitHub.Models.RepositoryRuleRequiredLinearHistory RepositoryRuleRepositoryRuleRequiredLinearHistory4 { get; set; } #endif /// Composed type representation for type #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -669,6 +925,22 @@ public partial class RepositoryRule : IComposedTypeWrapper, IParsable #nullable restore #else public global::GitHub.Models.RepositoryRuleRequiredSignatures RepositoryRuleRepositoryRuleRequiredSignatures2 { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::GitHub.Models.RepositoryRuleRequiredSignatures? RepositoryRuleRepositoryRuleRequiredSignatures3 { get; set; } +#nullable restore +#else + public global::GitHub.Models.RepositoryRuleRequiredSignatures RepositoryRuleRepositoryRuleRequiredSignatures3 { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::GitHub.Models.RepositoryRuleRequiredSignatures? RepositoryRuleRepositoryRuleRequiredSignatures4 { get; set; } +#nullable restore +#else + public global::GitHub.Models.RepositoryRuleRequiredSignatures RepositoryRuleRepositoryRuleRequiredSignatures4 { get; set; } #endif /// Composed type representation for type #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -701,6 +973,22 @@ public partial class RepositoryRule : IComposedTypeWrapper, IParsable #nullable restore #else public global::GitHub.Models.RepositoryRuleRequiredStatusChecks RepositoryRuleRepositoryRuleRequiredStatusChecks2 { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::GitHub.Models.RepositoryRuleRequiredStatusChecks? RepositoryRuleRepositoryRuleRequiredStatusChecks3 { get; set; } +#nullable restore +#else + public global::GitHub.Models.RepositoryRuleRequiredStatusChecks RepositoryRuleRepositoryRuleRequiredStatusChecks3 { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::GitHub.Models.RepositoryRuleRequiredStatusChecks? RepositoryRuleRepositoryRuleRequiredStatusChecks4 { get; set; } +#nullable restore +#else + public global::GitHub.Models.RepositoryRuleRequiredStatusChecks RepositoryRuleRepositoryRuleRequiredStatusChecks4 { get; set; } #endif /// Composed type representation for type #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -733,6 +1021,22 @@ public partial class RepositoryRule : IComposedTypeWrapper, IParsable #nullable restore #else public global::GitHub.Models.RepositoryRuleTagNamePattern RepositoryRuleRepositoryRuleTagNamePattern2 { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::GitHub.Models.RepositoryRuleTagNamePattern? RepositoryRuleRepositoryRuleTagNamePattern3 { get; set; } +#nullable restore +#else + public global::GitHub.Models.RepositoryRuleTagNamePattern RepositoryRuleRepositoryRuleTagNamePattern3 { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::GitHub.Models.RepositoryRuleTagNamePattern? RepositoryRuleRepositoryRuleTagNamePattern4 { get; set; } +#nullable restore +#else + public global::GitHub.Models.RepositoryRuleTagNamePattern RepositoryRuleRepositoryRuleTagNamePattern4 { get; set; } #endif /// Composed type representation for type #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -765,6 +1069,22 @@ public partial class RepositoryRule : IComposedTypeWrapper, IParsable #nullable restore #else public global::GitHub.Models.RepositoryRuleUpdate RepositoryRuleRepositoryRuleUpdate2 { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::GitHub.Models.RepositoryRuleUpdate? RepositoryRuleRepositoryRuleUpdate3 { get; set; } +#nullable restore +#else + public global::GitHub.Models.RepositoryRuleUpdate RepositoryRuleRepositoryRuleUpdate3 { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::GitHub.Models.RepositoryRuleUpdate? RepositoryRuleRepositoryRuleUpdate4 { get; set; } +#nullable restore +#else + public global::GitHub.Models.RepositoryRuleUpdate RepositoryRuleRepositoryRuleUpdate4 { get; set; } #endif /// Composed type representation for type #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -797,6 +1117,22 @@ public partial class RepositoryRule : IComposedTypeWrapper, IParsable #nullable restore #else public global::GitHub.Models.RepositoryRuleWorkflows RepositoryRuleRepositoryRuleWorkflows2 { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::GitHub.Models.RepositoryRuleWorkflows? RepositoryRuleRepositoryRuleWorkflows3 { get; set; } +#nullable restore +#else + public global::GitHub.Models.RepositoryRuleWorkflows RepositoryRuleRepositoryRuleWorkflows3 { get; set; } +#endif + /// Composed type representation for type +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::GitHub.Models.RepositoryRuleWorkflows? RepositoryRuleRepositoryRuleWorkflows4 { get; set; } +#nullable restore +#else + public global::GitHub.Models.RepositoryRuleWorkflows RepositoryRuleRepositoryRuleWorkflows4 { get; set; } #endif /// Composed type representation for type #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER @@ -936,6 +1272,14 @@ public partial class RepositoryRule : IComposedTypeWrapper, IParsable { result.RepositoryRuleRepositoryRuleBranchNamePattern2 = new global::GitHub.Models.RepositoryRuleBranchNamePattern(); } + else if("repository-rule-branch-name-pattern".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.RepositoryRuleRepositoryRuleBranchNamePattern3 = new global::GitHub.Models.RepositoryRuleBranchNamePattern(); + } + else if("repository-rule-branch-name-pattern".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.RepositoryRuleRepositoryRuleBranchNamePattern4 = new global::GitHub.Models.RepositoryRuleBranchNamePattern(); + } else if("repository-rule-code-scanning".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) { result.RepositoryRuleRepositoryRuleCodeScanning = new global::GitHub.Models.RepositoryRuleCodeScanning(); @@ -952,6 +1296,14 @@ public partial class RepositoryRule : IComposedTypeWrapper, IParsable { result.RepositoryRuleRepositoryRuleCodeScanning2 = new global::GitHub.Models.RepositoryRuleCodeScanning(); } + else if("repository-rule-code-scanning".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.RepositoryRuleRepositoryRuleCodeScanning3 = new global::GitHub.Models.RepositoryRuleCodeScanning(); + } + else if("repository-rule-code-scanning".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.RepositoryRuleRepositoryRuleCodeScanning4 = new global::GitHub.Models.RepositoryRuleCodeScanning(); + } else if("repository-rule-commit-author-email-pattern".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) { result.RepositoryRuleRepositoryRuleCommitAuthorEmailPattern = new global::GitHub.Models.RepositoryRuleCommitAuthorEmailPattern(); @@ -968,6 +1320,14 @@ public partial class RepositoryRule : IComposedTypeWrapper, IParsable { result.RepositoryRuleRepositoryRuleCommitAuthorEmailPattern2 = new global::GitHub.Models.RepositoryRuleCommitAuthorEmailPattern(); } + else if("repository-rule-commit-author-email-pattern".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.RepositoryRuleRepositoryRuleCommitAuthorEmailPattern3 = new global::GitHub.Models.RepositoryRuleCommitAuthorEmailPattern(); + } + else if("repository-rule-commit-author-email-pattern".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.RepositoryRuleRepositoryRuleCommitAuthorEmailPattern4 = new global::GitHub.Models.RepositoryRuleCommitAuthorEmailPattern(); + } else if("repository-rule-commit-message-pattern".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) { result.RepositoryRuleRepositoryRuleCommitMessagePattern = new global::GitHub.Models.RepositoryRuleCommitMessagePattern(); @@ -984,6 +1344,14 @@ public partial class RepositoryRule : IComposedTypeWrapper, IParsable { result.RepositoryRuleRepositoryRuleCommitMessagePattern2 = new global::GitHub.Models.RepositoryRuleCommitMessagePattern(); } + else if("repository-rule-commit-message-pattern".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.RepositoryRuleRepositoryRuleCommitMessagePattern3 = new global::GitHub.Models.RepositoryRuleCommitMessagePattern(); + } + else if("repository-rule-commit-message-pattern".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.RepositoryRuleRepositoryRuleCommitMessagePattern4 = new global::GitHub.Models.RepositoryRuleCommitMessagePattern(); + } else if("repository-rule-committer-email-pattern".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) { result.RepositoryRuleRepositoryRuleCommitterEmailPattern = new global::GitHub.Models.RepositoryRuleCommitterEmailPattern(); @@ -1000,6 +1368,14 @@ public partial class RepositoryRule : IComposedTypeWrapper, IParsable { result.RepositoryRuleRepositoryRuleCommitterEmailPattern2 = new global::GitHub.Models.RepositoryRuleCommitterEmailPattern(); } + else if("repository-rule-committer-email-pattern".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.RepositoryRuleRepositoryRuleCommitterEmailPattern3 = new global::GitHub.Models.RepositoryRuleCommitterEmailPattern(); + } + else if("repository-rule-committer-email-pattern".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.RepositoryRuleRepositoryRuleCommitterEmailPattern4 = new global::GitHub.Models.RepositoryRuleCommitterEmailPattern(); + } else if("repository-rule-creation".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) { result.RepositoryRuleRepositoryRuleCreation = new global::GitHub.Models.RepositoryRuleCreation(); @@ -1016,21 +1392,37 @@ public partial class RepositoryRule : IComposedTypeWrapper, IParsable { result.RepositoryRuleRepositoryRuleCreation2 = new global::GitHub.Models.RepositoryRuleCreation(); } + else if("repository-rule-creation".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.RepositoryRuleRepositoryRuleCreation3 = new global::GitHub.Models.RepositoryRuleCreation(); + } + else if("repository-rule-creation".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.RepositoryRuleRepositoryRuleCreation4 = new global::GitHub.Models.RepositoryRuleCreation(); + } else if("repository-rule-deletion".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) { result.RepositoryRuleRepositoryRuleDeletion = new global::GitHub.Models.RepositoryRuleDeletion(); } else if("repository-rule-deletion".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) { - result.RepositoryRuleRepositoryRuleDeletion0 = new global::GitHub.Models.RepositoryRuleDeletion(); + result.RepositoryRuleRepositoryRuleDeletion0 = new global::GitHub.Models.RepositoryRuleDeletion(); + } + else if("repository-rule-deletion".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.RepositoryRuleRepositoryRuleDeletion1 = new global::GitHub.Models.RepositoryRuleDeletion(); + } + else if("repository-rule-deletion".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.RepositoryRuleRepositoryRuleDeletion2 = new global::GitHub.Models.RepositoryRuleDeletion(); } else if("repository-rule-deletion".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) { - result.RepositoryRuleRepositoryRuleDeletion1 = new global::GitHub.Models.RepositoryRuleDeletion(); + result.RepositoryRuleRepositoryRuleDeletion3 = new global::GitHub.Models.RepositoryRuleDeletion(); } else if("repository-rule-deletion".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) { - result.RepositoryRuleRepositoryRuleDeletion2 = new global::GitHub.Models.RepositoryRuleDeletion(); + result.RepositoryRuleRepositoryRuleDeletion4 = new global::GitHub.Models.RepositoryRuleDeletion(); } else if("".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) { @@ -1049,6 +1441,14 @@ public partial class RepositoryRule : IComposedTypeWrapper, IParsable result.RepositoryRuleRepositoryRuleMember12 = new global::GitHub.Models.RepositoryRuleMember1(); } else if("".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.RepositoryRuleRepositoryRuleMember13 = new global::GitHub.Models.RepositoryRuleMember1(); + } + else if("".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.RepositoryRuleRepositoryRuleMember14 = new global::GitHub.Models.RepositoryRuleMember1(); + } + else if("".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) { result.RepositoryRuleRepositoryRuleMember2 = new global::GitHub.Models.RepositoryRuleMember2(); } @@ -1065,6 +1465,14 @@ public partial class RepositoryRule : IComposedTypeWrapper, IParsable result.RepositoryRuleRepositoryRuleMember22 = new global::GitHub.Models.RepositoryRuleMember2(); } else if("".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.RepositoryRuleRepositoryRuleMember23 = new global::GitHub.Models.RepositoryRuleMember2(); + } + else if("".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.RepositoryRuleRepositoryRuleMember24 = new global::GitHub.Models.RepositoryRuleMember2(); + } + else if("".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) { result.RepositoryRuleRepositoryRuleMember3 = new global::GitHub.Models.RepositoryRuleMember3(); } @@ -1081,6 +1489,14 @@ public partial class RepositoryRule : IComposedTypeWrapper, IParsable result.RepositoryRuleRepositoryRuleMember32 = new global::GitHub.Models.RepositoryRuleMember3(); } else if("".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.RepositoryRuleRepositoryRuleMember33 = new global::GitHub.Models.RepositoryRuleMember3(); + } + else if("".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.RepositoryRuleRepositoryRuleMember34 = new global::GitHub.Models.RepositoryRuleMember3(); + } + else if("".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) { result.RepositoryRuleRepositoryRuleMember4 = new global::GitHub.Models.RepositoryRuleMember4(); } @@ -1096,6 +1512,14 @@ public partial class RepositoryRule : IComposedTypeWrapper, IParsable { result.RepositoryRuleRepositoryRuleMember42 = new global::GitHub.Models.RepositoryRuleMember4(); } + else if("".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.RepositoryRuleRepositoryRuleMember43 = new global::GitHub.Models.RepositoryRuleMember4(); + } + else if("".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.RepositoryRuleRepositoryRuleMember44 = new global::GitHub.Models.RepositoryRuleMember4(); + } else if("repository-rule-merge-queue".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) { result.RepositoryRuleRepositoryRuleMergeQueue = new global::GitHub.Models.RepositoryRuleMergeQueue(); @@ -1112,6 +1536,14 @@ public partial class RepositoryRule : IComposedTypeWrapper, IParsable { result.RepositoryRuleRepositoryRuleMergeQueue2 = new global::GitHub.Models.RepositoryRuleMergeQueue(); } + else if("repository-rule-merge-queue".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.RepositoryRuleRepositoryRuleMergeQueue3 = new global::GitHub.Models.RepositoryRuleMergeQueue(); + } + else if("repository-rule-merge-queue".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.RepositoryRuleRepositoryRuleMergeQueue4 = new global::GitHub.Models.RepositoryRuleMergeQueue(); + } else if("repository-rule-non-fast-forward".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) { result.RepositoryRuleRepositoryRuleNonFastForward = new global::GitHub.Models.RepositoryRuleNonFastForward(); @@ -1128,6 +1560,14 @@ public partial class RepositoryRule : IComposedTypeWrapper, IParsable { result.RepositoryRuleRepositoryRuleNonFastForward2 = new global::GitHub.Models.RepositoryRuleNonFastForward(); } + else if("repository-rule-non-fast-forward".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.RepositoryRuleRepositoryRuleNonFastForward3 = new global::GitHub.Models.RepositoryRuleNonFastForward(); + } + else if("repository-rule-non-fast-forward".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.RepositoryRuleRepositoryRuleNonFastForward4 = new global::GitHub.Models.RepositoryRuleNonFastForward(); + } else if("repository-rule-pull-request".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) { result.RepositoryRuleRepositoryRulePullRequest = new global::GitHub.Models.RepositoryRulePullRequest(); @@ -1144,6 +1584,14 @@ public partial class RepositoryRule : IComposedTypeWrapper, IParsable { result.RepositoryRuleRepositoryRulePullRequest2 = new global::GitHub.Models.RepositoryRulePullRequest(); } + else if("repository-rule-pull-request".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.RepositoryRuleRepositoryRulePullRequest3 = new global::GitHub.Models.RepositoryRulePullRequest(); + } + else if("repository-rule-pull-request".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.RepositoryRuleRepositoryRulePullRequest4 = new global::GitHub.Models.RepositoryRulePullRequest(); + } else if("repository-rule-required-deployments".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) { result.RepositoryRuleRepositoryRuleRequiredDeployments = new global::GitHub.Models.RepositoryRuleRequiredDeployments(); @@ -1160,6 +1608,14 @@ public partial class RepositoryRule : IComposedTypeWrapper, IParsable { result.RepositoryRuleRepositoryRuleRequiredDeployments2 = new global::GitHub.Models.RepositoryRuleRequiredDeployments(); } + else if("repository-rule-required-deployments".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.RepositoryRuleRepositoryRuleRequiredDeployments3 = new global::GitHub.Models.RepositoryRuleRequiredDeployments(); + } + else if("repository-rule-required-deployments".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.RepositoryRuleRepositoryRuleRequiredDeployments4 = new global::GitHub.Models.RepositoryRuleRequiredDeployments(); + } else if("repository-rule-required-linear-history".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) { result.RepositoryRuleRepositoryRuleRequiredLinearHistory = new global::GitHub.Models.RepositoryRuleRequiredLinearHistory(); @@ -1176,6 +1632,14 @@ public partial class RepositoryRule : IComposedTypeWrapper, IParsable { result.RepositoryRuleRepositoryRuleRequiredLinearHistory2 = new global::GitHub.Models.RepositoryRuleRequiredLinearHistory(); } + else if("repository-rule-required-linear-history".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.RepositoryRuleRepositoryRuleRequiredLinearHistory3 = new global::GitHub.Models.RepositoryRuleRequiredLinearHistory(); + } + else if("repository-rule-required-linear-history".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.RepositoryRuleRepositoryRuleRequiredLinearHistory4 = new global::GitHub.Models.RepositoryRuleRequiredLinearHistory(); + } else if("repository-rule-required-signatures".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) { result.RepositoryRuleRepositoryRuleRequiredSignatures = new global::GitHub.Models.RepositoryRuleRequiredSignatures(); @@ -1192,6 +1656,14 @@ public partial class RepositoryRule : IComposedTypeWrapper, IParsable { result.RepositoryRuleRepositoryRuleRequiredSignatures2 = new global::GitHub.Models.RepositoryRuleRequiredSignatures(); } + else if("repository-rule-required-signatures".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.RepositoryRuleRepositoryRuleRequiredSignatures3 = new global::GitHub.Models.RepositoryRuleRequiredSignatures(); + } + else if("repository-rule-required-signatures".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.RepositoryRuleRepositoryRuleRequiredSignatures4 = new global::GitHub.Models.RepositoryRuleRequiredSignatures(); + } else if("repository-rule-required-status-checks".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) { result.RepositoryRuleRepositoryRuleRequiredStatusChecks = new global::GitHub.Models.RepositoryRuleRequiredStatusChecks(); @@ -1208,6 +1680,14 @@ public partial class RepositoryRule : IComposedTypeWrapper, IParsable { result.RepositoryRuleRepositoryRuleRequiredStatusChecks2 = new global::GitHub.Models.RepositoryRuleRequiredStatusChecks(); } + else if("repository-rule-required-status-checks".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.RepositoryRuleRepositoryRuleRequiredStatusChecks3 = new global::GitHub.Models.RepositoryRuleRequiredStatusChecks(); + } + else if("repository-rule-required-status-checks".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.RepositoryRuleRepositoryRuleRequiredStatusChecks4 = new global::GitHub.Models.RepositoryRuleRequiredStatusChecks(); + } else if("repository-rule-tag-name-pattern".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) { result.RepositoryRuleRepositoryRuleTagNamePattern = new global::GitHub.Models.RepositoryRuleTagNamePattern(); @@ -1224,6 +1704,14 @@ public partial class RepositoryRule : IComposedTypeWrapper, IParsable { result.RepositoryRuleRepositoryRuleTagNamePattern2 = new global::GitHub.Models.RepositoryRuleTagNamePattern(); } + else if("repository-rule-tag-name-pattern".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.RepositoryRuleRepositoryRuleTagNamePattern3 = new global::GitHub.Models.RepositoryRuleTagNamePattern(); + } + else if("repository-rule-tag-name-pattern".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.RepositoryRuleRepositoryRuleTagNamePattern4 = new global::GitHub.Models.RepositoryRuleTagNamePattern(); + } else if("repository-rule-update".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) { result.RepositoryRuleRepositoryRuleUpdate = new global::GitHub.Models.RepositoryRuleUpdate(); @@ -1240,6 +1728,14 @@ public partial class RepositoryRule : IComposedTypeWrapper, IParsable { result.RepositoryRuleRepositoryRuleUpdate2 = new global::GitHub.Models.RepositoryRuleUpdate(); } + else if("repository-rule-update".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.RepositoryRuleRepositoryRuleUpdate3 = new global::GitHub.Models.RepositoryRuleUpdate(); + } + else if("repository-rule-update".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.RepositoryRuleRepositoryRuleUpdate4 = new global::GitHub.Models.RepositoryRuleUpdate(); + } else if("repository-rule-workflows".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) { result.RepositoryRuleRepositoryRuleWorkflows = new global::GitHub.Models.RepositoryRuleWorkflows(); @@ -1256,6 +1752,14 @@ public partial class RepositoryRule : IComposedTypeWrapper, IParsable { result.RepositoryRuleRepositoryRuleWorkflows2 = new global::GitHub.Models.RepositoryRuleWorkflows(); } + else if("repository-rule-workflows".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.RepositoryRuleRepositoryRuleWorkflows3 = new global::GitHub.Models.RepositoryRuleWorkflows(); + } + else if("repository-rule-workflows".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) + { + result.RepositoryRuleRepositoryRuleWorkflows4 = new global::GitHub.Models.RepositoryRuleWorkflows(); + } else if("repository-rule-required-deployments".Equals(mappingValue, StringComparison.OrdinalIgnoreCase)) { result.RepositoryRuleRequiredDeployments = new global::GitHub.Models.RepositoryRuleRequiredDeployments(); @@ -1364,6 +1868,14 @@ public virtual IDictionary> GetFieldDeserializers() { return RepositoryRuleRepositoryRuleBranchNamePattern2.GetFieldDeserializers(); } + else if(RepositoryRuleRepositoryRuleBranchNamePattern3 != null) + { + return RepositoryRuleRepositoryRuleBranchNamePattern3.GetFieldDeserializers(); + } + else if(RepositoryRuleRepositoryRuleBranchNamePattern4 != null) + { + return RepositoryRuleRepositoryRuleBranchNamePattern4.GetFieldDeserializers(); + } else if(RepositoryRuleRepositoryRuleCodeScanning != null) { return RepositoryRuleRepositoryRuleCodeScanning.GetFieldDeserializers(); @@ -1380,6 +1892,14 @@ public virtual IDictionary> GetFieldDeserializers() { return RepositoryRuleRepositoryRuleCodeScanning2.GetFieldDeserializers(); } + else if(RepositoryRuleRepositoryRuleCodeScanning3 != null) + { + return RepositoryRuleRepositoryRuleCodeScanning3.GetFieldDeserializers(); + } + else if(RepositoryRuleRepositoryRuleCodeScanning4 != null) + { + return RepositoryRuleRepositoryRuleCodeScanning4.GetFieldDeserializers(); + } else if(RepositoryRuleRepositoryRuleCommitAuthorEmailPattern != null) { return RepositoryRuleRepositoryRuleCommitAuthorEmailPattern.GetFieldDeserializers(); @@ -1396,6 +1916,14 @@ public virtual IDictionary> GetFieldDeserializers() { return RepositoryRuleRepositoryRuleCommitAuthorEmailPattern2.GetFieldDeserializers(); } + else if(RepositoryRuleRepositoryRuleCommitAuthorEmailPattern3 != null) + { + return RepositoryRuleRepositoryRuleCommitAuthorEmailPattern3.GetFieldDeserializers(); + } + else if(RepositoryRuleRepositoryRuleCommitAuthorEmailPattern4 != null) + { + return RepositoryRuleRepositoryRuleCommitAuthorEmailPattern4.GetFieldDeserializers(); + } else if(RepositoryRuleRepositoryRuleCommitMessagePattern != null) { return RepositoryRuleRepositoryRuleCommitMessagePattern.GetFieldDeserializers(); @@ -1412,6 +1940,14 @@ public virtual IDictionary> GetFieldDeserializers() { return RepositoryRuleRepositoryRuleCommitMessagePattern2.GetFieldDeserializers(); } + else if(RepositoryRuleRepositoryRuleCommitMessagePattern3 != null) + { + return RepositoryRuleRepositoryRuleCommitMessagePattern3.GetFieldDeserializers(); + } + else if(RepositoryRuleRepositoryRuleCommitMessagePattern4 != null) + { + return RepositoryRuleRepositoryRuleCommitMessagePattern4.GetFieldDeserializers(); + } else if(RepositoryRuleRepositoryRuleCommitterEmailPattern != null) { return RepositoryRuleRepositoryRuleCommitterEmailPattern.GetFieldDeserializers(); @@ -1428,6 +1964,14 @@ public virtual IDictionary> GetFieldDeserializers() { return RepositoryRuleRepositoryRuleCommitterEmailPattern2.GetFieldDeserializers(); } + else if(RepositoryRuleRepositoryRuleCommitterEmailPattern3 != null) + { + return RepositoryRuleRepositoryRuleCommitterEmailPattern3.GetFieldDeserializers(); + } + else if(RepositoryRuleRepositoryRuleCommitterEmailPattern4 != null) + { + return RepositoryRuleRepositoryRuleCommitterEmailPattern4.GetFieldDeserializers(); + } else if(RepositoryRuleRepositoryRuleCreation != null) { return RepositoryRuleRepositoryRuleCreation.GetFieldDeserializers(); @@ -1444,6 +1988,14 @@ public virtual IDictionary> GetFieldDeserializers() { return RepositoryRuleRepositoryRuleCreation2.GetFieldDeserializers(); } + else if(RepositoryRuleRepositoryRuleCreation3 != null) + { + return RepositoryRuleRepositoryRuleCreation3.GetFieldDeserializers(); + } + else if(RepositoryRuleRepositoryRuleCreation4 != null) + { + return RepositoryRuleRepositoryRuleCreation4.GetFieldDeserializers(); + } else if(RepositoryRuleRepositoryRuleDeletion != null) { return RepositoryRuleRepositoryRuleDeletion.GetFieldDeserializers(); @@ -1460,6 +2012,14 @@ public virtual IDictionary> GetFieldDeserializers() { return RepositoryRuleRepositoryRuleDeletion2.GetFieldDeserializers(); } + else if(RepositoryRuleRepositoryRuleDeletion3 != null) + { + return RepositoryRuleRepositoryRuleDeletion3.GetFieldDeserializers(); + } + else if(RepositoryRuleRepositoryRuleDeletion4 != null) + { + return RepositoryRuleRepositoryRuleDeletion4.GetFieldDeserializers(); + } else if(RepositoryRuleRepositoryRuleMember1 != null) { return RepositoryRuleRepositoryRuleMember1.GetFieldDeserializers(); @@ -1476,6 +2036,14 @@ public virtual IDictionary> GetFieldDeserializers() { return RepositoryRuleRepositoryRuleMember12.GetFieldDeserializers(); } + else if(RepositoryRuleRepositoryRuleMember13 != null) + { + return RepositoryRuleRepositoryRuleMember13.GetFieldDeserializers(); + } + else if(RepositoryRuleRepositoryRuleMember14 != null) + { + return RepositoryRuleRepositoryRuleMember14.GetFieldDeserializers(); + } else if(RepositoryRuleRepositoryRuleMember2 != null) { return RepositoryRuleRepositoryRuleMember2.GetFieldDeserializers(); @@ -1492,6 +2060,14 @@ public virtual IDictionary> GetFieldDeserializers() { return RepositoryRuleRepositoryRuleMember22.GetFieldDeserializers(); } + else if(RepositoryRuleRepositoryRuleMember23 != null) + { + return RepositoryRuleRepositoryRuleMember23.GetFieldDeserializers(); + } + else if(RepositoryRuleRepositoryRuleMember24 != null) + { + return RepositoryRuleRepositoryRuleMember24.GetFieldDeserializers(); + } else if(RepositoryRuleRepositoryRuleMember3 != null) { return RepositoryRuleRepositoryRuleMember3.GetFieldDeserializers(); @@ -1508,6 +2084,14 @@ public virtual IDictionary> GetFieldDeserializers() { return RepositoryRuleRepositoryRuleMember32.GetFieldDeserializers(); } + else if(RepositoryRuleRepositoryRuleMember33 != null) + { + return RepositoryRuleRepositoryRuleMember33.GetFieldDeserializers(); + } + else if(RepositoryRuleRepositoryRuleMember34 != null) + { + return RepositoryRuleRepositoryRuleMember34.GetFieldDeserializers(); + } else if(RepositoryRuleRepositoryRuleMember4 != null) { return RepositoryRuleRepositoryRuleMember4.GetFieldDeserializers(); @@ -1524,6 +2108,14 @@ public virtual IDictionary> GetFieldDeserializers() { return RepositoryRuleRepositoryRuleMember42.GetFieldDeserializers(); } + else if(RepositoryRuleRepositoryRuleMember43 != null) + { + return RepositoryRuleRepositoryRuleMember43.GetFieldDeserializers(); + } + else if(RepositoryRuleRepositoryRuleMember44 != null) + { + return RepositoryRuleRepositoryRuleMember44.GetFieldDeserializers(); + } else if(RepositoryRuleRepositoryRuleMergeQueue != null) { return RepositoryRuleRepositoryRuleMergeQueue.GetFieldDeserializers(); @@ -1540,6 +2132,14 @@ public virtual IDictionary> GetFieldDeserializers() { return RepositoryRuleRepositoryRuleMergeQueue2.GetFieldDeserializers(); } + else if(RepositoryRuleRepositoryRuleMergeQueue3 != null) + { + return RepositoryRuleRepositoryRuleMergeQueue3.GetFieldDeserializers(); + } + else if(RepositoryRuleRepositoryRuleMergeQueue4 != null) + { + return RepositoryRuleRepositoryRuleMergeQueue4.GetFieldDeserializers(); + } else if(RepositoryRuleRepositoryRuleNonFastForward != null) { return RepositoryRuleRepositoryRuleNonFastForward.GetFieldDeserializers(); @@ -1556,6 +2156,14 @@ public virtual IDictionary> GetFieldDeserializers() { return RepositoryRuleRepositoryRuleNonFastForward2.GetFieldDeserializers(); } + else if(RepositoryRuleRepositoryRuleNonFastForward3 != null) + { + return RepositoryRuleRepositoryRuleNonFastForward3.GetFieldDeserializers(); + } + else if(RepositoryRuleRepositoryRuleNonFastForward4 != null) + { + return RepositoryRuleRepositoryRuleNonFastForward4.GetFieldDeserializers(); + } else if(RepositoryRuleRepositoryRulePullRequest != null) { return RepositoryRuleRepositoryRulePullRequest.GetFieldDeserializers(); @@ -1572,6 +2180,14 @@ public virtual IDictionary> GetFieldDeserializers() { return RepositoryRuleRepositoryRulePullRequest2.GetFieldDeserializers(); } + else if(RepositoryRuleRepositoryRulePullRequest3 != null) + { + return RepositoryRuleRepositoryRulePullRequest3.GetFieldDeserializers(); + } + else if(RepositoryRuleRepositoryRulePullRequest4 != null) + { + return RepositoryRuleRepositoryRulePullRequest4.GetFieldDeserializers(); + } else if(RepositoryRuleRepositoryRuleRequiredDeployments != null) { return RepositoryRuleRepositoryRuleRequiredDeployments.GetFieldDeserializers(); @@ -1588,6 +2204,14 @@ public virtual IDictionary> GetFieldDeserializers() { return RepositoryRuleRepositoryRuleRequiredDeployments2.GetFieldDeserializers(); } + else if(RepositoryRuleRepositoryRuleRequiredDeployments3 != null) + { + return RepositoryRuleRepositoryRuleRequiredDeployments3.GetFieldDeserializers(); + } + else if(RepositoryRuleRepositoryRuleRequiredDeployments4 != null) + { + return RepositoryRuleRepositoryRuleRequiredDeployments4.GetFieldDeserializers(); + } else if(RepositoryRuleRepositoryRuleRequiredLinearHistory != null) { return RepositoryRuleRepositoryRuleRequiredLinearHistory.GetFieldDeserializers(); @@ -1604,6 +2228,14 @@ public virtual IDictionary> GetFieldDeserializers() { return RepositoryRuleRepositoryRuleRequiredLinearHistory2.GetFieldDeserializers(); } + else if(RepositoryRuleRepositoryRuleRequiredLinearHistory3 != null) + { + return RepositoryRuleRepositoryRuleRequiredLinearHistory3.GetFieldDeserializers(); + } + else if(RepositoryRuleRepositoryRuleRequiredLinearHistory4 != null) + { + return RepositoryRuleRepositoryRuleRequiredLinearHistory4.GetFieldDeserializers(); + } else if(RepositoryRuleRepositoryRuleRequiredSignatures != null) { return RepositoryRuleRepositoryRuleRequiredSignatures.GetFieldDeserializers(); @@ -1620,6 +2252,14 @@ public virtual IDictionary> GetFieldDeserializers() { return RepositoryRuleRepositoryRuleRequiredSignatures2.GetFieldDeserializers(); } + else if(RepositoryRuleRepositoryRuleRequiredSignatures3 != null) + { + return RepositoryRuleRepositoryRuleRequiredSignatures3.GetFieldDeserializers(); + } + else if(RepositoryRuleRepositoryRuleRequiredSignatures4 != null) + { + return RepositoryRuleRepositoryRuleRequiredSignatures4.GetFieldDeserializers(); + } else if(RepositoryRuleRepositoryRuleRequiredStatusChecks != null) { return RepositoryRuleRepositoryRuleRequiredStatusChecks.GetFieldDeserializers(); @@ -1636,6 +2276,14 @@ public virtual IDictionary> GetFieldDeserializers() { return RepositoryRuleRepositoryRuleRequiredStatusChecks2.GetFieldDeserializers(); } + else if(RepositoryRuleRepositoryRuleRequiredStatusChecks3 != null) + { + return RepositoryRuleRepositoryRuleRequiredStatusChecks3.GetFieldDeserializers(); + } + else if(RepositoryRuleRepositoryRuleRequiredStatusChecks4 != null) + { + return RepositoryRuleRepositoryRuleRequiredStatusChecks4.GetFieldDeserializers(); + } else if(RepositoryRuleRepositoryRuleTagNamePattern != null) { return RepositoryRuleRepositoryRuleTagNamePattern.GetFieldDeserializers(); @@ -1652,6 +2300,14 @@ public virtual IDictionary> GetFieldDeserializers() { return RepositoryRuleRepositoryRuleTagNamePattern2.GetFieldDeserializers(); } + else if(RepositoryRuleRepositoryRuleTagNamePattern3 != null) + { + return RepositoryRuleRepositoryRuleTagNamePattern3.GetFieldDeserializers(); + } + else if(RepositoryRuleRepositoryRuleTagNamePattern4 != null) + { + return RepositoryRuleRepositoryRuleTagNamePattern4.GetFieldDeserializers(); + } else if(RepositoryRuleRepositoryRuleUpdate != null) { return RepositoryRuleRepositoryRuleUpdate.GetFieldDeserializers(); @@ -1668,6 +2324,14 @@ public virtual IDictionary> GetFieldDeserializers() { return RepositoryRuleRepositoryRuleUpdate2.GetFieldDeserializers(); } + else if(RepositoryRuleRepositoryRuleUpdate3 != null) + { + return RepositoryRuleRepositoryRuleUpdate3.GetFieldDeserializers(); + } + else if(RepositoryRuleRepositoryRuleUpdate4 != null) + { + return RepositoryRuleRepositoryRuleUpdate4.GetFieldDeserializers(); + } else if(RepositoryRuleRepositoryRuleWorkflows != null) { return RepositoryRuleRepositoryRuleWorkflows.GetFieldDeserializers(); @@ -1684,6 +2348,14 @@ public virtual IDictionary> GetFieldDeserializers() { return RepositoryRuleRepositoryRuleWorkflows2.GetFieldDeserializers(); } + else if(RepositoryRuleRepositoryRuleWorkflows3 != null) + { + return RepositoryRuleRepositoryRuleWorkflows3.GetFieldDeserializers(); + } + else if(RepositoryRuleRepositoryRuleWorkflows4 != null) + { + return RepositoryRuleRepositoryRuleWorkflows4.GetFieldDeserializers(); + } else if(RepositoryRuleRequiredDeployments != null) { return RepositoryRuleRequiredDeployments.GetFieldDeserializers(); @@ -1793,6 +2465,14 @@ public virtual void Serialize(ISerializationWriter writer) { writer.WriteObjectValue(null, RepositoryRuleRepositoryRuleBranchNamePattern2); } + else if(RepositoryRuleRepositoryRuleBranchNamePattern3 != null) + { + writer.WriteObjectValue(null, RepositoryRuleRepositoryRuleBranchNamePattern3); + } + else if(RepositoryRuleRepositoryRuleBranchNamePattern4 != null) + { + writer.WriteObjectValue(null, RepositoryRuleRepositoryRuleBranchNamePattern4); + } else if(RepositoryRuleRepositoryRuleCodeScanning != null) { writer.WriteObjectValue(null, RepositoryRuleRepositoryRuleCodeScanning); @@ -1809,6 +2489,14 @@ public virtual void Serialize(ISerializationWriter writer) { writer.WriteObjectValue(null, RepositoryRuleRepositoryRuleCodeScanning2); } + else if(RepositoryRuleRepositoryRuleCodeScanning3 != null) + { + writer.WriteObjectValue(null, RepositoryRuleRepositoryRuleCodeScanning3); + } + else if(RepositoryRuleRepositoryRuleCodeScanning4 != null) + { + writer.WriteObjectValue(null, RepositoryRuleRepositoryRuleCodeScanning4); + } else if(RepositoryRuleRepositoryRuleCommitAuthorEmailPattern != null) { writer.WriteObjectValue(null, RepositoryRuleRepositoryRuleCommitAuthorEmailPattern); @@ -1825,6 +2513,14 @@ public virtual void Serialize(ISerializationWriter writer) { writer.WriteObjectValue(null, RepositoryRuleRepositoryRuleCommitAuthorEmailPattern2); } + else if(RepositoryRuleRepositoryRuleCommitAuthorEmailPattern3 != null) + { + writer.WriteObjectValue(null, RepositoryRuleRepositoryRuleCommitAuthorEmailPattern3); + } + else if(RepositoryRuleRepositoryRuleCommitAuthorEmailPattern4 != null) + { + writer.WriteObjectValue(null, RepositoryRuleRepositoryRuleCommitAuthorEmailPattern4); + } else if(RepositoryRuleRepositoryRuleCommitMessagePattern != null) { writer.WriteObjectValue(null, RepositoryRuleRepositoryRuleCommitMessagePattern); @@ -1841,6 +2537,14 @@ public virtual void Serialize(ISerializationWriter writer) { writer.WriteObjectValue(null, RepositoryRuleRepositoryRuleCommitMessagePattern2); } + else if(RepositoryRuleRepositoryRuleCommitMessagePattern3 != null) + { + writer.WriteObjectValue(null, RepositoryRuleRepositoryRuleCommitMessagePattern3); + } + else if(RepositoryRuleRepositoryRuleCommitMessagePattern4 != null) + { + writer.WriteObjectValue(null, RepositoryRuleRepositoryRuleCommitMessagePattern4); + } else if(RepositoryRuleRepositoryRuleCommitterEmailPattern != null) { writer.WriteObjectValue(null, RepositoryRuleRepositoryRuleCommitterEmailPattern); @@ -1857,6 +2561,14 @@ public virtual void Serialize(ISerializationWriter writer) { writer.WriteObjectValue(null, RepositoryRuleRepositoryRuleCommitterEmailPattern2); } + else if(RepositoryRuleRepositoryRuleCommitterEmailPattern3 != null) + { + writer.WriteObjectValue(null, RepositoryRuleRepositoryRuleCommitterEmailPattern3); + } + else if(RepositoryRuleRepositoryRuleCommitterEmailPattern4 != null) + { + writer.WriteObjectValue(null, RepositoryRuleRepositoryRuleCommitterEmailPattern4); + } else if(RepositoryRuleRepositoryRuleCreation != null) { writer.WriteObjectValue(null, RepositoryRuleRepositoryRuleCreation); @@ -1873,6 +2585,14 @@ public virtual void Serialize(ISerializationWriter writer) { writer.WriteObjectValue(null, RepositoryRuleRepositoryRuleCreation2); } + else if(RepositoryRuleRepositoryRuleCreation3 != null) + { + writer.WriteObjectValue(null, RepositoryRuleRepositoryRuleCreation3); + } + else if(RepositoryRuleRepositoryRuleCreation4 != null) + { + writer.WriteObjectValue(null, RepositoryRuleRepositoryRuleCreation4); + } else if(RepositoryRuleRepositoryRuleDeletion != null) { writer.WriteObjectValue(null, RepositoryRuleRepositoryRuleDeletion); @@ -1889,6 +2609,14 @@ public virtual void Serialize(ISerializationWriter writer) { writer.WriteObjectValue(null, RepositoryRuleRepositoryRuleDeletion2); } + else if(RepositoryRuleRepositoryRuleDeletion3 != null) + { + writer.WriteObjectValue(null, RepositoryRuleRepositoryRuleDeletion3); + } + else if(RepositoryRuleRepositoryRuleDeletion4 != null) + { + writer.WriteObjectValue(null, RepositoryRuleRepositoryRuleDeletion4); + } else if(RepositoryRuleRepositoryRuleMember1 != null) { writer.WriteObjectValue(null, RepositoryRuleRepositoryRuleMember1); @@ -1905,6 +2633,14 @@ public virtual void Serialize(ISerializationWriter writer) { writer.WriteObjectValue(null, RepositoryRuleRepositoryRuleMember12); } + else if(RepositoryRuleRepositoryRuleMember13 != null) + { + writer.WriteObjectValue(null, RepositoryRuleRepositoryRuleMember13); + } + else if(RepositoryRuleRepositoryRuleMember14 != null) + { + writer.WriteObjectValue(null, RepositoryRuleRepositoryRuleMember14); + } else if(RepositoryRuleRepositoryRuleMember2 != null) { writer.WriteObjectValue(null, RepositoryRuleRepositoryRuleMember2); @@ -1921,6 +2657,14 @@ public virtual void Serialize(ISerializationWriter writer) { writer.WriteObjectValue(null, RepositoryRuleRepositoryRuleMember22); } + else if(RepositoryRuleRepositoryRuleMember23 != null) + { + writer.WriteObjectValue(null, RepositoryRuleRepositoryRuleMember23); + } + else if(RepositoryRuleRepositoryRuleMember24 != null) + { + writer.WriteObjectValue(null, RepositoryRuleRepositoryRuleMember24); + } else if(RepositoryRuleRepositoryRuleMember3 != null) { writer.WriteObjectValue(null, RepositoryRuleRepositoryRuleMember3); @@ -1937,6 +2681,14 @@ public virtual void Serialize(ISerializationWriter writer) { writer.WriteObjectValue(null, RepositoryRuleRepositoryRuleMember32); } + else if(RepositoryRuleRepositoryRuleMember33 != null) + { + writer.WriteObjectValue(null, RepositoryRuleRepositoryRuleMember33); + } + else if(RepositoryRuleRepositoryRuleMember34 != null) + { + writer.WriteObjectValue(null, RepositoryRuleRepositoryRuleMember34); + } else if(RepositoryRuleRepositoryRuleMember4 != null) { writer.WriteObjectValue(null, RepositoryRuleRepositoryRuleMember4); @@ -1953,6 +2705,14 @@ public virtual void Serialize(ISerializationWriter writer) { writer.WriteObjectValue(null, RepositoryRuleRepositoryRuleMember42); } + else if(RepositoryRuleRepositoryRuleMember43 != null) + { + writer.WriteObjectValue(null, RepositoryRuleRepositoryRuleMember43); + } + else if(RepositoryRuleRepositoryRuleMember44 != null) + { + writer.WriteObjectValue(null, RepositoryRuleRepositoryRuleMember44); + } else if(RepositoryRuleRepositoryRuleMergeQueue != null) { writer.WriteObjectValue(null, RepositoryRuleRepositoryRuleMergeQueue); @@ -1969,6 +2729,14 @@ public virtual void Serialize(ISerializationWriter writer) { writer.WriteObjectValue(null, RepositoryRuleRepositoryRuleMergeQueue2); } + else if(RepositoryRuleRepositoryRuleMergeQueue3 != null) + { + writer.WriteObjectValue(null, RepositoryRuleRepositoryRuleMergeQueue3); + } + else if(RepositoryRuleRepositoryRuleMergeQueue4 != null) + { + writer.WriteObjectValue(null, RepositoryRuleRepositoryRuleMergeQueue4); + } else if(RepositoryRuleRepositoryRuleNonFastForward != null) { writer.WriteObjectValue(null, RepositoryRuleRepositoryRuleNonFastForward); @@ -1985,6 +2753,14 @@ public virtual void Serialize(ISerializationWriter writer) { writer.WriteObjectValue(null, RepositoryRuleRepositoryRuleNonFastForward2); } + else if(RepositoryRuleRepositoryRuleNonFastForward3 != null) + { + writer.WriteObjectValue(null, RepositoryRuleRepositoryRuleNonFastForward3); + } + else if(RepositoryRuleRepositoryRuleNonFastForward4 != null) + { + writer.WriteObjectValue(null, RepositoryRuleRepositoryRuleNonFastForward4); + } else if(RepositoryRuleRepositoryRulePullRequest != null) { writer.WriteObjectValue(null, RepositoryRuleRepositoryRulePullRequest); @@ -2001,6 +2777,14 @@ public virtual void Serialize(ISerializationWriter writer) { writer.WriteObjectValue(null, RepositoryRuleRepositoryRulePullRequest2); } + else if(RepositoryRuleRepositoryRulePullRequest3 != null) + { + writer.WriteObjectValue(null, RepositoryRuleRepositoryRulePullRequest3); + } + else if(RepositoryRuleRepositoryRulePullRequest4 != null) + { + writer.WriteObjectValue(null, RepositoryRuleRepositoryRulePullRequest4); + } else if(RepositoryRuleRepositoryRuleRequiredDeployments != null) { writer.WriteObjectValue(null, RepositoryRuleRepositoryRuleRequiredDeployments); @@ -2017,6 +2801,14 @@ public virtual void Serialize(ISerializationWriter writer) { writer.WriteObjectValue(null, RepositoryRuleRepositoryRuleRequiredDeployments2); } + else if(RepositoryRuleRepositoryRuleRequiredDeployments3 != null) + { + writer.WriteObjectValue(null, RepositoryRuleRepositoryRuleRequiredDeployments3); + } + else if(RepositoryRuleRepositoryRuleRequiredDeployments4 != null) + { + writer.WriteObjectValue(null, RepositoryRuleRepositoryRuleRequiredDeployments4); + } else if(RepositoryRuleRepositoryRuleRequiredLinearHistory != null) { writer.WriteObjectValue(null, RepositoryRuleRepositoryRuleRequiredLinearHistory); @@ -2033,6 +2825,14 @@ public virtual void Serialize(ISerializationWriter writer) { writer.WriteObjectValue(null, RepositoryRuleRepositoryRuleRequiredLinearHistory2); } + else if(RepositoryRuleRepositoryRuleRequiredLinearHistory3 != null) + { + writer.WriteObjectValue(null, RepositoryRuleRepositoryRuleRequiredLinearHistory3); + } + else if(RepositoryRuleRepositoryRuleRequiredLinearHistory4 != null) + { + writer.WriteObjectValue(null, RepositoryRuleRepositoryRuleRequiredLinearHistory4); + } else if(RepositoryRuleRepositoryRuleRequiredSignatures != null) { writer.WriteObjectValue(null, RepositoryRuleRepositoryRuleRequiredSignatures); @@ -2049,6 +2849,14 @@ public virtual void Serialize(ISerializationWriter writer) { writer.WriteObjectValue(null, RepositoryRuleRepositoryRuleRequiredSignatures2); } + else if(RepositoryRuleRepositoryRuleRequiredSignatures3 != null) + { + writer.WriteObjectValue(null, RepositoryRuleRepositoryRuleRequiredSignatures3); + } + else if(RepositoryRuleRepositoryRuleRequiredSignatures4 != null) + { + writer.WriteObjectValue(null, RepositoryRuleRepositoryRuleRequiredSignatures4); + } else if(RepositoryRuleRepositoryRuleRequiredStatusChecks != null) { writer.WriteObjectValue(null, RepositoryRuleRepositoryRuleRequiredStatusChecks); @@ -2065,6 +2873,14 @@ public virtual void Serialize(ISerializationWriter writer) { writer.WriteObjectValue(null, RepositoryRuleRepositoryRuleRequiredStatusChecks2); } + else if(RepositoryRuleRepositoryRuleRequiredStatusChecks3 != null) + { + writer.WriteObjectValue(null, RepositoryRuleRepositoryRuleRequiredStatusChecks3); + } + else if(RepositoryRuleRepositoryRuleRequiredStatusChecks4 != null) + { + writer.WriteObjectValue(null, RepositoryRuleRepositoryRuleRequiredStatusChecks4); + } else if(RepositoryRuleRepositoryRuleTagNamePattern != null) { writer.WriteObjectValue(null, RepositoryRuleRepositoryRuleTagNamePattern); @@ -2081,6 +2897,14 @@ public virtual void Serialize(ISerializationWriter writer) { writer.WriteObjectValue(null, RepositoryRuleRepositoryRuleTagNamePattern2); } + else if(RepositoryRuleRepositoryRuleTagNamePattern3 != null) + { + writer.WriteObjectValue(null, RepositoryRuleRepositoryRuleTagNamePattern3); + } + else if(RepositoryRuleRepositoryRuleTagNamePattern4 != null) + { + writer.WriteObjectValue(null, RepositoryRuleRepositoryRuleTagNamePattern4); + } else if(RepositoryRuleRepositoryRuleUpdate != null) { writer.WriteObjectValue(null, RepositoryRuleRepositoryRuleUpdate); @@ -2097,6 +2921,14 @@ public virtual void Serialize(ISerializationWriter writer) { writer.WriteObjectValue(null, RepositoryRuleRepositoryRuleUpdate2); } + else if(RepositoryRuleRepositoryRuleUpdate3 != null) + { + writer.WriteObjectValue(null, RepositoryRuleRepositoryRuleUpdate3); + } + else if(RepositoryRuleRepositoryRuleUpdate4 != null) + { + writer.WriteObjectValue(null, RepositoryRuleRepositoryRuleUpdate4); + } else if(RepositoryRuleRepositoryRuleWorkflows != null) { writer.WriteObjectValue(null, RepositoryRuleRepositoryRuleWorkflows); @@ -2113,6 +2945,14 @@ public virtual void Serialize(ISerializationWriter writer) { writer.WriteObjectValue(null, RepositoryRuleRepositoryRuleWorkflows2); } + else if(RepositoryRuleRepositoryRuleWorkflows3 != null) + { + writer.WriteObjectValue(null, RepositoryRuleRepositoryRuleWorkflows3); + } + else if(RepositoryRuleRepositoryRuleWorkflows4 != null) + { + writer.WriteObjectValue(null, RepositoryRuleRepositoryRuleWorkflows4); + } else if(RepositoryRuleRequiredDeployments != null) { writer.WriteObjectValue(null, RepositoryRuleRequiredDeployments); diff --git a/src/GitHub/Models/RepositoryRuleEnforcement.cs b/src/GitHub/Models/RepositoryRuleEnforcement.cs index 4f3bdc17..81bb089e 100644 --- a/src/GitHub/Models/RepositoryRuleEnforcement.cs +++ b/src/GitHub/Models/RepositoryRuleEnforcement.cs @@ -3,7 +3,7 @@ using System; namespace GitHub.Models { - /// The enforcement level of the ruleset. `evaluate` allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page. + /// The enforcement level of the ruleset. `evaluate` allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page. `evaluate` is not available for the `repository` target. [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.19.0")] public enum RepositoryRuleEnforcement { diff --git a/src/GitHub/Models/RepositoryRulePullRequest_parameters.cs b/src/GitHub/Models/RepositoryRulePullRequest_parameters.cs index 1a526476..679b5901 100644 --- a/src/GitHub/Models/RepositoryRulePullRequest_parameters.cs +++ b/src/GitHub/Models/RepositoryRulePullRequest_parameters.cs @@ -14,6 +14,14 @@ public partial class RepositoryRulePullRequest_parameters : IAdditionalDataHolde { /// Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well. public IDictionary AdditionalData { get; set; } + /// When merging pull requests, you can allow any combination of merge commits, squashing, or rebasing. At least one option must be enabled. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? AllowedMergeMethods { get; set; } +#nullable restore +#else + public List AllowedMergeMethods { get; set; } +#endif /// New, reviewable commits pushed will dismiss previous pull request review approvals. public bool? DismissStaleReviewsOnPush { get; set; } /// Require an approving review in pull requests that modify files that have a designated code owner. @@ -49,6 +57,7 @@ public virtual IDictionary> GetFieldDeserializers() { return new Dictionary> { + { "allowed_merge_methods", n => { AllowedMergeMethods = n.GetCollectionOfPrimitiveValues()?.AsList(); } }, { "dismiss_stale_reviews_on_push", n => { DismissStaleReviewsOnPush = n.GetBoolValue(); } }, { "require_code_owner_review", n => { RequireCodeOwnerReview = n.GetBoolValue(); } }, { "require_last_push_approval", n => { RequireLastPushApproval = n.GetBoolValue(); } }, @@ -63,6 +72,7 @@ public virtual IDictionary> GetFieldDeserializers() public virtual void Serialize(ISerializationWriter writer) { _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteCollectionOfPrimitiveValues("allowed_merge_methods", AllowedMergeMethods); writer.WriteBoolValue("dismiss_stale_reviews_on_push", DismissStaleReviewsOnPush); writer.WriteBoolValue("require_code_owner_review", RequireCodeOwnerReview); writer.WriteIntValue("required_approving_review_count", RequiredApprovingReviewCount); diff --git a/src/GitHub/Models/RepositoryRuleset.cs b/src/GitHub/Models/RepositoryRuleset.cs index 035f2899..1f1d34ef 100644 --- a/src/GitHub/Models/RepositoryRuleset.cs +++ b/src/GitHub/Models/RepositoryRuleset.cs @@ -35,7 +35,7 @@ public partial class RepositoryRuleset : IAdditionalDataHolder, IParsable public DateTimeOffset? CreatedAt { get; set; } /// The bypass type of the user making the API request for this ruleset. This field is only returned whenquerying the repository-level endpoint. public global::GitHub.Models.RepositoryRuleset_current_user_can_bypass? CurrentUserCanBypass { get; set; } - /// The enforcement level of the ruleset. `evaluate` allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page. + /// The enforcement level of the ruleset. `evaluate` allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page. `evaluate` is not available for the `repository` target. public global::GitHub.Models.RepositoryRuleEnforcement? Enforcement { get; set; } /// The ID of the ruleset public int? Id { get; set; } diff --git a/src/GitHub/Models/RepositoryRuleset_source_type.cs b/src/GitHub/Models/RepositoryRuleset_source_type.cs index 01dc2636..6e9822dc 100644 --- a/src/GitHub/Models/RepositoryRuleset_source_type.cs +++ b/src/GitHub/Models/RepositoryRuleset_source_type.cs @@ -15,5 +15,9 @@ public enum RepositoryRuleset_source_type #pragma warning disable CS1591 Organization, #pragma warning restore CS1591 + [EnumMember(Value = "Enterprise")] + #pragma warning disable CS1591 + Enterprise, + #pragma warning restore CS1591 } } diff --git a/src/GitHub/Models/RepositoryRuleset_target.cs b/src/GitHub/Models/RepositoryRuleset_target.cs index d110e153..4c1b59d7 100644 --- a/src/GitHub/Models/RepositoryRuleset_target.cs +++ b/src/GitHub/Models/RepositoryRuleset_target.cs @@ -19,5 +19,9 @@ public enum RepositoryRuleset_target #pragma warning disable CS1591 Push, #pragma warning restore CS1591 + [EnumMember(Value = "repository")] + #pragma warning disable CS1591 + Repository, + #pragma warning restore CS1591 } } diff --git a/src/GitHub/Models/SecretScanningAlert.cs b/src/GitHub/Models/SecretScanningAlert.cs index 8e6106e2..5b1bce09 100644 --- a/src/GitHub/Models/SecretScanningAlert.cs +++ b/src/GitHub/Models/SecretScanningAlert.cs @@ -49,6 +49,38 @@ public partial class SecretScanningAlert : IAdditionalDataHolder, IParsable #nullable restore #else public global::GitHub.Models.NullableSimpleUser PushProtectionBypassedBy { get; set; } +#endif + /// An optional comment when requesting a push protection bypass. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? PushProtectionBypassRequestComment { get; set; } +#nullable restore +#else + public string PushProtectionBypassRequestComment { get; set; } +#endif + /// The URL to a push protection bypass request. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? PushProtectionBypassRequestHtmlUrl { get; set; } +#nullable restore +#else + public string PushProtectionBypassRequestHtmlUrl { get; set; } +#endif + /// A GitHub user. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::GitHub.Models.NullableSimpleUser? PushProtectionBypassRequestReviewer { get; set; } +#nullable restore +#else + public global::GitHub.Models.NullableSimpleUser PushProtectionBypassRequestReviewer { get; set; } +#endif + /// An optional comment when reviewing a push protection bypass. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? PushProtectionBypassRequestReviewerComment { get; set; } +#nullable restore +#else + public string PushProtectionBypassRequestReviewerComment { get; set; } #endif /// **Required when the `state` is `resolved`.** The reason for resolving the alert. public global::GitHub.Models.SecretScanningAlertResolution? Resolution { get; set; } @@ -139,6 +171,10 @@ public virtual IDictionary> GetFieldDeserializers() { "multi_repo", n => { MultiRepo = n.GetBoolValue(); } }, { "number", n => { Number = n.GetIntValue(); } }, { "publicly_leaked", n => { PubliclyLeaked = n.GetBoolValue(); } }, + { "push_protection_bypass_request_comment", n => { PushProtectionBypassRequestComment = n.GetStringValue(); } }, + { "push_protection_bypass_request_html_url", n => { PushProtectionBypassRequestHtmlUrl = n.GetStringValue(); } }, + { "push_protection_bypass_request_reviewer", n => { PushProtectionBypassRequestReviewer = n.GetObjectValue(global::GitHub.Models.NullableSimpleUser.CreateFromDiscriminatorValue); } }, + { "push_protection_bypass_request_reviewer_comment", n => { PushProtectionBypassRequestReviewerComment = n.GetStringValue(); } }, { "push_protection_bypassed", n => { PushProtectionBypassed = n.GetBoolValue(); } }, { "push_protection_bypassed_at", n => { PushProtectionBypassedAt = n.GetDateTimeOffsetValue(); } }, { "push_protection_bypassed_by", n => { PushProtectionBypassedBy = n.GetObjectValue(global::GitHub.Models.NullableSimpleUser.CreateFromDiscriminatorValue); } }, @@ -168,6 +204,10 @@ public virtual void Serialize(ISerializationWriter writer) writer.WriteBoolValue("push_protection_bypassed", PushProtectionBypassed); writer.WriteDateTimeOffsetValue("push_protection_bypassed_at", PushProtectionBypassedAt); writer.WriteObjectValue("push_protection_bypassed_by", PushProtectionBypassedBy); + writer.WriteStringValue("push_protection_bypass_request_comment", PushProtectionBypassRequestComment); + writer.WriteStringValue("push_protection_bypass_request_html_url", PushProtectionBypassRequestHtmlUrl); + writer.WriteObjectValue("push_protection_bypass_request_reviewer", PushProtectionBypassRequestReviewer); + writer.WriteStringValue("push_protection_bypass_request_reviewer_comment", PushProtectionBypassRequestReviewerComment); writer.WriteEnumValue("resolution", Resolution); writer.WriteStringValue("resolution_comment", ResolutionComment); writer.WriteDateTimeOffsetValue("resolved_at", ResolvedAt); diff --git a/src/GitHub/Models/SecretScanningScan.cs b/src/GitHub/Models/SecretScanningScan.cs new file mode 100644 index 00000000..2e2487ee --- /dev/null +++ b/src/GitHub/Models/SecretScanningScan.cs @@ -0,0 +1,84 @@ +// +#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 +{ + /// + /// Information on a single scan performed by secret scanning on the repository + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.19.0")] + public partial class SecretScanningScan : 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 time that the scan was completed. Empty if the scan is running + public DateTimeOffset? CompletedAt { get; set; } + /// The time that the scan was started. Empty if the scan is pending + public DateTimeOffset? StartedAt { get; set; } + /// The state of the scan. Either "completed", "running", or "pending" +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Status { get; set; } +#nullable restore +#else + public string Status { get; set; } +#endif + /// The type of scan +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Type { get; set; } +#nullable restore +#else + public string Type { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public SecretScanningScan() + { + 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.SecretScanningScan CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::GitHub.Models.SecretScanningScan(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "completed_at", n => { CompletedAt = n.GetDateTimeOffsetValue(); } }, + { "started_at", n => { StartedAt = n.GetDateTimeOffsetValue(); } }, + { "status", n => { Status = n.GetStringValue(); } }, + { "type", n => { Type = 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.WriteDateTimeOffsetValue("completed_at", CompletedAt); + writer.WriteDateTimeOffsetValue("started_at", StartedAt); + writer.WriteStringValue("status", Status); + writer.WriteStringValue("type", Type); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/GitHub/Models/SecretScanningScanHistory.cs b/src/GitHub/Models/SecretScanningScanHistory.cs new file mode 100644 index 00000000..f604c6bc --- /dev/null +++ b/src/GitHub/Models/SecretScanningScanHistory.cs @@ -0,0 +1,95 @@ +// +#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.19.0")] + #pragma warning disable CS1591 + public partial class SecretScanningScanHistory : 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 backfill_scans property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? BackfillScans { get; set; } +#nullable restore +#else + public List BackfillScans { get; set; } +#endif + /// The custom_pattern_backfill_scans property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? CustomPatternBackfillScans { get; set; } +#nullable restore +#else + public List CustomPatternBackfillScans { get; set; } +#endif + /// The incremental_scans property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? IncrementalScans { get; set; } +#nullable restore +#else + public List IncrementalScans { get; set; } +#endif + /// The pattern_update_scans property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? PatternUpdateScans { get; set; } +#nullable restore +#else + public List PatternUpdateScans { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public SecretScanningScanHistory() + { + 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.SecretScanningScanHistory CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::GitHub.Models.SecretScanningScanHistory(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "backfill_scans", n => { BackfillScans = n.GetCollectionOfObjectValues(global::GitHub.Models.SecretScanningScan.CreateFromDiscriminatorValue)?.AsList(); } }, + { "custom_pattern_backfill_scans", n => { CustomPatternBackfillScans = n.GetCollectionOfObjectValues(global::GitHub.Models.SecretScanningScan.CreateFromDiscriminatorValue)?.AsList(); } }, + { "incremental_scans", n => { IncrementalScans = n.GetCollectionOfObjectValues(global::GitHub.Models.SecretScanningScan.CreateFromDiscriminatorValue)?.AsList(); } }, + { "pattern_update_scans", n => { PatternUpdateScans = n.GetCollectionOfObjectValues(global::GitHub.Models.SecretScanningScan.CreateFromDiscriminatorValue)?.AsList(); } }, + }; + } + /// + /// 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.WriteCollectionOfObjectValues("backfill_scans", BackfillScans); + writer.WriteCollectionOfObjectValues("custom_pattern_backfill_scans", CustomPatternBackfillScans); + writer.WriteCollectionOfObjectValues("incremental_scans", IncrementalScans); + writer.WriteCollectionOfObjectValues("pattern_update_scans", PatternUpdateScans); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/GitHub/Models/SecretScanningScanHistory503Error.cs b/src/GitHub/Models/SecretScanningScanHistory503Error.cs new file mode 100644 index 00000000..7762caaa --- /dev/null +++ b/src/GitHub/Models/SecretScanningScanHistory503Error.cs @@ -0,0 +1,88 @@ +// +#pragma warning disable CS0618 +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System; +namespace GitHub.Models +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.19.0")] + #pragma warning disable CS1591 + public partial class SecretScanningScanHistory503Error : ApiException, 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 code property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Code { get; set; } +#nullable restore +#else + public string Code { get; set; } +#endif + /// The documentation_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? DocumentationUrl { get; set; } +#nullable restore +#else + public string DocumentationUrl { get; set; } +#endif + /// The primary error message. + public override string Message { get => MessageEscaped ?? string.Empty; } + /// The message property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? MessageEscaped { get; set; } +#nullable restore +#else + public string MessageEscaped { get; set; } +#endif + /// + /// Instantiates a new and sets the default values. + /// + public SecretScanningScanHistory503Error() + { + 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.SecretScanningScanHistory503Error CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::GitHub.Models.SecretScanningScanHistory503Error(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "code", n => { Code = n.GetStringValue(); } }, + { "documentation_url", n => { DocumentationUrl = n.GetStringValue(); } }, + { "message", n => { MessageEscaped = 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("code", Code); + writer.WriteStringValue("documentation_url", DocumentationUrl); + writer.WriteStringValue("message", MessageEscaped); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/GitHub/Models/SplunkConfig.cs b/src/GitHub/Models/SplunkConfig.cs new file mode 100644 index 00000000..f56021b8 --- /dev/null +++ b/src/GitHub/Models/SplunkConfig.cs @@ -0,0 +1,94 @@ +// +#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 +{ + /// + /// Splunk Config for Audit Log Stream Configuration + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.19.0")] + public partial class SplunkConfig : 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; } + /// Domain of Splunk instance. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? Domain { get; set; } +#nullable restore +#else + public string Domain { get; set; } +#endif + /// Encrypted Token. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? EncryptedToken { get; set; } +#nullable restore +#else + public string EncryptedToken { get; set; } +#endif + /// Key ID obtained from the audit log stream key endpoint used to encrypt secrets. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? KeyId { get; set; } +#nullable restore +#else + public string KeyId { get; set; } +#endif + /// The port number for connecting to Splunk. + public int? Port { get; set; } + /// SSL verification helps ensure your events are sent to your Splunk endpoint securely. + public bool? SslVerify { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public SplunkConfig() + { + 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.SplunkConfig CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::GitHub.Models.SplunkConfig(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "domain", n => { Domain = n.GetStringValue(); } }, + { "encrypted_token", n => { EncryptedToken = n.GetStringValue(); } }, + { "key_id", n => { KeyId = n.GetStringValue(); } }, + { "port", n => { Port = n.GetIntValue(); } }, + { "ssl_verify", n => { SslVerify = n.GetBoolValue(); } }, + }; + } + /// + /// 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("domain", Domain); + writer.WriteStringValue("encrypted_token", EncryptedToken); + writer.WriteStringValue("key_id", KeyId); + writer.WriteIntValue("port", Port); + writer.WriteBoolValue("ssl_verify", SslVerify); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/GitHub/Models/SubIssuesSummary.cs b/src/GitHub/Models/SubIssuesSummary.cs new file mode 100644 index 00000000..b6678ceb --- /dev/null +++ b/src/GitHub/Models/SubIssuesSummary.cs @@ -0,0 +1,67 @@ +// +#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.19.0")] + #pragma warning disable CS1591 + public partial class SubIssuesSummary : 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 completed property + public int? Completed { get; set; } + /// The percent_completed property + public int? PercentCompleted { get; set; } + /// The total property + public int? Total { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public SubIssuesSummary() + { + 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.SubIssuesSummary CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::GitHub.Models.SubIssuesSummary(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "completed", n => { Completed = n.GetIntValue(); } }, + { "percent_completed", n => { PercentCompleted = n.GetIntValue(); } }, + { "total", n => { Total = n.GetIntValue(); } }, + }; + } + /// + /// 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.WriteIntValue("completed", Completed); + writer.WriteIntValue("percent_completed", PercentCompleted); + writer.WriteIntValue("total", Total); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/GitHub/Models/TeamRoleAssignment.cs b/src/GitHub/Models/TeamRoleAssignment.cs index 80fbbda4..3503cda8 100644 --- a/src/GitHub/Models/TeamRoleAssignment.cs +++ b/src/GitHub/Models/TeamRoleAssignment.cs @@ -15,6 +15,8 @@ public partial class TeamRoleAssignment : 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; } + /// Determines if the team has a direct, indirect, or mixed relationship to a role + public global::GitHub.Models.TeamRoleAssignment_assignment? Assignment { get; set; } /// The description property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -146,6 +148,7 @@ public virtual IDictionary> GetFieldDeserializers() { return new Dictionary> { + { "assignment", n => { Assignment = n.GetEnumValue(); } }, { "description", n => { Description = n.GetStringValue(); } }, { "html_url", n => { HtmlUrl = n.GetStringValue(); } }, { "id", n => { Id = n.GetIntValue(); } }, @@ -169,6 +172,7 @@ public virtual IDictionary> GetFieldDeserializers() public virtual void Serialize(ISerializationWriter writer) { _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteEnumValue("assignment", Assignment); writer.WriteStringValue("description", Description); writer.WriteStringValue("html_url", HtmlUrl); writer.WriteIntValue("id", Id); diff --git a/src/GitHub/Models/TeamRoleAssignment_assignment.cs b/src/GitHub/Models/TeamRoleAssignment_assignment.cs new file mode 100644 index 00000000..d5b21e1e --- /dev/null +++ b/src/GitHub/Models/TeamRoleAssignment_assignment.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace GitHub.Models +{ + /// Determines if the team has a direct, indirect, or mixed relationship to a role + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.19.0")] + public enum TeamRoleAssignment_assignment + { + [EnumMember(Value = "direct")] + #pragma warning disable CS1591 + Direct, + #pragma warning restore CS1591 + [EnumMember(Value = "indirect")] + #pragma warning disable CS1591 + Indirect, + #pragma warning restore CS1591 + [EnumMember(Value = "mixed")] + #pragma warning disable CS1591 + Mixed, + #pragma warning restore CS1591 + } +} diff --git a/src/GitHub/Models/TimelineCommittedEvent_verification.cs b/src/GitHub/Models/TimelineCommittedEvent_verification.cs index 7a8aaf30..9bb0267d 100644 --- a/src/GitHub/Models/TimelineCommittedEvent_verification.cs +++ b/src/GitHub/Models/TimelineCommittedEvent_verification.cs @@ -40,6 +40,14 @@ public partial class TimelineCommittedEvent_verification : IAdditionalDataHolder #endif /// The verified property public bool? Verified { get; set; } + /// The verified_at property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? VerifiedAt { get; set; } +#nullable restore +#else + public string VerifiedAt { get; set; } +#endif /// /// Instantiates a new and sets the default values. /// @@ -69,6 +77,7 @@ public virtual IDictionary> GetFieldDeserializers() { "reason", n => { Reason = n.GetStringValue(); } }, { "signature", n => { Signature = n.GetStringValue(); } }, { "verified", n => { Verified = n.GetBoolValue(); } }, + { "verified_at", n => { VerifiedAt = n.GetStringValue(); } }, }; } /// @@ -82,6 +91,7 @@ public virtual void Serialize(ISerializationWriter writer) writer.WriteStringValue("reason", Reason); writer.WriteStringValue("signature", Signature); writer.WriteBoolValue("verified", Verified); + writer.WriteStringValue("verified_at", VerifiedAt); writer.WriteAdditionalData(AdditionalData); } } diff --git a/src/GitHub/Models/UserRoleAssignment.cs b/src/GitHub/Models/UserRoleAssignment.cs index 64e17d93..db0734db 100644 --- a/src/GitHub/Models/UserRoleAssignment.cs +++ b/src/GitHub/Models/UserRoleAssignment.cs @@ -15,6 +15,8 @@ public partial class UserRoleAssignment : 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; } + /// Determines if the user has a direct, indirect, or mixed relationship to a role + public global::GitHub.Models.UserRoleAssignment_assignment? Assignment { get; set; } /// The avatar_url property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -81,6 +83,14 @@ public partial class UserRoleAssignment : IAdditionalDataHolder, IParsable #endif /// The id property public int? Id { get; set; } + /// Team the user has gotten the role through +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public List? InheritedFrom { get; set; } +#nullable restore +#else + public List InheritedFrom { get; set; } +#endif /// The login property #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -204,6 +214,7 @@ public virtual IDictionary> GetFieldDeserializers() { return new Dictionary> { + { "assignment", n => { Assignment = n.GetEnumValue(); } }, { "avatar_url", n => { AvatarUrl = n.GetStringValue(); } }, { "email", n => { Email = n.GetStringValue(); } }, { "events_url", n => { EventsUrl = n.GetStringValue(); } }, @@ -213,6 +224,7 @@ public virtual IDictionary> GetFieldDeserializers() { "gravatar_id", n => { GravatarId = n.GetStringValue(); } }, { "html_url", n => { HtmlUrl = n.GetStringValue(); } }, { "id", n => { Id = n.GetIntValue(); } }, + { "inherited_from", n => { InheritedFrom = n.GetCollectionOfObjectValues(global::GitHub.Models.TeamSimple.CreateFromDiscriminatorValue)?.AsList(); } }, { "login", n => { Login = n.GetStringValue(); } }, { "name", n => { Name = n.GetStringValue(); } }, { "node_id", n => { NodeId = n.GetStringValue(); } }, @@ -235,6 +247,7 @@ public virtual IDictionary> GetFieldDeserializers() public virtual void Serialize(ISerializationWriter writer) { _ = writer ?? throw new ArgumentNullException(nameof(writer)); + writer.WriteEnumValue("assignment", Assignment); writer.WriteStringValue("avatar_url", AvatarUrl); writer.WriteStringValue("email", Email); writer.WriteStringValue("events_url", EventsUrl); @@ -244,6 +257,7 @@ public virtual void Serialize(ISerializationWriter writer) writer.WriteStringValue("gravatar_id", GravatarId); writer.WriteStringValue("html_url", HtmlUrl); writer.WriteIntValue("id", Id); + writer.WriteCollectionOfObjectValues("inherited_from", InheritedFrom); writer.WriteStringValue("login", Login); writer.WriteStringValue("name", Name); writer.WriteStringValue("node_id", NodeId); diff --git a/src/GitHub/Models/UserRoleAssignment_assignment.cs b/src/GitHub/Models/UserRoleAssignment_assignment.cs new file mode 100644 index 00000000..f37a1b43 --- /dev/null +++ b/src/GitHub/Models/UserRoleAssignment_assignment.cs @@ -0,0 +1,23 @@ +// +using System.Runtime.Serialization; +using System; +namespace GitHub.Models +{ + /// Determines if the user has a direct, indirect, or mixed relationship to a role + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.19.0")] + public enum UserRoleAssignment_assignment + { + [EnumMember(Value = "direct")] + #pragma warning disable CS1591 + Direct, + #pragma warning restore CS1591 + [EnumMember(Value = "indirect")] + #pragma warning disable CS1591 + Indirect, + #pragma warning restore CS1591 + [EnumMember(Value = "mixed")] + #pragma warning disable CS1591 + Mixed, + #pragma warning restore CS1591 + } +} diff --git a/src/GitHub/Models/Users.cs b/src/GitHub/Models/Users.cs index 1353411f..ee1970b9 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..02c4f2f4 --- /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.19.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/Models/Verification.cs b/src/GitHub/Models/Verification.cs index b46e6724..2cca38d7 100644 --- a/src/GitHub/Models/Verification.cs +++ b/src/GitHub/Models/Verification.cs @@ -40,6 +40,14 @@ public partial class Verification : IAdditionalDataHolder, IParsable #endif /// The verified property public bool? Verified { get; set; } + /// The verified_at property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? VerifiedAt { get; set; } +#nullable restore +#else + public string VerifiedAt { get; set; } +#endif /// /// Instantiates a new and sets the default values. /// @@ -69,6 +77,7 @@ public virtual IDictionary> GetFieldDeserializers() { "reason", n => { Reason = n.GetStringValue(); } }, { "signature", n => { Signature = n.GetStringValue(); } }, { "verified", n => { Verified = n.GetBoolValue(); } }, + { "verified_at", n => { VerifiedAt = n.GetStringValue(); } }, }; } /// @@ -82,6 +91,7 @@ public virtual void Serialize(ISerializationWriter writer) writer.WriteStringValue("reason", Reason); writer.WriteStringValue("signature", Signature); writer.WriteBoolValue("verified", Verified); + writer.WriteStringValue("verified_at", VerifiedAt); writer.WriteAdditionalData(AdditionalData); } } diff --git a/src/GitHub/Organizations/Item/Custom_roles/Custom_rolesRequestBuilder.cs b/src/GitHub/Organizations/Item/Custom_roles/Custom_rolesRequestBuilder.cs index 8c2351f4..0c173cf7 100644 --- a/src/GitHub/Organizations/Item/Custom_roles/Custom_rolesRequestBuilder.cs +++ b/src/GitHub/Organizations/Item/Custom_roles/Custom_rolesRequestBuilder.cs @@ -11,7 +11,7 @@ namespace GitHub.Organizations.Item.Custom_roles { /// - /// Builds and executes requests for operations under \organizations\{organization_id}\custom_roles + /// Builds and executes requests for operations under \organizations\{organization_-id}\custom_roles /// [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.19.0")] public partial class Custom_rolesRequestBuilder : BaseRequestBuilder @@ -21,7 +21,7 @@ public partial class Custom_rolesRequestBuilder : BaseRequestBuilder /// /// Path parameters for the request /// The request adapter to use to execute the requests. - public Custom_rolesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/organizations/{organization_id}/custom_roles", pathParameters) + public Custom_rolesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/organizations/{organization_%2Did}/custom_roles", pathParameters) { } /// @@ -29,7 +29,7 @@ public Custom_rolesRequestBuilder(Dictionary pathParameters, IRe /// /// The raw URL to use for the request builder. /// The request adapter to use to execute the requests. - public Custom_rolesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/organizations/{organization_id}/custom_roles", rawUrl) + public Custom_rolesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/organizations/{organization_%2Did}/custom_roles", rawUrl) { } /// diff --git a/src/GitHub/Organizations/Item/WithOrganization_ItemRequestBuilder.cs b/src/GitHub/Organizations/Item/Organization_ItemRequestBuilder.cs similarity index 60% rename from src/GitHub/Organizations/Item/WithOrganization_ItemRequestBuilder.cs rename to src/GitHub/Organizations/Item/Organization_ItemRequestBuilder.cs index 9672f0df..5bd667c7 100644 --- a/src/GitHub/Organizations/Item/WithOrganization_ItemRequestBuilder.cs +++ b/src/GitHub/Organizations/Item/Organization_ItemRequestBuilder.cs @@ -1,6 +1,7 @@ // #pragma warning disable CS0618 using GitHub.Organizations.Item.Custom_roles; +using GitHub.Organizations.Item.Settings; using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions; using System.Collections.Generic; @@ -10,30 +11,35 @@ namespace GitHub.Organizations.Item { /// - /// Builds and executes requests for operations under \organizations\{organization_id} + /// Builds and executes requests for operations under \organizations\{organization_-id} /// [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.19.0")] - public partial class WithOrganization_ItemRequestBuilder : BaseRequestBuilder + public partial class Organization_ItemRequestBuilder : BaseRequestBuilder { /// The custom_roles property public global::GitHub.Organizations.Item.Custom_roles.Custom_rolesRequestBuilder Custom_roles { get => new global::GitHub.Organizations.Item.Custom_roles.Custom_rolesRequestBuilder(PathParameters, RequestAdapter); } + /// The settings property + public global::GitHub.Organizations.Item.Settings.SettingsRequestBuilder Settings + { + get => new global::GitHub.Organizations.Item.Settings.SettingsRequestBuilder(PathParameters, RequestAdapter); + } /// - /// Instantiates a new and sets the default values. + /// Instantiates a new and sets the default values. /// /// Path parameters for the request /// The request adapter to use to execute the requests. - public WithOrganization_ItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/organizations/{organization_id}", pathParameters) + public Organization_ItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/organizations/{organization_%2Did}", pathParameters) { } /// - /// Instantiates a new and sets the default values. + /// 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 WithOrganization_ItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/organizations/{organization_id}", rawUrl) + public Organization_ItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/organizations/{organization_%2Did}", rawUrl) { } } diff --git a/src/GitHub/Organizations/Item/Settings/Billing/BillingRequestBuilder.cs b/src/GitHub/Organizations/Item/Settings/Billing/BillingRequestBuilder.cs new file mode 100644 index 00000000..4cdbe323 --- /dev/null +++ b/src/GitHub/Organizations/Item/Settings/Billing/BillingRequestBuilder.cs @@ -0,0 +1,41 @@ +// +#pragma warning disable CS0618 +using GitHub.Organizations.Item.Settings.Billing.Usage; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System; +namespace GitHub.Organizations.Item.Settings.Billing +{ + /// + /// Builds and executes requests for operations under \organizations\{organization_-id}\settings\billing + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.19.0")] + public partial class BillingRequestBuilder : BaseRequestBuilder + { + /// The usage property + public global::GitHub.Organizations.Item.Settings.Billing.Usage.UsageRequestBuilder Usage + { + get => new global::GitHub.Organizations.Item.Settings.Billing.Usage.UsageRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public BillingRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/organizations/{organization_%2Did}/settings/billing", 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 BillingRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/organizations/{organization_%2Did}/settings/billing", rawUrl) + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/GitHub/Organizations/Item/Settings/Billing/Usage/UsageRequestBuilder.cs b/src/GitHub/Organizations/Item/Settings/Billing/Usage/UsageRequestBuilder.cs new file mode 100644 index 00000000..b52a9dee --- /dev/null +++ b/src/GitHub/Organizations/Item/Settings/Billing/Usage/UsageRequestBuilder.cs @@ -0,0 +1,115 @@ +// +#pragma warning disable CS0618 +using GitHub.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace GitHub.Organizations.Item.Settings.Billing.Usage +{ + /// + /// Builds and executes requests for operations under \organizations\{organization_-id}\settings\billing\usage + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.19.0")] + public partial class UsageRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public UsageRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/organizations/{organization_%2Did}/settings/billing/usage{?day*,hour*,month*,year*}", 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 UsageRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/organizations/{organization_%2Did}/settings/billing/usage{?day*,hour*,month*,year*}", rawUrl) + { + } + /// + /// Gets a report of the total usage for an organization. To use this endpoint, you must be an administrator of an organization within an enterprise or an organization account.**Note:** This endpoint is only available to organizations with access to the enhanced billing platform. For more information, see "[About the enhanced billing platform](https://docs.github.com/enterprise-cloud@latest//billing/using-the-new-billing-platform)." + /// 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 400 status code + /// When receiving a 403 status code + /// When receiving a 500 status code + /// When receiving a 503 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> + { + { "400", global::GitHub.Models.BasicError.CreateFromDiscriminatorValue }, + { "403", global::GitHub.Models.BasicError.CreateFromDiscriminatorValue }, + { "500", global::GitHub.Models.BasicError.CreateFromDiscriminatorValue }, + { "503", global::GitHub.Models.BillingUsageReport503Error.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::GitHub.Models.BillingUsageReport.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Gets a report of the total usage for an organization. To use this endpoint, you must be an administrator of an organization within an enterprise or an organization account.**Note:** This endpoint is only available to organizations with access to the enhanced billing platform. For more information, see "[About the enhanced billing platform](https://docs.github.com/enterprise-cloud@latest//billing/using-the-new-billing-platform)." + /// + /// 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 global::GitHub.Organizations.Item.Settings.Billing.Usage.UsageRequestBuilder WithUrl(string rawUrl) + { + return new global::GitHub.Organizations.Item.Settings.Billing.Usage.UsageRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Gets a report of the total usage for an organization. To use this endpoint, you must be an administrator of an organization within an enterprise or an organization account.**Note:** This endpoint is only available to organizations with access to the enhanced billing platform. For more information, see "[About the enhanced billing platform](https://docs.github.com/enterprise-cloud@latest//billing/using-the-new-billing-platform)." + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.19.0")] + public partial class UsageRequestBuilderGetQueryParameters + { + /// If specified, only return results for a single day. The value of `day` is an integer between `1` and `31`. + [QueryParameter("day")] + public int? Day { get; set; } + /// If specified, only return results for a single hour. The value of `hour` is an integer between `0` and `23`. + [QueryParameter("hour")] + public int? Hour { get; set; } + /// If specified, only return results for a single month. The value of `month` is an integer between `1` and `12`. + [QueryParameter("month")] + public int? Month { get; set; } + /// If specified, only return results for a single year. The value of `year` is an integer with four digits representing a year. For example, `2024`. Default value is the current year. + [QueryParameter("year")] + public int? Year { get; set; } + } + } +} +#pragma warning restore CS0618 diff --git a/src/GitHub/Organizations/Item/Settings/SettingsRequestBuilder.cs b/src/GitHub/Organizations/Item/Settings/SettingsRequestBuilder.cs new file mode 100644 index 00000000..89b14e7e --- /dev/null +++ b/src/GitHub/Organizations/Item/Settings/SettingsRequestBuilder.cs @@ -0,0 +1,41 @@ +// +#pragma warning disable CS0618 +using GitHub.Organizations.Item.Settings.Billing; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System; +namespace GitHub.Organizations.Item.Settings +{ + /// + /// Builds and executes requests for operations under \organizations\{organization_-id}\settings + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.19.0")] + public partial class SettingsRequestBuilder : BaseRequestBuilder + { + /// The billing property + public global::GitHub.Organizations.Item.Settings.Billing.BillingRequestBuilder Billing + { + get => new global::GitHub.Organizations.Item.Settings.Billing.BillingRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public SettingsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/organizations/{organization_%2Did}/settings", 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 SettingsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/organizations/{organization_%2Did}/settings", rawUrl) + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/GitHub/Organizations/OrganizationsRequestBuilder.cs b/src/GitHub/Organizations/OrganizationsRequestBuilder.cs index 150a6537..0fd9f335 100644 --- a/src/GitHub/Organizations/OrganizationsRequestBuilder.cs +++ b/src/GitHub/Organizations/OrganizationsRequestBuilder.cs @@ -20,14 +20,14 @@ public partial class OrganizationsRequestBuilder : BaseRequestBuilder { /// Gets an item from the GitHub.organizations.item collection /// The unique identifier of the organization. - /// A - public global::GitHub.Organizations.Item.WithOrganization_ItemRequestBuilder this[string position] + /// A + public global::GitHub.Organizations.Item.Organization_ItemRequestBuilder this[string position] { get { var urlTplParams = new Dictionary(PathParameters); - urlTplParams.Add("organization_id", position); - return new global::GitHub.Organizations.Item.WithOrganization_ItemRequestBuilder(urlTplParams, RequestAdapter); + urlTplParams.Add("organization_%2Did", position); + return new global::GitHub.Organizations.Item.Organization_ItemRequestBuilder(urlTplParams, RequestAdapter); } } /// diff --git a/src/GitHub/Orgs/Item/Attestations/Item/WithSubject_digestGetResponse_attestations.cs b/src/GitHub/Orgs/Item/Attestations/Item/WithSubject_digestGetResponse_attestations.cs index 20970f8f..78695983 100644 --- a/src/GitHub/Orgs/Item/Attestations/Item/WithSubject_digestGetResponse_attestations.cs +++ b/src/GitHub/Orgs/Item/Attestations/Item/WithSubject_digestGetResponse_attestations.cs @@ -21,6 +21,14 @@ public partial class WithSubject_digestGetResponse_attestations : IAdditionalDat #nullable restore #else public global::GitHub.Orgs.Item.Attestations.Item.WithSubject_digestGetResponse_attestations_bundle Bundle { get; set; } +#endif + /// The bundle_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? BundleUrl { get; set; } +#nullable restore +#else + public string BundleUrl { get; set; } #endif /// The repository_id property public int? RepositoryId { get; set; } @@ -50,6 +58,7 @@ public virtual IDictionary> GetFieldDeserializers() return new Dictionary> { { "bundle", n => { Bundle = n.GetObjectValue(global::GitHub.Orgs.Item.Attestations.Item.WithSubject_digestGetResponse_attestations_bundle.CreateFromDiscriminatorValue); } }, + { "bundle_url", n => { BundleUrl = n.GetStringValue(); } }, { "repository_id", n => { RepositoryId = n.GetIntValue(); } }, }; } @@ -61,6 +70,7 @@ public virtual void Serialize(ISerializationWriter writer) { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("bundle", Bundle); + writer.WriteStringValue("bundle_url", BundleUrl); writer.WriteIntValue("repository_id", RepositoryId); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/GitHub/Orgs/Item/BypassRequests/BypassRequestsRequestBuilder.cs b/src/GitHub/Orgs/Item/BypassRequests/BypassRequestsRequestBuilder.cs new file mode 100644 index 00000000..b22fdc17 --- /dev/null +++ b/src/GitHub/Orgs/Item/BypassRequests/BypassRequestsRequestBuilder.cs @@ -0,0 +1,41 @@ +// +#pragma warning disable CS0618 +using GitHub.Orgs.Item.BypassRequests.PushRules; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System; +namespace GitHub.Orgs.Item.BypassRequests +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\bypass-requests + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.19.0")] + public partial class BypassRequestsRequestBuilder : BaseRequestBuilder + { + /// The pushRules property + public global::GitHub.Orgs.Item.BypassRequests.PushRules.PushRulesRequestBuilder PushRules + { + get => new global::GitHub.Orgs.Item.BypassRequests.PushRules.PushRulesRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public BypassRequestsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/bypass-requests", 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 BypassRequestsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/bypass-requests", rawUrl) + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/GitHub/Orgs/Item/BypassRequests/PushRules/GetRequest_statusQueryParameterType.cs b/src/GitHub/Orgs/Item/BypassRequests/PushRules/GetRequest_statusQueryParameterType.cs new file mode 100644 index 00000000..0b98e995 --- /dev/null +++ b/src/GitHub/Orgs/Item/BypassRequests/PushRules/GetRequest_statusQueryParameterType.cs @@ -0,0 +1,36 @@ +// +using System.Runtime.Serialization; +using System; +namespace GitHub.Orgs.Item.BypassRequests.PushRules +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.19.0")] + #pragma warning disable CS1591 + public enum GetRequest_statusQueryParameterType + #pragma warning restore CS1591 + { + [EnumMember(Value = "completed")] + #pragma warning disable CS1591 + Completed, + #pragma warning restore CS1591 + [EnumMember(Value = "cancelled")] + #pragma warning disable CS1591 + Cancelled, + #pragma warning restore CS1591 + [EnumMember(Value = "expired")] + #pragma warning disable CS1591 + Expired, + #pragma warning restore CS1591 + [EnumMember(Value = "denied")] + #pragma warning disable CS1591 + Denied, + #pragma warning restore CS1591 + [EnumMember(Value = "open")] + #pragma warning disable CS1591 + Open, + #pragma warning restore CS1591 + [EnumMember(Value = "all")] + #pragma warning disable CS1591 + All, + #pragma warning restore CS1591 + } +} diff --git a/src/GitHub/Orgs/Item/BypassRequests/PushRules/GetTime_periodQueryParameterType.cs b/src/GitHub/Orgs/Item/BypassRequests/PushRules/GetTime_periodQueryParameterType.cs new file mode 100644 index 00000000..0710c8c3 --- /dev/null +++ b/src/GitHub/Orgs/Item/BypassRequests/PushRules/GetTime_periodQueryParameterType.cs @@ -0,0 +1,28 @@ +// +using System.Runtime.Serialization; +using System; +namespace GitHub.Orgs.Item.BypassRequests.PushRules +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.19.0")] + #pragma warning disable CS1591 + public enum GetTime_periodQueryParameterType + #pragma warning restore CS1591 + { + [EnumMember(Value = "hour")] + #pragma warning disable CS1591 + Hour, + #pragma warning restore CS1591 + [EnumMember(Value = "day")] + #pragma warning disable CS1591 + Day, + #pragma warning restore CS1591 + [EnumMember(Value = "week")] + #pragma warning disable CS1591 + Week, + #pragma warning restore CS1591 + [EnumMember(Value = "month")] + #pragma warning disable CS1591 + Month, + #pragma warning restore CS1591 + } +} diff --git a/src/GitHub/Orgs/Item/BypassRequests/PushRules/PushRulesRequestBuilder.cs b/src/GitHub/Orgs/Item/BypassRequests/PushRules/PushRulesRequestBuilder.cs new file mode 100644 index 00000000..5a36f1d4 --- /dev/null +++ b/src/GitHub/Orgs/Item/BypassRequests/PushRules/PushRulesRequestBuilder.cs @@ -0,0 +1,142 @@ +// +#pragma warning disable CS0618 +using GitHub.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace GitHub.Orgs.Item.BypassRequests.PushRules +{ + /// + /// Builds and executes requests for operations under \orgs\{org}\bypass-requests\push-rules + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.19.0")] + public partial class PushRulesRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public PushRulesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/bypass-requests/push-rules{?page*,per_page*,repository_name*,request_status*,requester*,reviewer*,time_period*}", 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 PushRulesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/bypass-requests/push-rules{?page*,per_page*,repository_name*,request_status*,requester*,reviewer*,time_period*}", rawUrl) + { + } + /// + /// Lists the requests made by users of a repository to bypass push protection rules within an organization. + /// API method documentation + /// + /// A List<global::GitHub.Models.PushRuleBypassRequest> + /// 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 + /// When receiving a 500 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", global::GitHub.Models.BasicError.CreateFromDiscriminatorValue }, + { "500", global::GitHub.Models.BasicError.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::GitHub.Models.PushRuleBypassRequest.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// Lists the requests made by users of a repository to bypass push protection rules within an organization. + /// + /// 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 global::GitHub.Orgs.Item.BypassRequests.PushRules.PushRulesRequestBuilder WithUrl(string rawUrl) + { + return new global::GitHub.Orgs.Item.BypassRequests.PushRules.PushRulesRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Lists the requests made by users of a repository to bypass push protection rules within an organization. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.19.0")] + public partial class PushRulesRequestBuilderGetQueryParameters + { + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + /// The name of the repository to filter on. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("repository_name")] + public string? RepositoryName { get; set; } +#nullable restore +#else + [QueryParameter("repository_name")] + public string RepositoryName { get; set; } +#endif + /// Filter bypass requests by the handle of the GitHub user who requested the bypass. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("requester")] + public string? Requester { get; set; } +#nullable restore +#else + [QueryParameter("requester")] + public string Requester { get; set; } +#endif + /// The status of the bypass request to filter on. When specified, only requests with this status will be returned. + [QueryParameter("request_status")] + public global::GitHub.Orgs.Item.BypassRequests.PushRules.GetRequest_statusQueryParameterType? RequestStatus { get; set; } + /// Filter bypass requests by the handle of the GitHub user who reviewed the bypass request. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("reviewer")] + public string? Reviewer { get; set; } +#nullable restore +#else + [QueryParameter("reviewer")] + public string Reviewer { get; set; } +#endif + /// The time period to filter by.For example, `day` will filter for rule suites that occurred in the past 24 hours, and `week` will filter for insights that occurred in the past 7 days (168 hours). + [QueryParameter("time_period")] + public global::GitHub.Orgs.Item.BypassRequests.PushRules.GetTime_periodQueryParameterType? TimePeriod { get; set; } + } + } +} +#pragma warning restore CS0618 diff --git a/src/GitHub/Orgs/Item/CodeSecurity/Configurations/ConfigurationsPostRequestBody.cs b/src/GitHub/Orgs/Item/CodeSecurity/Configurations/ConfigurationsPostRequestBody.cs index db6ce48c..693fab22 100644 --- a/src/GitHub/Orgs/Item/CodeSecurity/Configurations/ConfigurationsPostRequestBody.cs +++ b/src/GitHub/Orgs/Item/CodeSecurity/Configurations/ConfigurationsPostRequestBody.cs @@ -1,5 +1,6 @@ // #pragma warning disable CS0618 +using GitHub.Models; using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; @@ -16,6 +17,14 @@ public partial class ConfigurationsPostRequestBody : IParsable public global::GitHub.Orgs.Item.CodeSecurity.Configurations.ConfigurationsPostRequestBody_advanced_security? AdvancedSecurity { get; set; } /// The enablement status of code scanning default setup public global::GitHub.Orgs.Item.CodeSecurity.Configurations.ConfigurationsPostRequestBody_code_scanning_default_setup? CodeScanningDefaultSetup { get; set; } + /// Feature options for code scanning default setup +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::GitHub.Models.CodeScanningDefaultSetupOptions? CodeScanningDefaultSetupOptions { get; set; } +#nullable restore +#else + public global::GitHub.Models.CodeScanningDefaultSetupOptions CodeScanningDefaultSetupOptions { get; set; } +#endif /// The enablement status of Dependabot alerts public global::GitHub.Orgs.Item.CodeSecurity.Configurations.ConfigurationsPostRequestBody_dependabot_alerts? DependabotAlerts { get; set; } /// The enablement status of Dependabot security updates @@ -109,6 +118,7 @@ public virtual IDictionary> GetFieldDeserializers() { { "advanced_security", n => { AdvancedSecurity = n.GetEnumValue(); } }, { "code_scanning_default_setup", n => { CodeScanningDefaultSetup = n.GetEnumValue(); } }, + { "code_scanning_default_setup_options", n => { CodeScanningDefaultSetupOptions = n.GetObjectValue(global::GitHub.Models.CodeScanningDefaultSetupOptions.CreateFromDiscriminatorValue); } }, { "dependabot_alerts", n => { DependabotAlerts = n.GetEnumValue(); } }, { "dependabot_security_updates", n => { DependabotSecurityUpdates = n.GetEnumValue(); } }, { "dependency_graph", n => { DependencyGraph = n.GetEnumValue(); } }, @@ -135,6 +145,7 @@ public virtual void Serialize(ISerializationWriter writer) _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteEnumValue("advanced_security", AdvancedSecurity); writer.WriteEnumValue("code_scanning_default_setup", CodeScanningDefaultSetup); + writer.WriteObjectValue("code_scanning_default_setup_options", CodeScanningDefaultSetupOptions); writer.WriteEnumValue("dependabot_alerts", DependabotAlerts); writer.WriteEnumValue("dependabot_security_updates", DependabotSecurityUpdates); writer.WriteEnumValue("dependency_graph", DependencyGraph); diff --git a/src/GitHub/Orgs/Item/CodeSecurity/Configurations/Item/WithConfiguration_PatchRequestBody.cs b/src/GitHub/Orgs/Item/CodeSecurity/Configurations/Item/WithConfiguration_PatchRequestBody.cs index 66811bcf..e845ddb0 100644 --- a/src/GitHub/Orgs/Item/CodeSecurity/Configurations/Item/WithConfiguration_PatchRequestBody.cs +++ b/src/GitHub/Orgs/Item/CodeSecurity/Configurations/Item/WithConfiguration_PatchRequestBody.cs @@ -1,5 +1,6 @@ // #pragma warning disable CS0618 +using GitHub.Models; using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; using System.Collections.Generic; @@ -16,6 +17,14 @@ public partial class WithConfiguration_PatchRequestBody : IParsable public global::GitHub.Orgs.Item.CodeSecurity.Configurations.Item.WithConfiguration_PatchRequestBody_advanced_security? AdvancedSecurity { get; set; } /// The enablement status of code scanning default setup public global::GitHub.Orgs.Item.CodeSecurity.Configurations.Item.WithConfiguration_PatchRequestBody_code_scanning_default_setup? CodeScanningDefaultSetup { get; set; } + /// Feature options for code scanning default setup +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public global::GitHub.Models.CodeScanningDefaultSetupOptions? CodeScanningDefaultSetupOptions { get; set; } +#nullable restore +#else + public global::GitHub.Models.CodeScanningDefaultSetupOptions CodeScanningDefaultSetupOptions { get; set; } +#endif /// The enablement status of Dependabot alerts public global::GitHub.Orgs.Item.CodeSecurity.Configurations.Item.WithConfiguration_PatchRequestBody_dependabot_alerts? DependabotAlerts { get; set; } /// The enablement status of Dependabot security updates @@ -90,6 +99,7 @@ public virtual IDictionary> GetFieldDeserializers() { { "advanced_security", n => { AdvancedSecurity = n.GetEnumValue(); } }, { "code_scanning_default_setup", n => { CodeScanningDefaultSetup = n.GetEnumValue(); } }, + { "code_scanning_default_setup_options", n => { CodeScanningDefaultSetupOptions = n.GetObjectValue(global::GitHub.Models.CodeScanningDefaultSetupOptions.CreateFromDiscriminatorValue); } }, { "dependabot_alerts", n => { DependabotAlerts = n.GetEnumValue(); } }, { "dependabot_security_updates", n => { DependabotSecurityUpdates = n.GetEnumValue(); } }, { "dependency_graph", n => { DependencyGraph = n.GetEnumValue(); } }, @@ -116,6 +126,7 @@ public virtual void Serialize(ISerializationWriter writer) _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteEnumValue("advanced_security", AdvancedSecurity); writer.WriteEnumValue("code_scanning_default_setup", CodeScanningDefaultSetup); + writer.WriteObjectValue("code_scanning_default_setup_options", CodeScanningDefaultSetupOptions); writer.WriteEnumValue("dependabot_alerts", DependabotAlerts); writer.WriteEnumValue("dependabot_security_updates", DependabotSecurityUpdates); writer.WriteEnumValue("dependency_graph", DependencyGraph); diff --git a/src/GitHub/Orgs/Item/Copilot/Billing/BillingRequestBuilder.cs b/src/GitHub/Orgs/Item/Copilot/Billing/BillingRequestBuilder.cs index 95d84827..0c44f2a4 100644 --- a/src/GitHub/Orgs/Item/Copilot/Billing/BillingRequestBuilder.cs +++ b/src/GitHub/Orgs/Item/Copilot/Billing/BillingRequestBuilder.cs @@ -52,7 +52,7 @@ public BillingRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba { } /// - /// > [!NOTE]> This endpoint is in public preview and is subject to change.Gets information about an organization's Copilot subscription, including seat breakdownand feature policies. To configure these settings, go to your organization's settings on GitHub.com.For more information, see "[Managing policies for Copilot in your organization](https://docs.github.com/enterprise-cloud@latest//copilot/managing-copilot/managing-policies-for-copilot-business-in-your-organization)".Only organization owners can view details about the organization's Copilot Business or Copilot Enterprise subscription.OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `read:org` scopes to use this endpoint. + /// > [!NOTE]> This endpoint is in public preview and is subject to change.Gets information about an organization's Copilot subscription, including seat breakdownand feature policies. To configure these settings, go to your organization's settings on GitHub.com.For more information, see "[Managing policies for Copilot in your organization](https://docs.github.com/enterprise-cloud@latest//copilot/managing-copilot/managing-policies-for-copilot-business-in-your-organization)."Only organization owners can view details about the organization's Copilot Business or Copilot Enterprise subscription.OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `read:org` scopes to use this endpoint. /// API method documentation /// /// A @@ -82,7 +82,7 @@ public BillingRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba return await RequestAdapter.SendAsync(requestInfo, global::GitHub.Models.CopilotOrganizationDetails.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } /// - /// > [!NOTE]> This endpoint is in public preview and is subject to change.Gets information about an organization's Copilot subscription, including seat breakdownand feature policies. To configure these settings, go to your organization's settings on GitHub.com.For more information, see "[Managing policies for Copilot in your organization](https://docs.github.com/enterprise-cloud@latest//copilot/managing-copilot/managing-policies-for-copilot-business-in-your-organization)".Only organization owners can view details about the organization's Copilot Business or Copilot Enterprise subscription.OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `read:org` scopes to use this endpoint. + /// > [!NOTE]> This endpoint is in public preview and is subject to change.Gets information about an organization's Copilot subscription, including seat breakdownand feature policies. To configure these settings, go to your organization's settings on GitHub.com.For more information, see "[Managing policies for Copilot in your organization](https://docs.github.com/enterprise-cloud@latest//copilot/managing-copilot/managing-policies-for-copilot-business-in-your-organization)."Only organization owners can view details about the organization's Copilot Business or Copilot Enterprise subscription.OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `read:org` scopes to use this endpoint. /// /// A /// Configuration for the request such as headers, query parameters, and middleware options. diff --git a/src/GitHub/Orgs/Item/Copilot/Billing/Seats/SeatsRequestBuilder.cs b/src/GitHub/Orgs/Item/Copilot/Billing/Seats/SeatsRequestBuilder.cs index 81d03e33..12247fc9 100644 --- a/src/GitHub/Orgs/Item/Copilot/Billing/Seats/SeatsRequestBuilder.cs +++ b/src/GitHub/Orgs/Item/Copilot/Billing/Seats/SeatsRequestBuilder.cs @@ -34,7 +34,7 @@ public SeatsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base { } /// - /// > [!NOTE]> This endpoint is in public preview and is subject to change.Lists all active Copilot seats for an organization with a Copilot Business or Copilot Enterprise subscription.Only organization owners can view assigned seats.OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `read:org` scopes to use this endpoint. + /// > [!NOTE]> This endpoint is in public preview and is subject to change.Lists all Copilot seats for which an organization with a Copilot Business or Copilot Enterprise subscription is currently being billed.Only organization owners can view assigned seats.Each seat object contains information about the assigned user's most recent Copilot activity. Users must have telemetry enabled in their IDE for Copilot in the IDE activity to be reflected in `last_activity_at`.For more information about activity data, see "[Reviewing user activity data for Copilot in your organization](https://docs.github.com/enterprise-cloud@latest//copilot/managing-copilot/managing-github-copilot-in-your-organization/reviewing-activity-related-to-github-copilot-in-your-organization/reviewing-user-activity-data-for-copilot-in-your-organization)."OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `read:org` scopes to use this endpoint. /// API method documentation /// /// A @@ -64,7 +64,7 @@ public SeatsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base return await RequestAdapter.SendAsync(requestInfo, global::GitHub.Orgs.Item.Copilot.Billing.Seats.SeatsGetResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } /// - /// > [!NOTE]> This endpoint is in public preview and is subject to change.Lists all active Copilot seats for an organization with a Copilot Business or Copilot Enterprise subscription.Only organization owners can view assigned seats.OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `read:org` scopes to use this endpoint. + /// > [!NOTE]> This endpoint is in public preview and is subject to change.Lists all Copilot seats for which an organization with a Copilot Business or Copilot Enterprise subscription is currently being billed.Only organization owners can view assigned seats.Each seat object contains information about the assigned user's most recent Copilot activity. Users must have telemetry enabled in their IDE for Copilot in the IDE activity to be reflected in `last_activity_at`.For more information about activity data, see "[Reviewing user activity data for Copilot in your organization](https://docs.github.com/enterprise-cloud@latest//copilot/managing-copilot/managing-github-copilot-in-your-organization/reviewing-activity-related-to-github-copilot-in-your-organization/reviewing-user-activity-data-for-copilot-in-your-organization)."OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `read:org` scopes to use this endpoint. /// /// A /// Configuration for the request such as headers, query parameters, and middleware options. @@ -92,7 +92,7 @@ public RequestInformation ToGetRequestInformation(Action - /// > [!NOTE]> This endpoint is in public preview and is subject to change.Lists all active Copilot seats for an organization with a Copilot Business or Copilot Enterprise subscription.Only organization owners can view assigned seats.OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `read:org` scopes to use this endpoint. + /// > [!NOTE]> This endpoint is in public preview and is subject to change.Lists all Copilot seats for which an organization with a Copilot Business or Copilot Enterprise subscription is currently being billed.Only organization owners can view assigned seats.Each seat object contains information about the assigned user's most recent Copilot activity. Users must have telemetry enabled in their IDE for Copilot in the IDE activity to be reflected in `last_activity_at`.For more information about activity data, see "[Reviewing user activity data for Copilot in your organization](https://docs.github.com/enterprise-cloud@latest//copilot/managing-copilot/managing-github-copilot-in-your-organization/reviewing-activity-related-to-github-copilot-in-your-organization/reviewing-user-activity-data-for-copilot-in-your-organization)."OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `read:org` scopes to use this endpoint. /// [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.19.0")] public partial class SeatsRequestBuilderGetQueryParameters diff --git a/src/GitHub/Orgs/Item/Copilot/Billing/Selected_teams/Selected_teamsDeleteResponse.cs b/src/GitHub/Orgs/Item/Copilot/Billing/Selected_teams/Selected_teamsDeleteResponse.cs index c5297347..ed10b4ce 100644 --- a/src/GitHub/Orgs/Item/Copilot/Billing/Selected_teams/Selected_teamsDeleteResponse.cs +++ b/src/GitHub/Orgs/Item/Copilot/Billing/Selected_teams/Selected_teamsDeleteResponse.cs @@ -8,7 +8,7 @@ namespace GitHub.Orgs.Item.Copilot.Billing.Selected_teams { /// - /// The total number of seat assignments cancelled. + /// The total number of seats set to "pending cancellation" for members of the specified team(s). /// [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.19.0")] public partial class Selected_teamsDeleteResponse : IAdditionalDataHolder, IParsable diff --git a/src/GitHub/Orgs/Item/Copilot/Billing/Selected_teams/Selected_teamsPostResponse.cs b/src/GitHub/Orgs/Item/Copilot/Billing/Selected_teams/Selected_teamsPostResponse.cs index 3a3a00ea..64399319 100644 --- a/src/GitHub/Orgs/Item/Copilot/Billing/Selected_teams/Selected_teamsPostResponse.cs +++ b/src/GitHub/Orgs/Item/Copilot/Billing/Selected_teams/Selected_teamsPostResponse.cs @@ -8,7 +8,7 @@ namespace GitHub.Orgs.Item.Copilot.Billing.Selected_teams { /// - /// The total number of seat assignments created. + /// The total number of seats created for members of the specified team(s). /// [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.19.0")] public partial class Selected_teamsPostResponse : IAdditionalDataHolder, IParsable diff --git a/src/GitHub/Orgs/Item/Copilot/Billing/Selected_teams/Selected_teamsRequestBuilder.cs b/src/GitHub/Orgs/Item/Copilot/Billing/Selected_teams/Selected_teamsRequestBuilder.cs index 72b56266..becc0d0a 100644 --- a/src/GitHub/Orgs/Item/Copilot/Billing/Selected_teams/Selected_teamsRequestBuilder.cs +++ b/src/GitHub/Orgs/Item/Copilot/Billing/Selected_teams/Selected_teamsRequestBuilder.cs @@ -34,7 +34,7 @@ public Selected_teamsRequestBuilder(string rawUrl, IRequestAdapter requestAdapte { } /// - /// > [!NOTE]> This endpoint is in public preview and is subject to change.Cancels the Copilot seat assignment for all members of each team specified.This will cause the members of the specified team(s) to lose access to GitHub Copilot at the end of the current billing cycle, and the organization will not be billed further for those users.For more information about Copilot pricing, see "[Pricing for GitHub Copilot](https://docs.github.com/enterprise-cloud@latest//billing/managing-billing-for-github-copilot/about-billing-for-github-copilot#about-billing-for-github-copilot)".For more information about disabling access to Copilot Business or Enterprise, see "[Revoking access to GitHub Copilot for specific users in your organization](https://docs.github.com/enterprise-cloud@latest//copilot/managing-copilot/managing-access-for-copilot-in-your-organization#revoking-access-to-github-copilot-for-specific-users-in-your-organization)".Only organization owners can cancel Copilot seats for their organization members.OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `admin:org` scopes to use this endpoint. + /// > [!NOTE]> This endpoint is in public preview and is subject to change.Sets seats for all members of each team specified to "pending cancellation".This will cause the members of the specified team(s) to lose access to GitHub Copilot at the end of the current billing cycle unless they retain access through another team.For more information about disabling access to Copilot, see "[Revoking access to Copilot for members of your organization](https://docs.github.com/enterprise-cloud@latest//copilot/managing-copilot/managing-github-copilot-in-your-organization/managing-access-to-github-copilot-in-your-organization/revoking-access-to-copilot-for-members-of-your-organization)."Only organization owners can cancel Copilot seats for their organization members.The response contains the total number of seats set to "pending cancellation".OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `admin:org` scopes to use this endpoint. /// API method documentation /// /// A @@ -66,7 +66,7 @@ public Selected_teamsRequestBuilder(string rawUrl, IRequestAdapter requestAdapte return await RequestAdapter.SendAsync(requestInfo, global::GitHub.Orgs.Item.Copilot.Billing.Selected_teams.Selected_teamsDeleteResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } /// - /// > [!NOTE]> This endpoint is in public preview and is subject to change.Purchases a GitHub Copilot seat for all users within each specified team.The organization will be billed accordingly. For more information about Copilot pricing, see "[Pricing for GitHub Copilot](https://docs.github.com/enterprise-cloud@latest//billing/managing-billing-for-github-copilot/about-billing-for-github-copilot#about-billing-for-github-copilot)".Only organization owners can add Copilot seats for their organization members.In order for an admin to use this endpoint, the organization must have a Copilot Business or Enterprise subscription and a configured suggestion matching policy.For more information about setting up a Copilot subscription, see "[Setting up a Copilot subscription for your organization](https://docs.github.com/enterprise-cloud@latest//billing/managing-billing-for-github-copilot/managing-your-github-copilot-subscription-for-your-organization-or-enterprise)".For more information about setting a suggestion matching policy, see "[Configuring suggestion matching policies for GitHub Copilot in your organization](https://docs.github.com/enterprise-cloud@latest//copilot/managing-copilot/managing-policies-for-github-copilot-in-your-organization#configuring-suggestion-matching-policies-for-github-copilot-in-your-organization)".The response will contain the total number of new seats that were created and existing seats that were refreshed.OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `admin:org` scopes to use this endpoint. + /// > [!NOTE]> This endpoint is in public preview and is subject to change.Purchases a GitHub Copilot seat for all users within each specified team.The organization will be billed for each seat based on the organization's Copilot plan. For more information about Copilot pricing, see "[About billing for GitHub Copilot in your organization](https://docs.github.com/enterprise-cloud@latest//copilot/managing-copilot/managing-github-copilot-in-your-organization/managing-the-copilot-subscription-for-your-organization/about-billing-for-github-copilot-in-your-organization)."Only organization owners can purchase Copilot seats for their organization members. The organization must have a Copilot Business or Copilot Enterprise subscription and a configured suggestion matching policy.For more information about setting up a Copilot subscription, see "[Subscribing to Copilot for your organization](https://docs.github.com/enterprise-cloud@latest//copilot/managing-copilot/managing-github-copilot-in-your-organization/managing-the-copilot-subscription-for-your-organization/subscribing-to-copilot-for-your-organization)."For more information about setting a suggestion matching policy, see "[Managing policies for Copilot in your organization](https://docs.github.com/enterprise-cloud@latest//copilot/managing-copilot/managing-github-copilot-in-your-organization/setting-policies-for-copilot-in-your-organization/managing-policies-for-copilot-in-your-organization#policies-for-suggestion-matching)."The response contains the total number of new seats that were created and existing seats that were refreshed.OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `admin:org` scopes to use this endpoint. /// API method documentation /// /// A @@ -98,7 +98,7 @@ public Selected_teamsRequestBuilder(string rawUrl, IRequestAdapter requestAdapte return await RequestAdapter.SendAsync(requestInfo, global::GitHub.Orgs.Item.Copilot.Billing.Selected_teams.Selected_teamsPostResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } /// - /// > [!NOTE]> This endpoint is in public preview and is subject to change.Cancels the Copilot seat assignment for all members of each team specified.This will cause the members of the specified team(s) to lose access to GitHub Copilot at the end of the current billing cycle, and the organization will not be billed further for those users.For more information about Copilot pricing, see "[Pricing for GitHub Copilot](https://docs.github.com/enterprise-cloud@latest//billing/managing-billing-for-github-copilot/about-billing-for-github-copilot#about-billing-for-github-copilot)".For more information about disabling access to Copilot Business or Enterprise, see "[Revoking access to GitHub Copilot for specific users in your organization](https://docs.github.com/enterprise-cloud@latest//copilot/managing-copilot/managing-access-for-copilot-in-your-organization#revoking-access-to-github-copilot-for-specific-users-in-your-organization)".Only organization owners can cancel Copilot seats for their organization members.OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `admin:org` scopes to use this endpoint. + /// > [!NOTE]> This endpoint is in public preview and is subject to change.Sets seats for all members of each team specified to "pending cancellation".This will cause the members of the specified team(s) to lose access to GitHub Copilot at the end of the current billing cycle unless they retain access through another team.For more information about disabling access to Copilot, see "[Revoking access to Copilot for members of your organization](https://docs.github.com/enterprise-cloud@latest//copilot/managing-copilot/managing-github-copilot-in-your-organization/managing-access-to-github-copilot-in-your-organization/revoking-access-to-copilot-for-members-of-your-organization)."Only organization owners can cancel Copilot seats for their organization members.The response contains the total number of seats set to "pending cancellation".OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `admin:org` scopes to use this endpoint. /// /// A /// The request body @@ -120,7 +120,7 @@ public RequestInformation ToDeleteRequestInformation(global::GitHub.Orgs.Item.Co return requestInfo; } /// - /// > [!NOTE]> This endpoint is in public preview and is subject to change.Purchases a GitHub Copilot seat for all users within each specified team.The organization will be billed accordingly. For more information about Copilot pricing, see "[Pricing for GitHub Copilot](https://docs.github.com/enterprise-cloud@latest//billing/managing-billing-for-github-copilot/about-billing-for-github-copilot#about-billing-for-github-copilot)".Only organization owners can add Copilot seats for their organization members.In order for an admin to use this endpoint, the organization must have a Copilot Business or Enterprise subscription and a configured suggestion matching policy.For more information about setting up a Copilot subscription, see "[Setting up a Copilot subscription for your organization](https://docs.github.com/enterprise-cloud@latest//billing/managing-billing-for-github-copilot/managing-your-github-copilot-subscription-for-your-organization-or-enterprise)".For more information about setting a suggestion matching policy, see "[Configuring suggestion matching policies for GitHub Copilot in your organization](https://docs.github.com/enterprise-cloud@latest//copilot/managing-copilot/managing-policies-for-github-copilot-in-your-organization#configuring-suggestion-matching-policies-for-github-copilot-in-your-organization)".The response will contain the total number of new seats that were created and existing seats that were refreshed.OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `admin:org` scopes to use this endpoint. + /// > [!NOTE]> This endpoint is in public preview and is subject to change.Purchases a GitHub Copilot seat for all users within each specified team.The organization will be billed for each seat based on the organization's Copilot plan. For more information about Copilot pricing, see "[About billing for GitHub Copilot in your organization](https://docs.github.com/enterprise-cloud@latest//copilot/managing-copilot/managing-github-copilot-in-your-organization/managing-the-copilot-subscription-for-your-organization/about-billing-for-github-copilot-in-your-organization)."Only organization owners can purchase Copilot seats for their organization members. The organization must have a Copilot Business or Copilot Enterprise subscription and a configured suggestion matching policy.For more information about setting up a Copilot subscription, see "[Subscribing to Copilot for your organization](https://docs.github.com/enterprise-cloud@latest//copilot/managing-copilot/managing-github-copilot-in-your-organization/managing-the-copilot-subscription-for-your-organization/subscribing-to-copilot-for-your-organization)."For more information about setting a suggestion matching policy, see "[Managing policies for Copilot in your organization](https://docs.github.com/enterprise-cloud@latest//copilot/managing-copilot/managing-github-copilot-in-your-organization/setting-policies-for-copilot-in-your-organization/managing-policies-for-copilot-in-your-organization#policies-for-suggestion-matching)."The response contains the total number of new seats that were created and existing seats that were refreshed.OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `admin:org` scopes to use this endpoint. /// /// A /// The request body diff --git a/src/GitHub/Orgs/Item/Copilot/Billing/Selected_users/Selected_usersDeleteResponse.cs b/src/GitHub/Orgs/Item/Copilot/Billing/Selected_users/Selected_usersDeleteResponse.cs index 9e41ac9b..9cfd3e06 100644 --- a/src/GitHub/Orgs/Item/Copilot/Billing/Selected_users/Selected_usersDeleteResponse.cs +++ b/src/GitHub/Orgs/Item/Copilot/Billing/Selected_users/Selected_usersDeleteResponse.cs @@ -8,7 +8,7 @@ namespace GitHub.Orgs.Item.Copilot.Billing.Selected_users { /// - /// The total number of seat assignments cancelled. + /// The total number of seats set to "pending cancellation" for the specified users. /// [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.19.0")] public partial class Selected_usersDeleteResponse : IAdditionalDataHolder, IParsable diff --git a/src/GitHub/Orgs/Item/Copilot/Billing/Selected_users/Selected_usersPostResponse.cs b/src/GitHub/Orgs/Item/Copilot/Billing/Selected_users/Selected_usersPostResponse.cs index c3990213..5e97fa21 100644 --- a/src/GitHub/Orgs/Item/Copilot/Billing/Selected_users/Selected_usersPostResponse.cs +++ b/src/GitHub/Orgs/Item/Copilot/Billing/Selected_users/Selected_usersPostResponse.cs @@ -8,7 +8,7 @@ namespace GitHub.Orgs.Item.Copilot.Billing.Selected_users { /// - /// The total number of seat assignments created. + /// The total number of seats created for the specified user(s). /// [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.19.0")] public partial class Selected_usersPostResponse : IAdditionalDataHolder, IParsable diff --git a/src/GitHub/Orgs/Item/Copilot/Billing/Selected_users/Selected_usersRequestBuilder.cs b/src/GitHub/Orgs/Item/Copilot/Billing/Selected_users/Selected_usersRequestBuilder.cs index 4761f7ea..975213e2 100644 --- a/src/GitHub/Orgs/Item/Copilot/Billing/Selected_users/Selected_usersRequestBuilder.cs +++ b/src/GitHub/Orgs/Item/Copilot/Billing/Selected_users/Selected_usersRequestBuilder.cs @@ -34,7 +34,7 @@ public Selected_usersRequestBuilder(string rawUrl, IRequestAdapter requestAdapte { } /// - /// > [!NOTE]> This endpoint is in public preview and is subject to change.Cancels the Copilot seat assignment for each user specified.This will cause the specified users to lose access to GitHub Copilot at the end of the current billing cycle, and the organization will not be billed further for those users.For more information about Copilot pricing, see "[Pricing for GitHub Copilot](https://docs.github.com/enterprise-cloud@latest//billing/managing-billing-for-github-copilot/about-billing-for-github-copilot#about-billing-for-github-copilot)".For more information about disabling access to Copilot Business or Enterprise, see "[Revoking access to GitHub Copilot for specific users in your organization](https://docs.github.com/enterprise-cloud@latest//copilot/managing-copilot/managing-access-for-copilot-in-your-organization#revoking-access-to-github-copilot-for-specific-users-in-your-organization)".Only organization owners can cancel Copilot seats for their organization members.OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `admin:org` scopes to use this endpoint. + /// > [!NOTE]> This endpoint is in public preview and is subject to change.Sets seats for all users specified to "pending cancellation".This will cause the specified users to lose access to GitHub Copilot at the end of the current billing cycle unless they retain access through team membership.For more information about disabling access to Copilot, see "[Revoking access to Copilot for members of your organization](https://docs.github.com/enterprise-cloud@latest//copilot/managing-copilot/managing-github-copilot-in-your-organization/managing-access-to-github-copilot-in-your-organization/revoking-access-to-copilot-for-members-of-your-organization)."Only organization owners can cancel Copilot seats for their organization members.The response contains the total number of seats set to "pending cancellation".OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `admin:org` scopes to use this endpoint. /// API method documentation /// /// A @@ -66,7 +66,7 @@ public Selected_usersRequestBuilder(string rawUrl, IRequestAdapter requestAdapte return await RequestAdapter.SendAsync(requestInfo, global::GitHub.Orgs.Item.Copilot.Billing.Selected_users.Selected_usersDeleteResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } /// - /// > [!NOTE]> This endpoint is in public preview and is subject to change.Purchases a GitHub Copilot seat for each user specified.The organization will be billed accordingly. For more information about Copilot pricing, see "[Pricing for GitHub Copilot](https://docs.github.com/enterprise-cloud@latest//billing/managing-billing-for-github-copilot/about-billing-for-github-copilot#about-billing-for-github-copilot)".Only organization owners can add Copilot seats for their organization members.In order for an admin to use this endpoint, the organization must have a Copilot Business or Enterprise subscription and a configured suggestion matching policy.For more information about setting up a Copilot subscription, see "[Setting up a Copilot subscription for your organization](https://docs.github.com/enterprise-cloud@latest//billing/managing-billing-for-github-copilot/managing-your-github-copilot-subscription-for-your-organization-or-enterprise)".For more information about setting a suggestion matching policy, see "[Configuring suggestion matching policies for GitHub Copilot in your organization](https://docs.github.com/enterprise-cloud@latest//copilot/managing-copilot/managing-policies-for-github-copilot-in-your-organization#configuring-suggestion-matching-policies-for-github-copilot-in-your-organization)".The response will contain the total number of new seats that were created and existing seats that were refreshed.OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `admin:org` scopes to use this endpoint. + /// > [!NOTE]> This endpoint is in public preview and is subject to change.Purchases a GitHub Copilot seat for each user specified.The organization will be billed for each seat based on the organization's Copilot plan. For more information about Copilot pricing, see "[About billing for GitHub Copilot in your organization](https://docs.github.com/enterprise-cloud@latest//copilot/managing-copilot/managing-github-copilot-in-your-organization/managing-the-copilot-subscription-for-your-organization/about-billing-for-github-copilot-in-your-organization)."Only organization owners can purchase Copilot seats for their organization members. The organization must have a Copilot Business or Copilot Enterprise subscription and a configured suggestion matching policy.For more information about setting up a Copilot subscription, see "[Subscribing to Copilot for your organization](https://docs.github.com/enterprise-cloud@latest//copilot/managing-copilot/managing-github-copilot-in-your-organization/managing-the-copilot-subscription-for-your-organization/subscribing-to-copilot-for-your-organization)."For more information about setting a suggestion matching policy, see "[Managing policies for Copilot in your organization](https://docs.github.com/enterprise-cloud@latest//copilot/managing-copilot/managing-github-copilot-in-your-organization/setting-policies-for-copilot-in-your-organization/managing-policies-for-copilot-in-your-organization#policies-for-suggestion-matching)."The response contains the total number of new seats that were created and existing seats that were refreshed.OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `admin:org` scopes to use this endpoint. /// API method documentation /// /// A @@ -98,7 +98,7 @@ public Selected_usersRequestBuilder(string rawUrl, IRequestAdapter requestAdapte return await RequestAdapter.SendAsync(requestInfo, global::GitHub.Orgs.Item.Copilot.Billing.Selected_users.Selected_usersPostResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } /// - /// > [!NOTE]> This endpoint is in public preview and is subject to change.Cancels the Copilot seat assignment for each user specified.This will cause the specified users to lose access to GitHub Copilot at the end of the current billing cycle, and the organization will not be billed further for those users.For more information about Copilot pricing, see "[Pricing for GitHub Copilot](https://docs.github.com/enterprise-cloud@latest//billing/managing-billing-for-github-copilot/about-billing-for-github-copilot#about-billing-for-github-copilot)".For more information about disabling access to Copilot Business or Enterprise, see "[Revoking access to GitHub Copilot for specific users in your organization](https://docs.github.com/enterprise-cloud@latest//copilot/managing-copilot/managing-access-for-copilot-in-your-organization#revoking-access-to-github-copilot-for-specific-users-in-your-organization)".Only organization owners can cancel Copilot seats for their organization members.OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `admin:org` scopes to use this endpoint. + /// > [!NOTE]> This endpoint is in public preview and is subject to change.Sets seats for all users specified to "pending cancellation".This will cause the specified users to lose access to GitHub Copilot at the end of the current billing cycle unless they retain access through team membership.For more information about disabling access to Copilot, see "[Revoking access to Copilot for members of your organization](https://docs.github.com/enterprise-cloud@latest//copilot/managing-copilot/managing-github-copilot-in-your-organization/managing-access-to-github-copilot-in-your-organization/revoking-access-to-copilot-for-members-of-your-organization)."Only organization owners can cancel Copilot seats for their organization members.The response contains the total number of seats set to "pending cancellation".OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `admin:org` scopes to use this endpoint. /// /// A /// The request body @@ -120,7 +120,7 @@ public RequestInformation ToDeleteRequestInformation(global::GitHub.Orgs.Item.Co return requestInfo; } /// - /// > [!NOTE]> This endpoint is in public preview and is subject to change.Purchases a GitHub Copilot seat for each user specified.The organization will be billed accordingly. For more information about Copilot pricing, see "[Pricing for GitHub Copilot](https://docs.github.com/enterprise-cloud@latest//billing/managing-billing-for-github-copilot/about-billing-for-github-copilot#about-billing-for-github-copilot)".Only organization owners can add Copilot seats for their organization members.In order for an admin to use this endpoint, the organization must have a Copilot Business or Enterprise subscription and a configured suggestion matching policy.For more information about setting up a Copilot subscription, see "[Setting up a Copilot subscription for your organization](https://docs.github.com/enterprise-cloud@latest//billing/managing-billing-for-github-copilot/managing-your-github-copilot-subscription-for-your-organization-or-enterprise)".For more information about setting a suggestion matching policy, see "[Configuring suggestion matching policies for GitHub Copilot in your organization](https://docs.github.com/enterprise-cloud@latest//copilot/managing-copilot/managing-policies-for-github-copilot-in-your-organization#configuring-suggestion-matching-policies-for-github-copilot-in-your-organization)".The response will contain the total number of new seats that were created and existing seats that were refreshed.OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `admin:org` scopes to use this endpoint. + /// > [!NOTE]> This endpoint is in public preview and is subject to change.Purchases a GitHub Copilot seat for each user specified.The organization will be billed for each seat based on the organization's Copilot plan. For more information about Copilot pricing, see "[About billing for GitHub Copilot in your organization](https://docs.github.com/enterprise-cloud@latest//copilot/managing-copilot/managing-github-copilot-in-your-organization/managing-the-copilot-subscription-for-your-organization/about-billing-for-github-copilot-in-your-organization)."Only organization owners can purchase Copilot seats for their organization members. The organization must have a Copilot Business or Copilot Enterprise subscription and a configured suggestion matching policy.For more information about setting up a Copilot subscription, see "[Subscribing to Copilot for your organization](https://docs.github.com/enterprise-cloud@latest//copilot/managing-copilot/managing-github-copilot-in-your-organization/managing-the-copilot-subscription-for-your-organization/subscribing-to-copilot-for-your-organization)."For more information about setting a suggestion matching policy, see "[Managing policies for Copilot in your organization](https://docs.github.com/enterprise-cloud@latest//copilot/managing-copilot/managing-github-copilot-in-your-organization/setting-policies-for-copilot-in-your-organization/managing-policies-for-copilot-in-your-organization#policies-for-suggestion-matching)."The response contains the total number of new seats that were created and existing seats that were refreshed.OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `admin:org` scopes to use this endpoint. /// /// A /// The request body diff --git a/src/GitHub/Orgs/Item/Insights/Api/RouteStats/Item/Item/WithActor_ItemRequestBuilder.cs b/src/GitHub/Orgs/Item/Insights/Api/RouteStats/Item/Item/WithActor_ItemRequestBuilder.cs index 36060b7d..3a0bcb30 100644 --- a/src/GitHub/Orgs/Item/Insights/Api/RouteStats/Item/Item/WithActor_ItemRequestBuilder.cs +++ b/src/GitHub/Orgs/Item/Insights/Api/RouteStats/Item/Item/WithActor_ItemRequestBuilder.cs @@ -22,7 +22,7 @@ public partial class WithActor_ItemRequestBuilder : BaseRequestBuilder /// /// Path parameters for the request /// The request adapter to use to execute the requests. - public WithActor_ItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/insights/api/route-stats/{actor_type}/{actor_id}?max_timestamp={max_timestamp}&min_timestamp={min_timestamp}{&direction*,page*,per_page*,sort*}", pathParameters) + public WithActor_ItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/insights/api/route-stats/{actor_type}/{actor_id}?min_timestamp={min_timestamp}{&api_route_substring*,direction*,max_timestamp*,page*,per_page*,sort*}", pathParameters) { } /// @@ -30,7 +30,7 @@ public WithActor_ItemRequestBuilder(Dictionary pathParameters, I /// /// The raw URL to use for the request builder. /// The request adapter to use to execute the requests. - public WithActor_ItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/insights/api/route-stats/{actor_type}/{actor_id}?max_timestamp={max_timestamp}&min_timestamp={min_timestamp}{&direction*,page*,per_page*,sort*}", rawUrl) + public WithActor_ItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/insights/api/route-stats/{actor_type}/{actor_id}?min_timestamp={min_timestamp}{&api_route_substring*,direction*,max_timestamp*,page*,per_page*,sort*}", rawUrl) { } /// @@ -87,10 +87,20 @@ public RequestInformation ToGetRequestInformation(ActionProviding a substring will filter results where the API route contains the substring. This is a case-insensitive search. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("api_route_substring")] + public string? ApiRouteSubstring { get; set; } +#nullable restore +#else + [QueryParameter("api_route_substring")] + public string ApiRouteSubstring { get; set; } +#endif /// The direction to sort the results by. [QueryParameter("direction")] public global::GitHub.Orgs.Item.Insights.Api.RouteStats.Item.Item.GetDirectionQueryParameterType? Direction { get; set; } - /// The maximum timestamp to query for stats + /// The maximum timestamp to query for stats. Defaults to the time 30 days ago. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable [QueryParameter("max_timestamp")] @@ -100,7 +110,7 @@ public partial class WithActor_ItemRequestBuilderGetQueryParameters [QueryParameter("max_timestamp")] public string MaxTimestamp { get; set; } #endif - /// The minimum timestamp to query for stats + /// The minimum timestamp to query for stats. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable [QueryParameter("min_timestamp")] diff --git a/src/GitHub/Orgs/Item/Insights/Api/SubjectStats/SubjectStatsRequestBuilder.cs b/src/GitHub/Orgs/Item/Insights/Api/SubjectStats/SubjectStatsRequestBuilder.cs index ef2e834c..0c33484d 100644 --- a/src/GitHub/Orgs/Item/Insights/Api/SubjectStats/SubjectStatsRequestBuilder.cs +++ b/src/GitHub/Orgs/Item/Insights/Api/SubjectStats/SubjectStatsRequestBuilder.cs @@ -22,7 +22,7 @@ public partial class SubjectStatsRequestBuilder : BaseRequestBuilder /// /// Path parameters for the request /// The request adapter to use to execute the requests. - public SubjectStatsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/insights/api/subject-stats?max_timestamp={max_timestamp}&min_timestamp={min_timestamp}{&direction*,page*,per_page*,sort*}", pathParameters) + public SubjectStatsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/insights/api/subject-stats?min_timestamp={min_timestamp}{&direction*,max_timestamp*,page*,per_page*,sort*,subject_name_substring*}", pathParameters) { } /// @@ -30,7 +30,7 @@ public SubjectStatsRequestBuilder(Dictionary pathParameters, IRe /// /// The raw URL to use for the request builder. /// The request adapter to use to execute the requests. - public SubjectStatsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/insights/api/subject-stats?max_timestamp={max_timestamp}&min_timestamp={min_timestamp}{&direction*,page*,per_page*,sort*}", rawUrl) + public SubjectStatsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/insights/api/subject-stats?min_timestamp={min_timestamp}{&direction*,max_timestamp*,page*,per_page*,sort*,subject_name_substring*}", rawUrl) { } /// @@ -90,7 +90,7 @@ public partial class SubjectStatsRequestBuilderGetQueryParameters /// The direction to sort the results by. [QueryParameter("direction")] public global::GitHub.Orgs.Item.Insights.Api.SubjectStats.GetDirectionQueryParameterType? Direction { get; set; } - /// The maximum timestamp to query for stats + /// The maximum timestamp to query for stats. Defaults to the time 30 days ago. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable [QueryParameter("max_timestamp")] @@ -100,7 +100,7 @@ public partial class SubjectStatsRequestBuilderGetQueryParameters [QueryParameter("max_timestamp")] public string MaxTimestamp { get; set; } #endif - /// The minimum timestamp to query for stats + /// The minimum timestamp to query for stats. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable [QueryParameter("min_timestamp")] @@ -125,6 +125,16 @@ public partial class SubjectStatsRequestBuilderGetQueryParameters #else [QueryParameter("sort")] public global::GitHub.Orgs.Item.Insights.Api.SubjectStats.GetSortQueryParameterType[] Sort { get; set; } +#endif + /// Providing a substring will filter results where the subject name contains the substring. This is a case-insensitive search. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("subject_name_substring")] + public string? SubjectNameSubstring { get; set; } +#nullable restore +#else + [QueryParameter("subject_name_substring")] + public string SubjectNameSubstring { get; set; } #endif } } diff --git a/src/GitHub/Orgs/Item/Insights/Api/SummaryStats/Item/Item/WithActor_ItemRequestBuilder.cs b/src/GitHub/Orgs/Item/Insights/Api/SummaryStats/Item/Item/WithActor_ItemRequestBuilder.cs index 19bf2524..260423e3 100644 --- a/src/GitHub/Orgs/Item/Insights/Api/SummaryStats/Item/Item/WithActor_ItemRequestBuilder.cs +++ b/src/GitHub/Orgs/Item/Insights/Api/SummaryStats/Item/Item/WithActor_ItemRequestBuilder.cs @@ -22,7 +22,7 @@ public partial class WithActor_ItemRequestBuilder : BaseRequestBuilder /// /// Path parameters for the request /// The request adapter to use to execute the requests. - public WithActor_ItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/insights/api/summary-stats/{actor_type}/{actor_id}?max_timestamp={max_timestamp}&min_timestamp={min_timestamp}", pathParameters) + public WithActor_ItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/insights/api/summary-stats/{actor_type}/{actor_id}?min_timestamp={min_timestamp}{&max_timestamp*}", pathParameters) { } /// @@ -30,7 +30,7 @@ public WithActor_ItemRequestBuilder(Dictionary pathParameters, I /// /// The raw URL to use for the request builder. /// The request adapter to use to execute the requests. - public WithActor_ItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/insights/api/summary-stats/{actor_type}/{actor_id}?max_timestamp={max_timestamp}&min_timestamp={min_timestamp}", rawUrl) + public WithActor_ItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/insights/api/summary-stats/{actor_type}/{actor_id}?min_timestamp={min_timestamp}{&max_timestamp*}", rawUrl) { } /// @@ -86,7 +86,7 @@ public RequestInformation ToGetRequestInformation(ActionThe maximum timestamp to query for stats + /// The maximum timestamp to query for stats. Defaults to the time 30 days ago. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable [QueryParameter("max_timestamp")] @@ -96,7 +96,7 @@ public partial class WithActor_ItemRequestBuilderGetQueryParameters [QueryParameter("max_timestamp")] public string MaxTimestamp { get; set; } #endif - /// The minimum timestamp to query for stats + /// The minimum timestamp to query for stats. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable [QueryParameter("min_timestamp")] diff --git a/src/GitHub/Orgs/Item/Insights/Api/SummaryStats/SummaryStatsRequestBuilder.cs b/src/GitHub/Orgs/Item/Insights/Api/SummaryStats/SummaryStatsRequestBuilder.cs index d1796f73..167d867f 100644 --- a/src/GitHub/Orgs/Item/Insights/Api/SummaryStats/SummaryStatsRequestBuilder.cs +++ b/src/GitHub/Orgs/Item/Insights/Api/SummaryStats/SummaryStatsRequestBuilder.cs @@ -41,7 +41,7 @@ public partial class SummaryStatsRequestBuilder : BaseRequestBuilder /// /// Path parameters for the request /// The request adapter to use to execute the requests. - public SummaryStatsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/insights/api/summary-stats?max_timestamp={max_timestamp}&min_timestamp={min_timestamp}", pathParameters) + public SummaryStatsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/insights/api/summary-stats?min_timestamp={min_timestamp}{&max_timestamp*}", pathParameters) { } /// @@ -49,7 +49,7 @@ public SummaryStatsRequestBuilder(Dictionary pathParameters, IRe /// /// The raw URL to use for the request builder. /// The request adapter to use to execute the requests. - public SummaryStatsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/insights/api/summary-stats?max_timestamp={max_timestamp}&min_timestamp={min_timestamp}", rawUrl) + public SummaryStatsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/insights/api/summary-stats?min_timestamp={min_timestamp}{&max_timestamp*}", rawUrl) { } /// @@ -105,7 +105,7 @@ public RequestInformation ToGetRequestInformation(ActionThe maximum timestamp to query for stats + /// The maximum timestamp to query for stats. Defaults to the time 30 days ago. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable [QueryParameter("max_timestamp")] @@ -115,7 +115,7 @@ public partial class SummaryStatsRequestBuilderGetQueryParameters [QueryParameter("max_timestamp")] public string MaxTimestamp { get; set; } #endif - /// The minimum timestamp to query for stats + /// The minimum timestamp to query for stats. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable [QueryParameter("min_timestamp")] diff --git a/src/GitHub/Orgs/Item/Insights/Api/SummaryStats/Users/Item/WithUser_ItemRequestBuilder.cs b/src/GitHub/Orgs/Item/Insights/Api/SummaryStats/Users/Item/WithUser_ItemRequestBuilder.cs index 7505ae8a..c50e10b1 100644 --- a/src/GitHub/Orgs/Item/Insights/Api/SummaryStats/Users/Item/WithUser_ItemRequestBuilder.cs +++ b/src/GitHub/Orgs/Item/Insights/Api/SummaryStats/Users/Item/WithUser_ItemRequestBuilder.cs @@ -22,7 +22,7 @@ public partial class WithUser_ItemRequestBuilder : BaseRequestBuilder /// /// Path parameters for the request /// The request adapter to use to execute the requests. - public WithUser_ItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/insights/api/summary-stats/users/{user_id}?max_timestamp={max_timestamp}&min_timestamp={min_timestamp}", pathParameters) + public WithUser_ItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/insights/api/summary-stats/users/{user_id}?min_timestamp={min_timestamp}{&max_timestamp*}", pathParameters) { } /// @@ -30,7 +30,7 @@ public WithUser_ItemRequestBuilder(Dictionary pathParameters, IR /// /// The raw URL to use for the request builder. /// The request adapter to use to execute the requests. - public WithUser_ItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/insights/api/summary-stats/users/{user_id}?max_timestamp={max_timestamp}&min_timestamp={min_timestamp}", rawUrl) + public WithUser_ItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/insights/api/summary-stats/users/{user_id}?min_timestamp={min_timestamp}{&max_timestamp*}", rawUrl) { } /// @@ -86,7 +86,7 @@ public RequestInformation ToGetRequestInformation(ActionThe maximum timestamp to query for stats + /// The maximum timestamp to query for stats. Defaults to the time 30 days ago. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable [QueryParameter("max_timestamp")] @@ -96,7 +96,7 @@ public partial class WithUser_ItemRequestBuilderGetQueryParameters [QueryParameter("max_timestamp")] public string MaxTimestamp { get; set; } #endif - /// The minimum timestamp to query for stats + /// The minimum timestamp to query for stats. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable [QueryParameter("min_timestamp")] diff --git a/src/GitHub/Orgs/Item/Insights/Api/TimeStats/Item/Item/WithActor_ItemRequestBuilder.cs b/src/GitHub/Orgs/Item/Insights/Api/TimeStats/Item/Item/WithActor_ItemRequestBuilder.cs index 16cea896..7c10f521 100644 --- a/src/GitHub/Orgs/Item/Insights/Api/TimeStats/Item/Item/WithActor_ItemRequestBuilder.cs +++ b/src/GitHub/Orgs/Item/Insights/Api/TimeStats/Item/Item/WithActor_ItemRequestBuilder.cs @@ -22,7 +22,7 @@ public partial class WithActor_ItemRequestBuilder : BaseRequestBuilder /// /// Path parameters for the request /// The request adapter to use to execute the requests. - public WithActor_ItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/insights/api/time-stats/{actor_type}/{actor_id}?max_timestamp={max_timestamp}&min_timestamp={min_timestamp}×tamp_increment={timestamp_increment}", pathParameters) + public WithActor_ItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/insights/api/time-stats/{actor_type}/{actor_id}?min_timestamp={min_timestamp}×tamp_increment={timestamp_increment}{&max_timestamp*}", pathParameters) { } /// @@ -30,7 +30,7 @@ public WithActor_ItemRequestBuilder(Dictionary pathParameters, I /// /// The raw URL to use for the request builder. /// The request adapter to use to execute the requests. - public WithActor_ItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/insights/api/time-stats/{actor_type}/{actor_id}?max_timestamp={max_timestamp}&min_timestamp={min_timestamp}×tamp_increment={timestamp_increment}", rawUrl) + public WithActor_ItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/insights/api/time-stats/{actor_type}/{actor_id}?min_timestamp={min_timestamp}×tamp_increment={timestamp_increment}{&max_timestamp*}", rawUrl) { } /// @@ -87,7 +87,7 @@ public RequestInformation ToGetRequestInformation(ActionThe maximum timestamp to query for stats + /// The maximum timestamp to query for stats. Defaults to the time 30 days ago. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable [QueryParameter("max_timestamp")] @@ -97,7 +97,7 @@ public partial class WithActor_ItemRequestBuilderGetQueryParameters [QueryParameter("max_timestamp")] public string MaxTimestamp { get; set; } #endif - /// The minimum timestamp to query for stats + /// The minimum timestamp to query for stats. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable [QueryParameter("min_timestamp")] diff --git a/src/GitHub/Orgs/Item/Insights/Api/TimeStats/TimeStatsRequestBuilder.cs b/src/GitHub/Orgs/Item/Insights/Api/TimeStats/TimeStatsRequestBuilder.cs index 1b92b1f8..85f3bdfd 100644 --- a/src/GitHub/Orgs/Item/Insights/Api/TimeStats/TimeStatsRequestBuilder.cs +++ b/src/GitHub/Orgs/Item/Insights/Api/TimeStats/TimeStatsRequestBuilder.cs @@ -41,7 +41,7 @@ public partial class TimeStatsRequestBuilder : BaseRequestBuilder /// /// Path parameters for the request /// The request adapter to use to execute the requests. - public TimeStatsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/insights/api/time-stats?max_timestamp={max_timestamp}&min_timestamp={min_timestamp}×tamp_increment={timestamp_increment}", pathParameters) + public TimeStatsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/insights/api/time-stats?min_timestamp={min_timestamp}×tamp_increment={timestamp_increment}{&max_timestamp*}", pathParameters) { } /// @@ -49,7 +49,7 @@ public TimeStatsRequestBuilder(Dictionary pathParameters, IReque /// /// The raw URL to use for the request builder. /// The request adapter to use to execute the requests. - public TimeStatsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/insights/api/time-stats?max_timestamp={max_timestamp}&min_timestamp={min_timestamp}×tamp_increment={timestamp_increment}", rawUrl) + public TimeStatsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/insights/api/time-stats?min_timestamp={min_timestamp}×tamp_increment={timestamp_increment}{&max_timestamp*}", rawUrl) { } /// @@ -106,7 +106,7 @@ public RequestInformation ToGetRequestInformation(ActionThe maximum timestamp to query for stats + /// The maximum timestamp to query for stats. Defaults to the time 30 days ago. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable [QueryParameter("max_timestamp")] @@ -116,7 +116,7 @@ public partial class TimeStatsRequestBuilderGetQueryParameters [QueryParameter("max_timestamp")] public string MaxTimestamp { get; set; } #endif - /// The minimum timestamp to query for stats + /// The minimum timestamp to query for stats. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable [QueryParameter("min_timestamp")] diff --git a/src/GitHub/Orgs/Item/Insights/Api/TimeStats/Users/Item/WithUser_ItemRequestBuilder.cs b/src/GitHub/Orgs/Item/Insights/Api/TimeStats/Users/Item/WithUser_ItemRequestBuilder.cs index 16111db7..b1fb57f3 100644 --- a/src/GitHub/Orgs/Item/Insights/Api/TimeStats/Users/Item/WithUser_ItemRequestBuilder.cs +++ b/src/GitHub/Orgs/Item/Insights/Api/TimeStats/Users/Item/WithUser_ItemRequestBuilder.cs @@ -22,7 +22,7 @@ public partial class WithUser_ItemRequestBuilder : BaseRequestBuilder /// /// Path parameters for the request /// The request adapter to use to execute the requests. - public WithUser_ItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/insights/api/time-stats/users/{user_id}?max_timestamp={max_timestamp}&min_timestamp={min_timestamp}×tamp_increment={timestamp_increment}", pathParameters) + public WithUser_ItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/insights/api/time-stats/users/{user_id}?min_timestamp={min_timestamp}×tamp_increment={timestamp_increment}{&max_timestamp*}", pathParameters) { } /// @@ -30,7 +30,7 @@ public WithUser_ItemRequestBuilder(Dictionary pathParameters, IR /// /// The raw URL to use for the request builder. /// The request adapter to use to execute the requests. - public WithUser_ItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/insights/api/time-stats/users/{user_id}?max_timestamp={max_timestamp}&min_timestamp={min_timestamp}×tamp_increment={timestamp_increment}", rawUrl) + public WithUser_ItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/insights/api/time-stats/users/{user_id}?min_timestamp={min_timestamp}×tamp_increment={timestamp_increment}{&max_timestamp*}", rawUrl) { } /// @@ -87,7 +87,7 @@ public RequestInformation ToGetRequestInformation(ActionThe maximum timestamp to query for stats + /// The maximum timestamp to query for stats. Defaults to the time 30 days ago. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable [QueryParameter("max_timestamp")] @@ -97,7 +97,7 @@ public partial class WithUser_ItemRequestBuilderGetQueryParameters [QueryParameter("max_timestamp")] public string MaxTimestamp { get; set; } #endif - /// The minimum timestamp to query for stats + /// The minimum timestamp to query for stats. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable [QueryParameter("min_timestamp")] diff --git a/src/GitHub/Orgs/Item/Insights/Api/UserStats/Item/WithUser_ItemRequestBuilder.cs b/src/GitHub/Orgs/Item/Insights/Api/UserStats/Item/WithUser_ItemRequestBuilder.cs index 5f9aa6d5..8f35e273 100644 --- a/src/GitHub/Orgs/Item/Insights/Api/UserStats/Item/WithUser_ItemRequestBuilder.cs +++ b/src/GitHub/Orgs/Item/Insights/Api/UserStats/Item/WithUser_ItemRequestBuilder.cs @@ -22,7 +22,7 @@ public partial class WithUser_ItemRequestBuilder : BaseRequestBuilder /// /// Path parameters for the request /// The request adapter to use to execute the requests. - public WithUser_ItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/insights/api/user-stats/{user_id}?max_timestamp={max_timestamp}&min_timestamp={min_timestamp}{&direction*,page*,per_page*,sort*}", pathParameters) + public WithUser_ItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/insights/api/user-stats/{user_id}?min_timestamp={min_timestamp}{&actor_name_substring*,direction*,max_timestamp*,page*,per_page*,sort*}", pathParameters) { } /// @@ -30,7 +30,7 @@ public WithUser_ItemRequestBuilder(Dictionary pathParameters, IR /// /// The raw URL to use for the request builder. /// The request adapter to use to execute the requests. - public WithUser_ItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/insights/api/user-stats/{user_id}?max_timestamp={max_timestamp}&min_timestamp={min_timestamp}{&direction*,page*,per_page*,sort*}", rawUrl) + public WithUser_ItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/orgs/{org}/insights/api/user-stats/{user_id}?min_timestamp={min_timestamp}{&actor_name_substring*,direction*,max_timestamp*,page*,per_page*,sort*}", rawUrl) { } /// @@ -87,10 +87,20 @@ public RequestInformation ToGetRequestInformation(ActionProviding a substring will filter results where the actor name contains the substring. This is a case-insensitive search. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("actor_name_substring")] + public string? ActorNameSubstring { get; set; } +#nullable restore +#else + [QueryParameter("actor_name_substring")] + public string ActorNameSubstring { get; set; } +#endif /// The direction to sort the results by. [QueryParameter("direction")] public global::GitHub.Orgs.Item.Insights.Api.UserStats.Item.GetDirectionQueryParameterType? Direction { get; set; } - /// The maximum timestamp to query for stats + /// The maximum timestamp to query for stats. Defaults to the time 30 days ago. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable [QueryParameter("max_timestamp")] @@ -100,7 +110,7 @@ public partial class WithUser_ItemRequestBuilderGetQueryParameters [QueryParameter("max_timestamp")] public string MaxTimestamp { get; set; } #endif - /// The minimum timestamp to query for stats + /// The minimum timestamp to query for stats. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format: `YYYY-MM-DDTHH:MM:SSZ`. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable [QueryParameter("min_timestamp")] diff --git a/src/GitHub/Orgs/Item/Members/Item/Copilot/CopilotRequestBuilder.cs b/src/GitHub/Orgs/Item/Members/Item/Copilot/CopilotRequestBuilder.cs index 1ffde2ab..e122a95f 100644 --- a/src/GitHub/Orgs/Item/Members/Item/Copilot/CopilotRequestBuilder.cs +++ b/src/GitHub/Orgs/Item/Members/Item/Copilot/CopilotRequestBuilder.cs @@ -34,7 +34,7 @@ public CopilotRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba { } /// - /// > [!NOTE]> This endpoint is in public preview and is subject to change.Gets the GitHub Copilot seat assignment details for a member of an organization who currently has access to GitHub Copilot.Only organization owners can view Copilot seat assignment details for members of their organization.OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `read:org` scopes to use this endpoint. + /// > [!NOTE]> This endpoint is in public preview and is subject to change.Gets the GitHub Copilot seat details for a member of an organization who currently has access to GitHub Copilot.The seat object contains information about the user's most recent Copilot activity. Users must have telemetry enabled in their IDE for Copilot in the IDE activity to be reflected in `last_activity_at`.For more information about activity data, see "[Reviewing user activity data for Copilot in your organization](https://docs.github.com/enterprise-cloud@latest//copilot/managing-copilot/managing-github-copilot-in-your-organization/reviewing-activity-related-to-github-copilot-in-your-organization/reviewing-user-activity-data-for-copilot-in-your-organization)."Only organization owners can view Copilot seat assignment details for members of their organization.OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `read:org` scopes to use this endpoint. /// API method documentation /// /// A @@ -64,7 +64,7 @@ public CopilotRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba return await RequestAdapter.SendAsync(requestInfo, global::GitHub.Models.CopilotSeatDetails.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } /// - /// > [!NOTE]> This endpoint is in public preview and is subject to change.Gets the GitHub Copilot seat assignment details for a member of an organization who currently has access to GitHub Copilot.Only organization owners can view Copilot seat assignment details for members of their organization.OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `read:org` scopes to use this endpoint. + /// > [!NOTE]> This endpoint is in public preview and is subject to change.Gets the GitHub Copilot seat details for a member of an organization who currently has access to GitHub Copilot.The seat object contains information about the user's most recent Copilot activity. Users must have telemetry enabled in their IDE for Copilot in the IDE activity to be reflected in `last_activity_at`.For more information about activity data, see "[Reviewing user activity data for Copilot in your organization](https://docs.github.com/enterprise-cloud@latest//copilot/managing-copilot/managing-github-copilot-in-your-organization/reviewing-activity-related-to-github-copilot-in-your-organization/reviewing-user-activity-data-for-copilot-in-your-organization)."Only organization owners can view Copilot seat assignment details for members of their organization.OAuth app tokens and personal access tokens (classic) need either the `manage_billing:copilot` or `read:org` scopes to use this endpoint. /// /// A /// Configuration for the request such as headers, query parameters, and middleware options. diff --git a/src/GitHub/Orgs/Item/Properties/Schema/Item/WithCustom_property_nameItemRequestBuilder.cs b/src/GitHub/Orgs/Item/Properties/Schema/Item/WithCustom_property_nameItemRequestBuilder.cs index 4d81cf1f..80f7fadd 100644 --- a/src/GitHub/Orgs/Item/Properties/Schema/Item/WithCustom_property_nameItemRequestBuilder.cs +++ b/src/GitHub/Orgs/Item/Properties/Schema/Item/WithCustom_property_nameItemRequestBuilder.cs @@ -89,18 +89,18 @@ public async Task DeleteAsync(Action /// /// A - /// The request body + /// Custom property set payload /// Cancellation token to use when cancelling requests /// Configuration for the request such as headers, query parameters, and middleware options. /// When receiving a 403 status code /// When receiving a 404 status code #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable - public async Task PutAsync(global::GitHub.Orgs.Item.Properties.Schema.Item.WithCustom_property_namePutRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + public async Task PutAsync(global::GitHub.Models.CustomPropertySetPayload body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) { #nullable restore #else - public async Task PutAsync(global::GitHub.Orgs.Item.Properties.Schema.Item.WithCustom_property_namePutRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + public async Task PutAsync(global::GitHub.Models.CustomPropertySetPayload body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) { #endif _ = body ?? throw new ArgumentNullException(nameof(body)); @@ -154,15 +154,15 @@ public RequestInformation ToGetRequestInformation(Action /// A - /// The request body + /// Custom property set payload /// 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.Orgs.Item.Properties.Schema.Item.WithCustom_property_namePutRequestBody body, Action>? requestConfiguration = default) + public RequestInformation ToPutRequestInformation(global::GitHub.Models.CustomPropertySetPayload body, Action>? requestConfiguration = default) { #nullable restore #else - public RequestInformation ToPutRequestInformation(global::GitHub.Orgs.Item.Properties.Schema.Item.WithCustom_property_namePutRequestBody body, Action> requestConfiguration = default) + public RequestInformation ToPutRequestInformation(global::GitHub.Models.CustomPropertySetPayload body, Action> requestConfiguration = default) { #endif _ = body ?? throw new ArgumentNullException(nameof(body)); diff --git a/src/GitHub/Orgs/Item/Rulesets/Item/WithRuleset_PutRequestBody.cs b/src/GitHub/Orgs/Item/Rulesets/Item/WithRuleset_PutRequestBody.cs index d5b3c025..a1c06b46 100644 --- a/src/GitHub/Orgs/Item/Rulesets/Item/WithRuleset_PutRequestBody.cs +++ b/src/GitHub/Orgs/Item/Rulesets/Item/WithRuleset_PutRequestBody.cs @@ -23,7 +23,7 @@ public partial class WithRuleset_PutRequestBody : IAdditionalDataHolder, IParsab #else public List BypassActors { get; set; } #endif - /// Conditions for an organization ruleset.The branch and tag rulesets conditions object should contain both `repository_name` and `ref_name` properties, or both `repository_id` and `ref_name` properties, or both `repository_property` and `ref_name` properties.The push rulesets conditions object does not require the `ref_name` property. + /// Conditions for an organization ruleset.The branch and tag rulesets conditions object should contain both `repository_name` and `ref_name` properties, or both `repository_id` and `ref_name` properties, or both `repository_property` and `ref_name` properties.The push rulesets conditions object does not require the `ref_name` property.For repository policy rulesets, the conditions object should only contain the `repository_name`, the `repository_id`, or the `repository_property`. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public global::GitHub.Models.OrgRulesetConditions? Conditions { get; set; } @@ -31,7 +31,7 @@ public partial class WithRuleset_PutRequestBody : IAdditionalDataHolder, IParsab #else public global::GitHub.Models.OrgRulesetConditions Conditions { get; set; } #endif - /// The enforcement level of the ruleset. `evaluate` allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page. + /// The enforcement level of the ruleset. `evaluate` allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page. `evaluate` is not available for the `repository` target. public global::GitHub.Models.RepositoryRuleEnforcement? Enforcement { get; set; } /// The name of the ruleset. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER diff --git a/src/GitHub/Orgs/Item/Rulesets/Item/WithRuleset_PutRequestBody_target.cs b/src/GitHub/Orgs/Item/Rulesets/Item/WithRuleset_PutRequestBody_target.cs index 82106eb4..7ce123ec 100644 --- a/src/GitHub/Orgs/Item/Rulesets/Item/WithRuleset_PutRequestBody_target.cs +++ b/src/GitHub/Orgs/Item/Rulesets/Item/WithRuleset_PutRequestBody_target.cs @@ -19,5 +19,9 @@ public enum WithRuleset_PutRequestBody_target #pragma warning disable CS1591 Push, #pragma warning restore CS1591 + [EnumMember(Value = "repository")] + #pragma warning disable CS1591 + Repository, + #pragma warning restore CS1591 } } diff --git a/src/GitHub/Orgs/Item/Rulesets/RuleSuites/RuleSuitesRequestBuilder.cs b/src/GitHub/Orgs/Item/Rulesets/RuleSuites/RuleSuitesRequestBuilder.cs index 6ced277f..6c6ce79f 100644 --- a/src/GitHub/Orgs/Item/Rulesets/RuleSuites/RuleSuitesRequestBuilder.cs +++ b/src/GitHub/Orgs/Item/Rulesets/RuleSuites/RuleSuitesRequestBuilder.cs @@ -133,9 +133,16 @@ public partial class RuleSuitesRequestBuilderGetQueryParameters [QueryParameter("ref")] public string Ref { get; set; } #endif - /// The name of the repository to filter on. When specified, only rule evaluations from this repository will be returned. + /// The name of the repository to filter on. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("repository_name")] + public string? RepositoryName { get; set; } +#nullable restore +#else [QueryParameter("repository_name")] - public int? RepositoryName { get; set; } + public string RepositoryName { get; set; } +#endif /// The rule results to filter on. When specified, only suites with this result will be returned. [QueryParameter("rule_suite_result")] public global::GitHub.Orgs.Item.Rulesets.RuleSuites.GetRule_suite_resultQueryParameterType? RuleSuiteResult { get; set; } diff --git a/src/GitHub/Orgs/Item/Rulesets/RulesetsPostRequestBody.cs b/src/GitHub/Orgs/Item/Rulesets/RulesetsPostRequestBody.cs index f3afbaee..6e37c99c 100644 --- a/src/GitHub/Orgs/Item/Rulesets/RulesetsPostRequestBody.cs +++ b/src/GitHub/Orgs/Item/Rulesets/RulesetsPostRequestBody.cs @@ -23,7 +23,7 @@ public partial class RulesetsPostRequestBody : IAdditionalDataHolder, IParsable #else public List BypassActors { get; set; } #endif - /// Conditions for an organization ruleset.The branch and tag rulesets conditions object should contain both `repository_name` and `ref_name` properties, or both `repository_id` and `ref_name` properties, or both `repository_property` and `ref_name` properties.The push rulesets conditions object does not require the `ref_name` property. + /// Conditions for an organization ruleset.The branch and tag rulesets conditions object should contain both `repository_name` and `ref_name` properties, or both `repository_id` and `ref_name` properties, or both `repository_property` and `ref_name` properties.The push rulesets conditions object does not require the `ref_name` property.For repository policy rulesets, the conditions object should only contain the `repository_name`, the `repository_id`, or the `repository_property`. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public global::GitHub.Models.OrgRulesetConditions? Conditions { get; set; } @@ -31,7 +31,7 @@ public partial class RulesetsPostRequestBody : IAdditionalDataHolder, IParsable #else public global::GitHub.Models.OrgRulesetConditions Conditions { get; set; } #endif - /// The enforcement level of the ruleset. `evaluate` allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page. + /// The enforcement level of the ruleset. `evaluate` allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page. `evaluate` is not available for the `repository` target. public global::GitHub.Models.RepositoryRuleEnforcement? Enforcement { get; set; } /// The name of the ruleset. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER diff --git a/src/GitHub/Orgs/Item/Rulesets/RulesetsPostRequestBody_target.cs b/src/GitHub/Orgs/Item/Rulesets/RulesetsPostRequestBody_target.cs index 1e571ca9..fd9d5f44 100644 --- a/src/GitHub/Orgs/Item/Rulesets/RulesetsPostRequestBody_target.cs +++ b/src/GitHub/Orgs/Item/Rulesets/RulesetsPostRequestBody_target.cs @@ -19,5 +19,9 @@ public enum RulesetsPostRequestBody_target #pragma warning disable CS1591 Push, #pragma warning restore CS1591 + [EnumMember(Value = "repository")] + #pragma warning disable CS1591 + Repository, + #pragma warning restore CS1591 } } diff --git a/src/GitHub/Orgs/Item/SecretScanning/Alerts/AlertsRequestBuilder.cs b/src/GitHub/Orgs/Item/SecretScanning/Alerts/AlertsRequestBuilder.cs index d3556714..701c27ce 100644 --- a/src/GitHub/Orgs/Item/SecretScanning/Alerts/AlertsRequestBuilder.cs +++ b/src/GitHub/Orgs/Item/SecretScanning/Alerts/AlertsRequestBuilder.cs @@ -139,7 +139,7 @@ public partial class AlertsRequestBuilderGetQueryParameters [QueryParameter("resolution")] public string Resolution { get; set; } #endif - /// A comma-separated list of secret types to return. By default all secret types are returned.See "[Supported secret scanning patterns](https://docs.github.com/enterprise-cloud@latest//code-security/secret-scanning/introduction/supported-secret-scanning-patterns#supported-secrets)"for a complete list of secret types. + /// A comma-separated list of secret types to return. All default secret patterns are returned. To return experimental patterns, pass the token name(s) in the parameter. See "[Supported secret scanning patterns](https://docs.github.com/enterprise-cloud@latest//enterprise-cloud@latest/code-security/secret-scanning/introduction/supported-secret-scanning-patterns#supported-secrets)" for a complete list of secret types. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable [QueryParameter("secret_type")] diff --git a/src/GitHub/Orgs/Item/SecurityManagers/SecurityManagersRequestBuilder.cs b/src/GitHub/Orgs/Item/SecurityManagers/SecurityManagersRequestBuilder.cs index b7ef1f57..08787675 100644 --- a/src/GitHub/Orgs/Item/SecurityManagers/SecurityManagersRequestBuilder.cs +++ b/src/GitHub/Orgs/Item/SecurityManagers/SecurityManagersRequestBuilder.cs @@ -19,6 +19,7 @@ namespace GitHub.Orgs.Item.SecurityManagers public partial class SecurityManagersRequestBuilder : BaseRequestBuilder { /// The teams property + [Obsolete("")] public global::GitHub.Orgs.Item.SecurityManagers.Teams.TeamsRequestBuilder Teams { get => new global::GitHub.Orgs.Item.SecurityManagers.Teams.TeamsRequestBuilder(PathParameters, RequestAdapter); @@ -40,12 +41,13 @@ public SecurityManagersRequestBuilder(string rawUrl, IRequestAdapter requestAdap { } /// - /// Lists teams that are security managers for an organization. For more information, see "[Managing security managers in your organization](https://docs.github.com/enterprise-cloud@latest//organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)."The authenticated user must be an administrator or security manager for the organization to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `read:org` scope to use this endpoint. + /// > [!WARNING]> **Closing down notice:** This operation is closing down and will be removed starting January 1, 2026. Please use the "[Organization Roles](https://docs.github.com/enterprise-cloud@latest//rest/orgs/organization-roles)" endpoints instead. /// API method documentation /// /// A List<global::GitHub.Models.TeamSimple> /// Cancellation token to use when cancelling requests /// Configuration for the request such as headers, query parameters, and middleware options. + [Obsolete("")] #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public async Task?> GetAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) @@ -60,10 +62,11 @@ public SecurityManagersRequestBuilder(string rawUrl, IRequestAdapter requestAdap return collectionResult?.AsList(); } /// - /// Lists teams that are security managers for an organization. For more information, see "[Managing security managers in your organization](https://docs.github.com/enterprise-cloud@latest//organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)."The authenticated user must be an administrator or security manager for the organization to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `read:org` scope to use this endpoint. + /// > [!WARNING]> **Closing down notice:** This operation is closing down and will be removed starting January 1, 2026. Please use the "[Organization Roles](https://docs.github.com/enterprise-cloud@latest//rest/orgs/organization-roles)" endpoints instead. /// /// A /// Configuration for the request such as headers, query parameters, and middleware options. + [Obsolete("")] #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public RequestInformation ToGetRequestInformation(Action>? requestConfiguration = default) @@ -83,6 +86,7 @@ public RequestInformation ToGetRequestInformation(Action /// A /// The raw URL to use for the request builder. + [Obsolete("")] public global::GitHub.Orgs.Item.SecurityManagers.SecurityManagersRequestBuilder WithUrl(string rawUrl) { return new global::GitHub.Orgs.Item.SecurityManagers.SecurityManagersRequestBuilder(rawUrl, RequestAdapter); diff --git a/src/GitHub/Orgs/Item/SecurityManagers/Teams/Item/WithTeam_slugItemRequestBuilder.cs b/src/GitHub/Orgs/Item/SecurityManagers/Teams/Item/WithTeam_slugItemRequestBuilder.cs index 0a18de71..0e2a6b99 100644 --- a/src/GitHub/Orgs/Item/SecurityManagers/Teams/Item/WithTeam_slugItemRequestBuilder.cs +++ b/src/GitHub/Orgs/Item/SecurityManagers/Teams/Item/WithTeam_slugItemRequestBuilder.cs @@ -33,11 +33,12 @@ public WithTeam_slugItemRequestBuilder(string rawUrl, IRequestAdapter requestAda { } /// - /// Removes the security manager role from a team for an organization. For more information, see "[Managing security managers in your organization](https://docs.github.com/enterprise-cloud@latest//organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization) team from an organization."The authenticated user must be an administrator for the organization to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. + /// > [!WARNING]> **Closing down notice:** This operation is closing down and will be removed starting January 1, 2026. Please use the "[Organization Roles](https://docs.github.com/enterprise-cloud@latest//rest/orgs/organization-roles)" endpoints instead. /// API method documentation /// /// Cancellation token to use when cancelling requests /// Configuration for the request such as headers, query parameters, and middleware options. + [Obsolete("")] #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public async Task DeleteAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) @@ -51,11 +52,12 @@ public async Task DeleteAsync(Action - /// Adds a team as a security manager for an organization. For more information, see "[Managing security for an organization](https://docs.github.com/enterprise-cloud@latest//organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization) for an organization."The authenticated user must be an administrator for the organization to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `write:org` scope to use this endpoint. + /// > [!WARNING]> **Closing down notice:** This operation is closing down and will be removed starting January 1, 2026. Please use the "[Organization Roles](https://docs.github.com/enterprise-cloud@latest//rest/orgs/organization-roles)" endpoints instead. /// API method documentation /// /// Cancellation token to use when cancelling requests /// Configuration for the request such as headers, query parameters, and middleware options. + [Obsolete("")] #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public async Task PutAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) @@ -69,10 +71,11 @@ public async Task PutAsync(Action> await RequestAdapter.SendNoContentAsync(requestInfo, default, cancellationToken).ConfigureAwait(false); } /// - /// Removes the security manager role from a team for an organization. For more information, see "[Managing security managers in your organization](https://docs.github.com/enterprise-cloud@latest//organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization) team from an organization."The authenticated user must be an administrator for the organization to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `admin:org` scope to use this endpoint. + /// > [!WARNING]> **Closing down notice:** This operation is closing down and will be removed starting January 1, 2026. Please use the "[Organization Roles](https://docs.github.com/enterprise-cloud@latest//rest/orgs/organization-roles)" endpoints instead. /// /// A /// Configuration for the request such as headers, query parameters, and middleware options. + [Obsolete("")] #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public RequestInformation ToDeleteRequestInformation(Action>? requestConfiguration = default) @@ -87,10 +90,11 @@ public RequestInformation ToDeleteRequestInformation(Action - /// Adds a team as a security manager for an organization. For more information, see "[Managing security for an organization](https://docs.github.com/enterprise-cloud@latest//organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization) for an organization."The authenticated user must be an administrator for the organization to use this endpoint.OAuth app tokens and personal access tokens (classic) need the `write:org` scope to use this endpoint. + /// > [!WARNING]> **Closing down notice:** This operation is closing down and will be removed starting January 1, 2026. Please use the "[Organization Roles](https://docs.github.com/enterprise-cloud@latest//rest/orgs/organization-roles)" endpoints instead. /// /// A /// Configuration for the request such as headers, query parameters, and middleware options. + [Obsolete("")] #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable public RequestInformation ToPutRequestInformation(Action>? requestConfiguration = default) @@ -109,6 +113,7 @@ public RequestInformation ToPutRequestInformation(Action /// A /// The raw URL to use for the request builder. + [Obsolete("")] public global::GitHub.Orgs.Item.SecurityManagers.Teams.Item.WithTeam_slugItemRequestBuilder WithUrl(string rawUrl) { return new global::GitHub.Orgs.Item.SecurityManagers.Teams.Item.WithTeam_slugItemRequestBuilder(rawUrl, RequestAdapter); diff --git a/src/GitHub/Orgs/Item/SecurityManagers/Teams/TeamsRequestBuilder.cs b/src/GitHub/Orgs/Item/SecurityManagers/Teams/TeamsRequestBuilder.cs index 3077b2f0..23d205ea 100644 --- a/src/GitHub/Orgs/Item/SecurityManagers/Teams/TeamsRequestBuilder.cs +++ b/src/GitHub/Orgs/Item/SecurityManagers/Teams/TeamsRequestBuilder.cs @@ -18,6 +18,7 @@ public partial class TeamsRequestBuilder : BaseRequestBuilder /// Gets an item from the GitHub.orgs.item.securityManagers.teams.item collection /// The slug of the team name. /// A + [Obsolete("")] public global::GitHub.Orgs.Item.SecurityManagers.Teams.Item.WithTeam_slugItemRequestBuilder this[string position] { get diff --git a/src/GitHub/Orgs/Item/WithOrgItemRequestBuilder.cs b/src/GitHub/Orgs/Item/WithOrgItemRequestBuilder.cs index fc07b0fc..65008eb4 100644 --- a/src/GitHub/Orgs/Item/WithOrgItemRequestBuilder.cs +++ b/src/GitHub/Orgs/Item/WithOrgItemRequestBuilder.cs @@ -6,6 +6,7 @@ using GitHub.Orgs.Item.Attestations; using GitHub.Orgs.Item.AuditLog; using GitHub.Orgs.Item.Blocks; +using GitHub.Orgs.Item.BypassRequests; using GitHub.Orgs.Item.CodeScanning; using GitHub.Orgs.Item.CodeSecurity; using GitHub.Orgs.Item.Codespaces; @@ -91,6 +92,11 @@ public partial class WithOrgItemRequestBuilder : BaseRequestBuilder { get => new global::GitHub.Orgs.Item.Blocks.BlocksRequestBuilder(PathParameters, RequestAdapter); } + /// The bypassRequests property + public global::GitHub.Orgs.Item.BypassRequests.BypassRequestsRequestBuilder BypassRequests + { + get => new global::GitHub.Orgs.Item.BypassRequests.BypassRequestsRequestBuilder(PathParameters, RequestAdapter); + } /// The codeScanning property public global::GitHub.Orgs.Item.CodeScanning.CodeScanningRequestBuilder CodeScanning { diff --git a/src/GitHub/Orgs/Item/WithOrgPatchRequestBody.cs b/src/GitHub/Orgs/Item/WithOrgPatchRequestBody.cs index f4e0b01d..9a05e42a 100644 --- a/src/GitHub/Orgs/Item/WithOrgPatchRequestBody.cs +++ b/src/GitHub/Orgs/Item/WithOrgPatchRequestBody.cs @@ -52,6 +52,8 @@ public partial class WithOrgPatchRequestBody : IAdditionalDataHolder, IParsable /// **Endpoint closing down notice.** Please use [code security configurations](https://docs.github.com/enterprise-cloud@latest//rest/code-security/configurations) instead.Whether dependency graph is automatically enabled for new repositories and repositories transferred to this organization.To use this parameter, you must have admin permissions for the repository or be an owner or security manager for the organization that owns the repository. For more information, see "[Managing security managers in your organization](https://docs.github.com/enterprise-cloud@latest//organizations/managing-peoples-access-to-your-organization-with-roles/managing-security-managers-in-your-organization)."You can check which security and analysis features are currently enabled by using a `GET /orgs/{org}` request. [Obsolete("")] public bool? DependencyGraphEnabledForNewRepositories { get; set; } + /// Controls whether or not deploy keys may be added and used for repositories in the organization. + public bool? DeployKeysEnabledForRepositories { get; set; } /// The description of the company. The maximum size is 160 characters. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable @@ -169,6 +171,7 @@ public virtual IDictionary> GetFieldDeserializers() { "dependabot_alerts_enabled_for_new_repositories", n => { DependabotAlertsEnabledForNewRepositories = n.GetBoolValue(); } }, { "dependabot_security_updates_enabled_for_new_repositories", n => { DependabotSecurityUpdatesEnabledForNewRepositories = n.GetBoolValue(); } }, { "dependency_graph_enabled_for_new_repositories", n => { DependencyGraphEnabledForNewRepositories = n.GetBoolValue(); } }, + { "deploy_keys_enabled_for_repositories", n => { DeployKeysEnabledForRepositories = n.GetBoolValue(); } }, { "description", n => { Description = n.GetStringValue(); } }, { "email", n => { Email = n.GetStringValue(); } }, { "has_organization_projects", n => { HasOrganizationProjects = n.GetBoolValue(); } }, @@ -208,6 +211,7 @@ public virtual void Serialize(ISerializationWriter writer) writer.WriteBoolValue("dependabot_alerts_enabled_for_new_repositories", DependabotAlertsEnabledForNewRepositories); writer.WriteBoolValue("dependabot_security_updates_enabled_for_new_repositories", DependabotSecurityUpdatesEnabledForNewRepositories); writer.WriteBoolValue("dependency_graph_enabled_for_new_repositories", DependencyGraphEnabledForNewRepositories); + writer.WriteBoolValue("deploy_keys_enabled_for_repositories", DeployKeysEnabledForRepositories); writer.WriteStringValue("description", Description); writer.WriteStringValue("email", Email); writer.WriteBoolValue("has_organization_projects", HasOrganizationProjects); diff --git a/src/GitHub/Repos/Item/Item/Actions/Runs/RunsRequestBuilder.cs b/src/GitHub/Repos/Item/Item/Actions/Runs/RunsRequestBuilder.cs index 0665f8a3..aa01600a 100644 --- a/src/GitHub/Repos/Item/Item/Actions/Runs/RunsRequestBuilder.cs +++ b/src/GitHub/Repos/Item/Item/Actions/Runs/RunsRequestBuilder.cs @@ -46,7 +46,7 @@ public RunsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base( { } /// - /// Lists all workflow runs for a repository. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://docs.github.com/enterprise-cloud@latest//rest/guides/getting-started-with-the-rest-api#parameters).Anyone with read access to the repository can use this endpoint.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository.This API will return up to 1,000 results for each search when using the following parameters: `actor`, `branch`, `check_suite_id`, `created`, `event`, `head_sha`, `status`. + /// Lists all workflow runs for a repository. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://docs.github.com/enterprise-cloud@latest//rest/guides/getting-started-with-the-rest-api#parameters).Anyone with read access to the repository can use this endpoint.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository.This endpoint will return up to 1,000 results for each search when using the following parameters: `actor`, `branch`, `check_suite_id`, `created`, `event`, `head_sha`, `status`. /// API method documentation /// /// A @@ -65,7 +65,7 @@ public RunsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base( return await RequestAdapter.SendAsync(requestInfo, global::GitHub.Repos.Item.Item.Actions.Runs.RunsGetResponse.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); } /// - /// Lists all workflow runs for a repository. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://docs.github.com/enterprise-cloud@latest//rest/guides/getting-started-with-the-rest-api#parameters).Anyone with read access to the repository can use this endpoint.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository.This API will return up to 1,000 results for each search when using the following parameters: `actor`, `branch`, `check_suite_id`, `created`, `event`, `head_sha`, `status`. + /// Lists all workflow runs for a repository. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://docs.github.com/enterprise-cloud@latest//rest/guides/getting-started-with-the-rest-api#parameters).Anyone with read access to the repository can use this endpoint.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository.This endpoint will return up to 1,000 results for each search when using the following parameters: `actor`, `branch`, `check_suite_id`, `created`, `event`, `head_sha`, `status`. /// /// A /// Configuration for the request such as headers, query parameters, and middleware options. @@ -93,7 +93,7 @@ public RequestInformation ToGetRequestInformation(Action - /// Lists all workflow runs for a repository. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://docs.github.com/enterprise-cloud@latest//rest/guides/getting-started-with-the-rest-api#parameters).Anyone with read access to the repository can use this endpoint.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository.This API will return up to 1,000 results for each search when using the following parameters: `actor`, `branch`, `check_suite_id`, `created`, `event`, `head_sha`, `status`. + /// Lists all workflow runs for a repository. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://docs.github.com/enterprise-cloud@latest//rest/guides/getting-started-with-the-rest-api#parameters).Anyone with read access to the repository can use this endpoint.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository.This endpoint will return up to 1,000 results for each search when using the following parameters: `actor`, `branch`, `check_suite_id`, `created`, `event`, `head_sha`, `status`. /// [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.19.0")] public partial class RunsRequestBuilderGetQueryParameters diff --git a/src/GitHub/Repos/Item/Item/Actions/Workflows/Item/Runs/RunsRequestBuilder.cs b/src/GitHub/Repos/Item/Item/Actions/Workflows/Item/Runs/RunsRequestBuilder.cs index c785121e..def14fd3 100644 --- a/src/GitHub/Repos/Item/Item/Actions/Workflows/Item/Runs/RunsRequestBuilder.cs +++ b/src/GitHub/Repos/Item/Item/Actions/Workflows/Item/Runs/RunsRequestBuilder.cs @@ -33,7 +33,7 @@ public RunsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base( { } /// - /// List all workflow runs for a workflow. You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://docs.github.com/enterprise-cloud@latest//rest/guides/getting-started-with-the-rest-api#parameters).Anyone with read access to the repository can use this endpointOAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository. + /// List all workflow runs for a workflow. You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://docs.github.com/enterprise-cloud@latest//rest/guides/getting-started-with-the-rest-api#parameters).Anyone with read access to the repository can use this endpointOAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository.This endpoint will return up to 1,000 results for each search when using the following parameters: `actor`, `branch`, `check_suite_id`, `created`, `event`, `head_sha`, `status`. /// API method documentation /// /// A @@ -52,7 +52,7 @@ public RunsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base( return await RequestAdapter.SendAsync(requestInfo, global::GitHub.Repos.Item.Item.Actions.Workflows.Item.Runs.RunsGetResponse.CreateFromDiscriminatorValue, default, cancellationToken).ConfigureAwait(false); } /// - /// List all workflow runs for a workflow. You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://docs.github.com/enterprise-cloud@latest//rest/guides/getting-started-with-the-rest-api#parameters).Anyone with read access to the repository can use this endpointOAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository. + /// List all workflow runs for a workflow. You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://docs.github.com/enterprise-cloud@latest//rest/guides/getting-started-with-the-rest-api#parameters).Anyone with read access to the repository can use this endpointOAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository.This endpoint will return up to 1,000 results for each search when using the following parameters: `actor`, `branch`, `check_suite_id`, `created`, `event`, `head_sha`, `status`. /// /// A /// Configuration for the request such as headers, query parameters, and middleware options. @@ -80,7 +80,7 @@ public RequestInformation ToGetRequestInformation(Action - /// List all workflow runs for a workflow. You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://docs.github.com/enterprise-cloud@latest//rest/guides/getting-started-with-the-rest-api#parameters).Anyone with read access to the repository can use this endpointOAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository. + /// List all workflow runs for a workflow. You can replace `workflow_id` with the workflow file name. For example, you could use `main.yaml`. You can use parameters to narrow the list of results. For more information about using parameters, see [Parameters](https://docs.github.com/enterprise-cloud@latest//rest/guides/getting-started-with-the-rest-api#parameters).Anyone with read access to the repository can use this endpointOAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with a private repository.This endpoint will return up to 1,000 results for each search when using the following parameters: `actor`, `branch`, `check_suite_id`, `created`, `event`, `head_sha`, `status`. /// [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.19.0")] public partial class RunsRequestBuilderGetQueryParameters diff --git a/src/GitHub/Repos/Item/Item/Attestations/Item/WithSubject_digestGetResponse_attestations.cs b/src/GitHub/Repos/Item/Item/Attestations/Item/WithSubject_digestGetResponse_attestations.cs index 05667fad..7de761f3 100644 --- a/src/GitHub/Repos/Item/Item/Attestations/Item/WithSubject_digestGetResponse_attestations.cs +++ b/src/GitHub/Repos/Item/Item/Attestations/Item/WithSubject_digestGetResponse_attestations.cs @@ -21,6 +21,14 @@ public partial class WithSubject_digestGetResponse_attestations : IAdditionalDat #nullable restore #else public global::GitHub.Repos.Item.Item.Attestations.Item.WithSubject_digestGetResponse_attestations_bundle Bundle { get; set; } +#endif + /// The bundle_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? BundleUrl { get; set; } +#nullable restore +#else + public string BundleUrl { get; set; } #endif /// The repository_id property public int? RepositoryId { get; set; } @@ -50,6 +58,7 @@ public virtual IDictionary> GetFieldDeserializers() return new Dictionary> { { "bundle", n => { Bundle = n.GetObjectValue(global::GitHub.Repos.Item.Item.Attestations.Item.WithSubject_digestGetResponse_attestations_bundle.CreateFromDiscriminatorValue); } }, + { "bundle_url", n => { BundleUrl = n.GetStringValue(); } }, { "repository_id", n => { RepositoryId = n.GetIntValue(); } }, }; } @@ -61,6 +70,7 @@ public virtual void Serialize(ISerializationWriter writer) { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("bundle", Bundle); + writer.WriteStringValue("bundle_url", BundleUrl); writer.WriteIntValue("repository_id", RepositoryId); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/GitHub/Repos/Item/Item/BypassRequests/BypassRequestsRequestBuilder.cs b/src/GitHub/Repos/Item/Item/BypassRequests/BypassRequestsRequestBuilder.cs new file mode 100644 index 00000000..9e0efd9f --- /dev/null +++ b/src/GitHub/Repos/Item/Item/BypassRequests/BypassRequestsRequestBuilder.cs @@ -0,0 +1,41 @@ +// +#pragma warning disable CS0618 +using GitHub.Repos.Item.Item.BypassRequests.PushRules; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System; +namespace GitHub.Repos.Item.Item.BypassRequests +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\bypass-requests + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.19.0")] + public partial class BypassRequestsRequestBuilder : BaseRequestBuilder + { + /// The pushRules property + public global::GitHub.Repos.Item.Item.BypassRequests.PushRules.PushRulesRequestBuilder PushRules + { + get => new global::GitHub.Repos.Item.Item.BypassRequests.PushRules.PushRulesRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public BypassRequestsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/bypass-requests", 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 BypassRequestsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/bypass-requests", rawUrl) + { + } + } +} +#pragma warning restore CS0618 diff --git a/src/GitHub/Repos/Item/Item/BypassRequests/PushRules/GetRequest_statusQueryParameterType.cs b/src/GitHub/Repos/Item/Item/BypassRequests/PushRules/GetRequest_statusQueryParameterType.cs new file mode 100644 index 00000000..e29b6e35 --- /dev/null +++ b/src/GitHub/Repos/Item/Item/BypassRequests/PushRules/GetRequest_statusQueryParameterType.cs @@ -0,0 +1,36 @@ +// +using System.Runtime.Serialization; +using System; +namespace GitHub.Repos.Item.Item.BypassRequests.PushRules +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.19.0")] + #pragma warning disable CS1591 + public enum GetRequest_statusQueryParameterType + #pragma warning restore CS1591 + { + [EnumMember(Value = "completed")] + #pragma warning disable CS1591 + Completed, + #pragma warning restore CS1591 + [EnumMember(Value = "cancelled")] + #pragma warning disable CS1591 + Cancelled, + #pragma warning restore CS1591 + [EnumMember(Value = "expired")] + #pragma warning disable CS1591 + Expired, + #pragma warning restore CS1591 + [EnumMember(Value = "denied")] + #pragma warning disable CS1591 + Denied, + #pragma warning restore CS1591 + [EnumMember(Value = "open")] + #pragma warning disable CS1591 + Open, + #pragma warning restore CS1591 + [EnumMember(Value = "all")] + #pragma warning disable CS1591 + All, + #pragma warning restore CS1591 + } +} diff --git a/src/GitHub/Repos/Item/Item/BypassRequests/PushRules/GetTime_periodQueryParameterType.cs b/src/GitHub/Repos/Item/Item/BypassRequests/PushRules/GetTime_periodQueryParameterType.cs new file mode 100644 index 00000000..e55c4673 --- /dev/null +++ b/src/GitHub/Repos/Item/Item/BypassRequests/PushRules/GetTime_periodQueryParameterType.cs @@ -0,0 +1,28 @@ +// +using System.Runtime.Serialization; +using System; +namespace GitHub.Repos.Item.Item.BypassRequests.PushRules +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.19.0")] + #pragma warning disable CS1591 + public enum GetTime_periodQueryParameterType + #pragma warning restore CS1591 + { + [EnumMember(Value = "hour")] + #pragma warning disable CS1591 + Hour, + #pragma warning restore CS1591 + [EnumMember(Value = "day")] + #pragma warning disable CS1591 + Day, + #pragma warning restore CS1591 + [EnumMember(Value = "week")] + #pragma warning disable CS1591 + Week, + #pragma warning restore CS1591 + [EnumMember(Value = "month")] + #pragma warning disable CS1591 + Month, + #pragma warning restore CS1591 + } +} diff --git a/src/GitHub/Repos/Item/Item/BypassRequests/PushRules/Item/WithBypass_request_numberItemRequestBuilder.cs b/src/GitHub/Repos/Item/Item/BypassRequests/PushRules/Item/WithBypass_request_numberItemRequestBuilder.cs new file mode 100644 index 00000000..c00711d2 --- /dev/null +++ b/src/GitHub/Repos/Item/Item/BypassRequests/PushRules/Item/WithBypass_request_numberItemRequestBuilder.cs @@ -0,0 +1,92 @@ +// +#pragma warning disable CS0618 +using GitHub.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace GitHub.Repos.Item.Item.BypassRequests.PushRules.Item +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\bypass-requests\push-rules\{bypass_request_number} + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.19.0")] + public partial class WithBypass_request_numberItemRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public WithBypass_request_numberItemRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/bypass-requests/push-rules/{bypass_request_number}", 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 WithBypass_request_numberItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/bypass-requests/push-rules/{bypass_request_number}", rawUrl) + { + } + /// + /// Get information about a request to bypass push protection rules for a repository. + /// 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 + /// When receiving a 500 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", global::GitHub.Models.BasicError.CreateFromDiscriminatorValue }, + { "500", global::GitHub.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::GitHub.Models.PushRuleBypassRequest.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Get information about a request to bypass push protection rules for a repository. + /// + /// 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 global::GitHub.Repos.Item.Item.BypassRequests.PushRules.Item.WithBypass_request_numberItemRequestBuilder WithUrl(string rawUrl) + { + return new global::GitHub.Repos.Item.Item.BypassRequests.PushRules.Item.WithBypass_request_numberItemRequestBuilder(rawUrl, RequestAdapter); + } + } +} +#pragma warning restore CS0618 diff --git a/src/GitHub/Repos/Item/Item/BypassRequests/PushRules/PushRulesRequestBuilder.cs b/src/GitHub/Repos/Item/Item/BypassRequests/PushRules/PushRulesRequestBuilder.cs new file mode 100644 index 00000000..ca9e5744 --- /dev/null +++ b/src/GitHub/Repos/Item/Item/BypassRequests/PushRules/PushRulesRequestBuilder.cs @@ -0,0 +1,145 @@ +// +#pragma warning disable CS0618 +using GitHub.Models; +using GitHub.Repos.Item.Item.BypassRequests.PushRules.Item; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace GitHub.Repos.Item.Item.BypassRequests.PushRules +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\bypass-requests\push-rules + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.19.0")] + public partial class PushRulesRequestBuilder : BaseRequestBuilder + { + /// Gets an item from the GitHub.repos.item.item.bypassRequests.pushRules.item collection + /// The number that identifies the bypass request within the context of the given repository. + /// A + public global::GitHub.Repos.Item.Item.BypassRequests.PushRules.Item.WithBypass_request_numberItemRequestBuilder this[int position] + { + get + { + var urlTplParams = new Dictionary(PathParameters); + urlTplParams.Add("bypass_request_number", position); + return new global::GitHub.Repos.Item.Item.BypassRequests.PushRules.Item.WithBypass_request_numberItemRequestBuilder(urlTplParams, RequestAdapter); + } + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public PushRulesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/bypass-requests/push-rules{?page*,per_page*,request_status*,requester*,reviewer*,time_period*}", 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 PushRulesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/bypass-requests/push-rules{?page*,per_page*,request_status*,requester*,reviewer*,time_period*}", rawUrl) + { + } + /// + /// Lists the requests made by users of a repository to bypass push protection rules + /// API method documentation + /// + /// A List<global::GitHub.Models.PushRuleBypassRequest> + /// 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 + /// When receiving a 500 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", global::GitHub.Models.BasicError.CreateFromDiscriminatorValue }, + { "500", global::GitHub.Models.BasicError.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::GitHub.Models.PushRuleBypassRequest.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// Lists the requests made by users of a repository to bypass push protection rules + /// + /// 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 global::GitHub.Repos.Item.Item.BypassRequests.PushRules.PushRulesRequestBuilder WithUrl(string rawUrl) + { + return new global::GitHub.Repos.Item.Item.BypassRequests.PushRules.PushRulesRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// Lists the requests made by users of a repository to bypass push protection rules + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.19.0")] + public partial class PushRulesRequestBuilderGetQueryParameters + { + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + /// Filter bypass requests by the handle of the GitHub user who requested the bypass. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("requester")] + public string? Requester { get; set; } +#nullable restore +#else + [QueryParameter("requester")] + public string Requester { get; set; } +#endif + /// The status of the bypass request to filter on. When specified, only requests with this status will be returned. + [QueryParameter("request_status")] + public global::GitHub.Repos.Item.Item.BypassRequests.PushRules.GetRequest_statusQueryParameterType? RequestStatus { get; set; } + /// Filter bypass requests by the handle of the GitHub user who reviewed the bypass request. +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + [QueryParameter("reviewer")] + public string? Reviewer { get; set; } +#nullable restore +#else + [QueryParameter("reviewer")] + public string Reviewer { get; set; } +#endif + /// The time period to filter by.For example, `day` will filter for rule suites that occurred in the past 24 hours, and `week` will filter for insights that occurred in the past 7 days (168 hours). + [QueryParameter("time_period")] + public global::GitHub.Repos.Item.Item.BypassRequests.PushRules.GetTime_periodQueryParameterType? TimePeriod { get; set; } + } + } +} +#pragma warning restore CS0618 diff --git a/src/GitHub/Repos/Item/Item/CodeScanning/Alerts/Item/Autofix/AutofixRequestBuilder.cs b/src/GitHub/Repos/Item/Item/CodeScanning/Alerts/Item/Autofix/AutofixRequestBuilder.cs new file mode 100644 index 00000000..6bba0d73 --- /dev/null +++ b/src/GitHub/Repos/Item/Item/CodeScanning/Alerts/Item/Autofix/AutofixRequestBuilder.cs @@ -0,0 +1,151 @@ +// +#pragma warning disable CS0618 +using GitHub.Models; +using GitHub.Repos.Item.Item.CodeScanning.Alerts.Item.Autofix.Commits; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace GitHub.Repos.Item.Item.CodeScanning.Alerts.Item.Autofix +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\code-scanning\alerts\{alert_number}\autofix + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.19.0")] + public partial class AutofixRequestBuilder : BaseRequestBuilder + { + /// The commits property + public global::GitHub.Repos.Item.Item.CodeScanning.Alerts.Item.Autofix.Commits.CommitsRequestBuilder Commits + { + get => new global::GitHub.Repos.Item.Item.CodeScanning.Alerts.Item.Autofix.Commits.CommitsRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public AutofixRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/code-scanning/alerts/{alert_number}/autofix", 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 AutofixRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/code-scanning/alerts/{alert_number}/autofix", rawUrl) + { + } + /// + /// Gets the status and description of an autofix for a code scanning alert.OAuth app tokens and personal access tokens (classic) need the `security_events` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories. + /// 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 400 status code + /// When receiving a 403 status code + /// When receiving a 404 status code + /// When receiving a 503 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> + { + { "400", global::GitHub.Models.BasicError.CreateFromDiscriminatorValue }, + { "403", global::GitHub.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::GitHub.Models.BasicError.CreateFromDiscriminatorValue }, + { "503", global::GitHub.Models.CodeScanningAutofix503Error.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::GitHub.Models.CodeScanningAutofix.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Creates an autofix for a code scanning alert.If a new autofix is to be created as a result of this request or is currently being generated, then this endpoint will return a 202 Accepted response.If an autofix already exists for a given alert, then this endpoint will return a 200 OK response.OAuth app tokens and personal access tokens (classic) need the `security_events` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories. + /// 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 400 status code + /// When receiving a 403 status code + /// When receiving a 404 status code + /// When receiving a 503 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + var requestInfo = ToPostRequestInformation(requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::GitHub.Models.BasicError.CreateFromDiscriminatorValue }, + { "403", global::GitHub.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::GitHub.Models.BasicError.CreateFromDiscriminatorValue }, + { "503", global::GitHub.Models.CodeScanningAutofix503Error.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::GitHub.Models.CodeScanningAutofix.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Gets the status and description of an autofix for a code scanning alert.OAuth app tokens and personal access tokens (classic) need the `security_events` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories. + /// + /// 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; + } + /// + /// Creates an autofix for a code scanning alert.If a new autofix is to be created as a result of this request or is currently being generated, then this endpoint will return a 202 Accepted response.If an autofix already exists for a given alert, then this endpoint will return a 200 OK response.OAuth app tokens and personal access tokens (classic) need the `security_events` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories. + /// + /// 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 ToPostRequestInformation(Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(Action> requestConfiguration = default) + { +#endif + var requestInfo = new RequestInformation(Method.POST, 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 global::GitHub.Repos.Item.Item.CodeScanning.Alerts.Item.Autofix.AutofixRequestBuilder WithUrl(string rawUrl) + { + return new global::GitHub.Repos.Item.Item.CodeScanning.Alerts.Item.Autofix.AutofixRequestBuilder(rawUrl, RequestAdapter); + } + } +} +#pragma warning restore CS0618 diff --git a/src/GitHub/Repos/Item/Item/CodeScanning/Alerts/Item/Autofix/Commits/CommitsRequestBuilder.cs b/src/GitHub/Repos/Item/Item/CodeScanning/Alerts/Item/Autofix/Commits/CommitsRequestBuilder.cs new file mode 100644 index 00000000..7bd7fd7b --- /dev/null +++ b/src/GitHub/Repos/Item/Item/CodeScanning/Alerts/Item/Autofix/Commits/CommitsRequestBuilder.cs @@ -0,0 +1,101 @@ +// +#pragma warning disable CS0618 +using GitHub.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace GitHub.Repos.Item.Item.CodeScanning.Alerts.Item.Autofix.Commits +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\code-scanning\alerts\{alert_number}\autofix\commits + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.19.0")] + public partial class CommitsRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public CommitsRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/code-scanning/alerts/{alert_number}/autofix/commits", 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 CommitsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/code-scanning/alerts/{alert_number}/autofix/commits", rawUrl) + { + } + /// + /// Commits an autofix for a code scanning alert.If an autofix is commited as a result of this request, then this endpoint will return a 201 Created response.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories. + /// API method documentation + /// + /// A + /// Commit an autofix for a code scanning alert + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 403 status code + /// When receiving a 404 status code + /// When receiving a 503 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PostAsync(global::GitHub.Models.CodeScanningAutofixCommits body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(global::GitHub.Models.CodeScanningAutofixCommits body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::GitHub.Models.BasicError.CreateFromDiscriminatorValue }, + { "403", global::GitHub.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::GitHub.Models.BasicError.CreateFromDiscriminatorValue }, + { "503", global::GitHub.Models.CodeScanningAutofixCommitsResponse503Error.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::GitHub.Models.CodeScanningAutofixCommitsResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Commits an autofix for a code scanning alert.If an autofix is commited as a result of this request, then this endpoint will return a 201 Created response.OAuth app tokens and personal access tokens (classic) need the `repo` scope to use this endpoint with private or public repositories, or the `public_repo` scope to use this endpoint with only public repositories. + /// + /// A + /// Commit an autofix for a code scanning alert + /// 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 ToPostRequestInformation(global::GitHub.Models.CodeScanningAutofixCommits body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::GitHub.Models.CodeScanningAutofixCommits body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + 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 global::GitHub.Repos.Item.Item.CodeScanning.Alerts.Item.Autofix.Commits.CommitsRequestBuilder WithUrl(string rawUrl) + { + return new global::GitHub.Repos.Item.Item.CodeScanning.Alerts.Item.Autofix.Commits.CommitsRequestBuilder(rawUrl, RequestAdapter); + } + } +} +#pragma warning restore CS0618 diff --git a/src/GitHub/Repos/Item/Item/CodeScanning/Alerts/Item/WithAlert_numberItemRequestBuilder.cs b/src/GitHub/Repos/Item/Item/CodeScanning/Alerts/Item/WithAlert_numberItemRequestBuilder.cs index 5132cfee..4da00c44 100644 --- a/src/GitHub/Repos/Item/Item/CodeScanning/Alerts/Item/WithAlert_numberItemRequestBuilder.cs +++ b/src/GitHub/Repos/Item/Item/CodeScanning/Alerts/Item/WithAlert_numberItemRequestBuilder.cs @@ -1,6 +1,7 @@ // #pragma warning disable CS0618 using GitHub.Models; +using GitHub.Repos.Item.Item.CodeScanning.Alerts.Item.Autofix; using GitHub.Repos.Item.Item.CodeScanning.Alerts.Item.Instances; using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -18,6 +19,11 @@ namespace GitHub.Repos.Item.Item.CodeScanning.Alerts.Item [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.19.0")] public partial class WithAlert_numberItemRequestBuilder : BaseRequestBuilder { + /// The autofix property + public global::GitHub.Repos.Item.Item.CodeScanning.Alerts.Item.Autofix.AutofixRequestBuilder Autofix + { + get => new global::GitHub.Repos.Item.Item.CodeScanning.Alerts.Item.Autofix.AutofixRequestBuilder(PathParameters, RequestAdapter); + } /// The instances property public global::GitHub.Repos.Item.Item.CodeScanning.Alerts.Item.Instances.InstancesRequestBuilder Instances { diff --git a/src/GitHub/Repos/Item/Item/Commits/CommitsRequestBuilder.cs b/src/GitHub/Repos/Item/Item/Commits/CommitsRequestBuilder.cs index 81eccbd6..be732951 100644 --- a/src/GitHub/Repos/Item/Item/Commits/CommitsRequestBuilder.cs +++ b/src/GitHub/Repos/Item/Item/Commits/CommitsRequestBuilder.cs @@ -47,7 +47,7 @@ public CommitsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba { } /// - /// **Signature verification object**The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object:| Name | Type | Description || ---- | ---- | ----------- || `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. || `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. || `signature` | `string` | The signature that was extracted from the commit. || `payload` | `string` | The value that was signed. |These are the possible values for `reason` in the `verification` object:| Value | Description || ----- | ----------- || `expired_key` | The key that made the signature is expired. || `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. || `gpgverify_error` | There was an error communicating with the signature verification service. || `gpgverify_unavailable` | The signature verification service is currently unavailable. || `unsigned` | The object does not include a signature. || `unknown_signature_type` | A non-PGP signature was found in the commit. || `no_user` | No user was associated with the `committer` email address in the commit. || `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on their account. || `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. || `unknown_key` | The key that made the signature has not been registered with any user's account. || `malformed_signature` | There was an error parsing the signature. || `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. || `valid` | None of the above errors applied, so the signature is considered to be verified. | + /// **Signature verification object**The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object:| Name | Type | Description || ---- | ---- | ----------- || `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. || `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. || `signature` | `string` | The signature that was extracted from the commit. || `payload` | `string` | The value that was signed. || `verified_at` | `string` | The date the signature was verified by GitHub. |These are the possible values for `reason` in the `verification` object:| Value | Description || ----- | ----------- || `expired_key` | The key that made the signature is expired. || `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. || `gpgverify_error` | There was an error communicating with the signature verification service. || `gpgverify_unavailable` | The signature verification service is currently unavailable. || `unsigned` | The object does not include a signature. || `unknown_signature_type` | A non-PGP signature was found in the commit. || `no_user` | No user was associated with the `committer` email address in the commit. || `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on their account. || `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. || `unknown_key` | The key that made the signature has not been registered with any user's account. || `malformed_signature` | There was an error parsing the signature. || `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. || `valid` | None of the above errors applied, so the signature is considered to be verified. | /// API method documentation /// /// A List<global::GitHub.Models.Commit> @@ -78,7 +78,7 @@ public CommitsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba return collectionResult?.AsList(); } /// - /// **Signature verification object**The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object:| Name | Type | Description || ---- | ---- | ----------- || `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. || `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. || `signature` | `string` | The signature that was extracted from the commit. || `payload` | `string` | The value that was signed. |These are the possible values for `reason` in the `verification` object:| Value | Description || ----- | ----------- || `expired_key` | The key that made the signature is expired. || `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. || `gpgverify_error` | There was an error communicating with the signature verification service. || `gpgverify_unavailable` | The signature verification service is currently unavailable. || `unsigned` | The object does not include a signature. || `unknown_signature_type` | A non-PGP signature was found in the commit. || `no_user` | No user was associated with the `committer` email address in the commit. || `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on their account. || `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. || `unknown_key` | The key that made the signature has not been registered with any user's account. || `malformed_signature` | There was an error parsing the signature. || `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. || `valid` | None of the above errors applied, so the signature is considered to be verified. | + /// **Signature verification object**The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object:| Name | Type | Description || ---- | ---- | ----------- || `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. || `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. || `signature` | `string` | The signature that was extracted from the commit. || `payload` | `string` | The value that was signed. || `verified_at` | `string` | The date the signature was verified by GitHub. |These are the possible values for `reason` in the `verification` object:| Value | Description || ----- | ----------- || `expired_key` | The key that made the signature is expired. || `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. || `gpgverify_error` | There was an error communicating with the signature verification service. || `gpgverify_unavailable` | The signature verification service is currently unavailable. || `unsigned` | The object does not include a signature. || `unknown_signature_type` | A non-PGP signature was found in the commit. || `no_user` | No user was associated with the `committer` email address in the commit. || `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on their account. || `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. || `unknown_key` | The key that made the signature has not been registered with any user's account. || `malformed_signature` | There was an error parsing the signature. || `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. || `valid` | None of the above errors applied, so the signature is considered to be verified. | /// /// A /// Configuration for the request such as headers, query parameters, and middleware options. @@ -106,7 +106,7 @@ public RequestInformation ToGetRequestInformation(Action - /// **Signature verification object**The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object:| Name | Type | Description || ---- | ---- | ----------- || `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. || `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. || `signature` | `string` | The signature that was extracted from the commit. || `payload` | `string` | The value that was signed. |These are the possible values for `reason` in the `verification` object:| Value | Description || ----- | ----------- || `expired_key` | The key that made the signature is expired. || `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. || `gpgverify_error` | There was an error communicating with the signature verification service. || `gpgverify_unavailable` | The signature verification service is currently unavailable. || `unsigned` | The object does not include a signature. || `unknown_signature_type` | A non-PGP signature was found in the commit. || `no_user` | No user was associated with the `committer` email address in the commit. || `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on their account. || `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. || `unknown_key` | The key that made the signature has not been registered with any user's account. || `malformed_signature` | There was an error parsing the signature. || `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. || `valid` | None of the above errors applied, so the signature is considered to be verified. | + /// **Signature verification object**The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object:| Name | Type | Description || ---- | ---- | ----------- || `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. || `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. || `signature` | `string` | The signature that was extracted from the commit. || `payload` | `string` | The value that was signed. || `verified_at` | `string` | The date the signature was verified by GitHub. |These are the possible values for `reason` in the `verification` object:| Value | Description || ----- | ----------- || `expired_key` | The key that made the signature is expired. || `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. || `gpgverify_error` | There was an error communicating with the signature verification service. || `gpgverify_unavailable` | The signature verification service is currently unavailable. || `unsigned` | The object does not include a signature. || `unknown_signature_type` | A non-PGP signature was found in the commit. || `no_user` | No user was associated with the `committer` email address in the commit. || `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on their account. || `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. || `unknown_key` | The key that made the signature has not been registered with any user's account. || `malformed_signature` | There was an error parsing the signature. || `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. || `valid` | None of the above errors applied, so the signature is considered to be verified. | /// [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.19.0")] public partial class CommitsRequestBuilderGetQueryParameters diff --git a/src/GitHub/Repos/Item/Item/Commits/Item/Commit_shaItemRequestBuilder.cs b/src/GitHub/Repos/Item/Item/Commits/Item/Commit_shaItemRequestBuilder.cs index 43cbcc6a..f2700db6 100644 --- a/src/GitHub/Repos/Item/Item/Commits/Item/Commit_shaItemRequestBuilder.cs +++ b/src/GitHub/Repos/Item/Item/Commits/Item/Commit_shaItemRequestBuilder.cs @@ -76,7 +76,7 @@ public Commit_shaItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapte { } /// - /// Returns the contents of a single commit reference. You must have `read` access for the repository to use this endpoint.> [!NOTE]> If there are more than 300 files in the commit diff and the default JSON media type is requested, the response will include pagination link headers for the remaining files, up to a limit of 3000 files. Each page contains the static commit information, and the only changes are to the file listing.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)." Pagination query parameters are not supported for these media types.- **`application/vnd.github.diff`**: Returns the diff of the commit. Larger diffs may time out and return a 5xx status code.- **`application/vnd.github.patch`**: Returns the patch of the commit. Diffs with binary data will have no `patch` property. Larger diffs may time out and return a 5xx status code.- **`application/vnd.github.sha`**: Returns the commit's SHA-1 hash. You can use this endpoint to check if a remote reference's SHA-1 hash is the same as your local reference's SHA-1 hash by providing the local SHA-1 reference as the ETag.**Signature verification object**The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object:| Name | Type | Description || ---- | ---- | ----------- || `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. || `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. || `signature` | `string` | The signature that was extracted from the commit. || `payload` | `string` | The value that was signed. |These are the possible values for `reason` in the `verification` object:| Value | Description || ----- | ----------- || `expired_key` | The key that made the signature is expired. || `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. || `gpgverify_error` | There was an error communicating with the signature verification service. || `gpgverify_unavailable` | The signature verification service is currently unavailable. || `unsigned` | The object does not include a signature. || `unknown_signature_type` | A non-PGP signature was found in the commit. || `no_user` | No user was associated with the `committer` email address in the commit. || `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on their account. || `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. || `unknown_key` | The key that made the signature has not been registered with any user's account. || `malformed_signature` | There was an error parsing the signature. || `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. || `valid` | None of the above errors applied, so the signature is considered to be verified. | + /// Returns the contents of a single commit reference. You must have `read` access for the repository to use this endpoint.> [!NOTE]> If there are more than 300 files in the commit diff and the default JSON media type is requested, the response will include pagination link headers for the remaining files, up to a limit of 3000 files. Each page contains the static commit information, and the only changes are to the file listing.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)." Pagination query parameters are not supported for these media types.- **`application/vnd.github.diff`**: Returns the diff of the commit. Larger diffs may time out and return a 5xx status code.- **`application/vnd.github.patch`**: Returns the patch of the commit. Diffs with binary data will have no `patch` property. Larger diffs may time out and return a 5xx status code.- **`application/vnd.github.sha`**: Returns the commit's SHA-1 hash. You can use this endpoint to check if a remote reference's SHA-1 hash is the same as your local reference's SHA-1 hash by providing the local SHA-1 reference as the ETag.**Signature verification object**The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object:| Name | Type | Description || ---- | ---- | ----------- || `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. || `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. || `signature` | `string` | The signature that was extracted from the commit. || `payload` | `string` | The value that was signed. || `verified_at` | `string` | The date the signature was verified by GitHub. |These are the possible values for `reason` in the `verification` object:| Value | Description || ----- | ----------- || `expired_key` | The key that made the signature is expired. || `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. || `gpgverify_error` | There was an error communicating with the signature verification service. || `gpgverify_unavailable` | The signature verification service is currently unavailable. || `unsigned` | The object does not include a signature. || `unknown_signature_type` | A non-PGP signature was found in the commit. || `no_user` | No user was associated with the `committer` email address in the commit. || `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on their account. || `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. || `unknown_key` | The key that made the signature has not been registered with any user's account. || `malformed_signature` | There was an error parsing the signature. || `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. || `valid` | None of the above errors applied, so the signature is considered to be verified. | /// API method documentation /// /// A @@ -108,7 +108,7 @@ public Commit_shaItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapte return await RequestAdapter.SendAsync(requestInfo, global::GitHub.Models.Commit.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } /// - /// Returns the contents of a single commit reference. You must have `read` access for the repository to use this endpoint.> [!NOTE]> If there are more than 300 files in the commit diff and the default JSON media type is requested, the response will include pagination link headers for the remaining files, up to a limit of 3000 files. Each page contains the static commit information, and the only changes are to the file listing.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)." Pagination query parameters are not supported for these media types.- **`application/vnd.github.diff`**: Returns the diff of the commit. Larger diffs may time out and return a 5xx status code.- **`application/vnd.github.patch`**: Returns the patch of the commit. Diffs with binary data will have no `patch` property. Larger diffs may time out and return a 5xx status code.- **`application/vnd.github.sha`**: Returns the commit's SHA-1 hash. You can use this endpoint to check if a remote reference's SHA-1 hash is the same as your local reference's SHA-1 hash by providing the local SHA-1 reference as the ETag.**Signature verification object**The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object:| Name | Type | Description || ---- | ---- | ----------- || `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. || `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. || `signature` | `string` | The signature that was extracted from the commit. || `payload` | `string` | The value that was signed. |These are the possible values for `reason` in the `verification` object:| Value | Description || ----- | ----------- || `expired_key` | The key that made the signature is expired. || `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. || `gpgverify_error` | There was an error communicating with the signature verification service. || `gpgverify_unavailable` | The signature verification service is currently unavailable. || `unsigned` | The object does not include a signature. || `unknown_signature_type` | A non-PGP signature was found in the commit. || `no_user` | No user was associated with the `committer` email address in the commit. || `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on their account. || `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. || `unknown_key` | The key that made the signature has not been registered with any user's account. || `malformed_signature` | There was an error parsing the signature. || `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. || `valid` | None of the above errors applied, so the signature is considered to be verified. | + /// Returns the contents of a single commit reference. You must have `read` access for the repository to use this endpoint.> [!NOTE]> If there are more than 300 files in the commit diff and the default JSON media type is requested, the response will include pagination link headers for the remaining files, up to a limit of 3000 files. Each page contains the static commit information, and the only changes are to the file listing.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)." Pagination query parameters are not supported for these media types.- **`application/vnd.github.diff`**: Returns the diff of the commit. Larger diffs may time out and return a 5xx status code.- **`application/vnd.github.patch`**: Returns the patch of the commit. Diffs with binary data will have no `patch` property. Larger diffs may time out and return a 5xx status code.- **`application/vnd.github.sha`**: Returns the commit's SHA-1 hash. You can use this endpoint to check if a remote reference's SHA-1 hash is the same as your local reference's SHA-1 hash by providing the local SHA-1 reference as the ETag.**Signature verification object**The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object:| Name | Type | Description || ---- | ---- | ----------- || `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. || `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. || `signature` | `string` | The signature that was extracted from the commit. || `payload` | `string` | The value that was signed. || `verified_at` | `string` | The date the signature was verified by GitHub. |These are the possible values for `reason` in the `verification` object:| Value | Description || ----- | ----------- || `expired_key` | The key that made the signature is expired. || `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. || `gpgverify_error` | There was an error communicating with the signature verification service. || `gpgverify_unavailable` | The signature verification service is currently unavailable. || `unsigned` | The object does not include a signature. || `unknown_signature_type` | A non-PGP signature was found in the commit. || `no_user` | No user was associated with the `committer` email address in the commit. || `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on their account. || `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. || `unknown_key` | The key that made the signature has not been registered with any user's account. || `malformed_signature` | There was an error parsing the signature. || `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. || `valid` | None of the above errors applied, so the signature is considered to be verified. | /// /// A /// Configuration for the request such as headers, query parameters, and middleware options. @@ -136,7 +136,7 @@ public RequestInformation ToGetRequestInformation(Action - /// Returns the contents of a single commit reference. You must have `read` access for the repository to use this endpoint.> [!NOTE]> If there are more than 300 files in the commit diff and the default JSON media type is requested, the response will include pagination link headers for the remaining files, up to a limit of 3000 files. Each page contains the static commit information, and the only changes are to the file listing.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)." Pagination query parameters are not supported for these media types.- **`application/vnd.github.diff`**: Returns the diff of the commit. Larger diffs may time out and return a 5xx status code.- **`application/vnd.github.patch`**: Returns the patch of the commit. Diffs with binary data will have no `patch` property. Larger diffs may time out and return a 5xx status code.- **`application/vnd.github.sha`**: Returns the commit's SHA-1 hash. You can use this endpoint to check if a remote reference's SHA-1 hash is the same as your local reference's SHA-1 hash by providing the local SHA-1 reference as the ETag.**Signature verification object**The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object:| Name | Type | Description || ---- | ---- | ----------- || `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. || `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. || `signature` | `string` | The signature that was extracted from the commit. || `payload` | `string` | The value that was signed. |These are the possible values for `reason` in the `verification` object:| Value | Description || ----- | ----------- || `expired_key` | The key that made the signature is expired. || `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. || `gpgverify_error` | There was an error communicating with the signature verification service. || `gpgverify_unavailable` | The signature verification service is currently unavailable. || `unsigned` | The object does not include a signature. || `unknown_signature_type` | A non-PGP signature was found in the commit. || `no_user` | No user was associated with the `committer` email address in the commit. || `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on their account. || `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. || `unknown_key` | The key that made the signature has not been registered with any user's account. || `malformed_signature` | There was an error parsing the signature. || `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. || `valid` | None of the above errors applied, so the signature is considered to be verified. | + /// Returns the contents of a single commit reference. You must have `read` access for the repository to use this endpoint.> [!NOTE]> If there are more than 300 files in the commit diff and the default JSON media type is requested, the response will include pagination link headers for the remaining files, up to a limit of 3000 files. Each page contains the static commit information, and the only changes are to the file listing.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)." Pagination query parameters are not supported for these media types.- **`application/vnd.github.diff`**: Returns the diff of the commit. Larger diffs may time out and return a 5xx status code.- **`application/vnd.github.patch`**: Returns the patch of the commit. Diffs with binary data will have no `patch` property. Larger diffs may time out and return a 5xx status code.- **`application/vnd.github.sha`**: Returns the commit's SHA-1 hash. You can use this endpoint to check if a remote reference's SHA-1 hash is the same as your local reference's SHA-1 hash by providing the local SHA-1 reference as the ETag.**Signature verification object**The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object:| Name | Type | Description || ---- | ---- | ----------- || `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. || `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. || `signature` | `string` | The signature that was extracted from the commit. || `payload` | `string` | The value that was signed. || `verified_at` | `string` | The date the signature was verified by GitHub. |These are the possible values for `reason` in the `verification` object:| Value | Description || ----- | ----------- || `expired_key` | The key that made the signature is expired. || `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. || `gpgverify_error` | There was an error communicating with the signature verification service. || `gpgverify_unavailable` | The signature verification service is currently unavailable. || `unsigned` | The object does not include a signature. || `unknown_signature_type` | A non-PGP signature was found in the commit. || `no_user` | No user was associated with the `committer` email address in the commit. || `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on their account. || `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. || `unknown_key` | The key that made the signature has not been registered with any user's account. || `malformed_signature` | There was an error parsing the signature. || `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. || `valid` | None of the above errors applied, so the signature is considered to be verified. | /// [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.19.0")] public partial class Commit_shaItemRequestBuilderGetQueryParameters diff --git a/src/GitHub/Repos/Item/Item/Compare/Item/WithBaseheadItemRequestBuilder.cs b/src/GitHub/Repos/Item/Item/Compare/Item/WithBaseheadItemRequestBuilder.cs index 61654ba8..79d62789 100644 --- a/src/GitHub/Repos/Item/Item/Compare/Item/WithBaseheadItemRequestBuilder.cs +++ b/src/GitHub/Repos/Item/Item/Compare/Item/WithBaseheadItemRequestBuilder.cs @@ -34,7 +34,7 @@ public WithBaseheadItemRequestBuilder(string rawUrl, IRequestAdapter requestAdap { } /// - /// Compares two commits against one another. You can compare refs (branches or tags) and commit SHAs in the same repository, or you can compare refs and commit SHAs that exist in different repositories within the same repository network, including fork branches. For more information about how to view a repository's network, see "[Understanding connections between repositories](https://docs.github.com/enterprise-cloud@latest//repositories/viewing-activity-and-data-for-your-repository/understanding-connections-between-repositories)."This endpoint is equivalent to running the `git log BASE..HEAD` command, but it returns commits in a different order. The `git log BASE..HEAD` command returns commits in reverse chronological order, whereas the API returns commits in chronological order.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.diff`**: Returns the diff of the commit.- **`application/vnd.github.patch`**: Returns the patch of the commit. Diffs with binary data will have no `patch` property.The API response includes details about the files that were changed between the two commits. This includes the status of the change (if a file was added, removed, modified, or renamed), and details of the change itself. For example, files with a `renamed` status have a `previous_filename` field showing the previous filename of the file, and files with a `modified` status have a `patch` field showing the changes made to the file.When calling this endpoint without any paging parameter (`per_page` or `page`), the returned list is limited to 250 commits, and the last commit in the list is the most recent of the entire comparison.**Working with large comparisons**To process a response with a large number of commits, use a query parameter (`per_page` or `page`) to paginate the results. When using pagination:- The list of changed files is only shown on the first page of results, and it includes up to 300 changed files for the entire comparison.- The results are returned in chronological order, but the last commit in the returned list may not be the most recent one in the entire set if there are more pages of results.For more information on working with pagination, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/guides/using-pagination-in-the-rest-api)."**Signature verification object**The response will include a `verification` object that describes the result of verifying the commit's signature. The `verification` object includes the following fields:| Name | Type | Description || ---- | ---- | ----------- || `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. || `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. || `signature` | `string` | The signature that was extracted from the commit. || `payload` | `string` | The value that was signed. |These are the possible values for `reason` in the `verification` object:| Value | Description || ----- | ----------- || `expired_key` | The key that made the signature is expired. || `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. || `gpgverify_error` | There was an error communicating with the signature verification service. || `gpgverify_unavailable` | The signature verification service is currently unavailable. || `unsigned` | The object does not include a signature. || `unknown_signature_type` | A non-PGP signature was found in the commit. || `no_user` | No user was associated with the `committer` email address in the commit. || `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on their account. || `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. || `unknown_key` | The key that made the signature has not been registered with any user's account. || `malformed_signature` | There was an error parsing the signature. || `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. || `valid` | None of the above errors applied, so the signature is considered to be verified. | + /// Compares two commits against one another. You can compare refs (branches or tags) and commit SHAs in the same repository, or you can compare refs and commit SHAs that exist in different repositories within the same repository network, including fork branches. For more information about how to view a repository's network, see "[Understanding connections between repositories](https://docs.github.com/enterprise-cloud@latest//repositories/viewing-activity-and-data-for-your-repository/understanding-connections-between-repositories)."This endpoint is equivalent to running the `git log BASE..HEAD` command, but it returns commits in a different order. The `git log BASE..HEAD` command returns commits in reverse chronological order, whereas the API returns commits in chronological order.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.diff`**: Returns the diff of the commit.- **`application/vnd.github.patch`**: Returns the patch of the commit. Diffs with binary data will have no `patch` property.The API response includes details about the files that were changed between the two commits. This includes the status of the change (if a file was added, removed, modified, or renamed), and details of the change itself. For example, files with a `renamed` status have a `previous_filename` field showing the previous filename of the file, and files with a `modified` status have a `patch` field showing the changes made to the file.When calling this endpoint without any paging parameter (`per_page` or `page`), the returned list is limited to 250 commits, and the last commit in the list is the most recent of the entire comparison.**Working with large comparisons**To process a response with a large number of commits, use a query parameter (`per_page` or `page`) to paginate the results. When using pagination:- The list of changed files is only shown on the first page of results, and it includes up to 300 changed files for the entire comparison.- The results are returned in chronological order, but the last commit in the returned list may not be the most recent one in the entire set if there are more pages of results.For more information on working with pagination, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/guides/using-pagination-in-the-rest-api)."**Signature verification object**The response will include a `verification` object that describes the result of verifying the commit's signature. The `verification` object includes the following fields:| Name | Type | Description || ---- | ---- | ----------- || `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. || `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. || `signature` | `string` | The signature that was extracted from the commit. || `payload` | `string` | The value that was signed. || `verified_at` | `string` | The date the signature was verified by GitHub. |These are the possible values for `reason` in the `verification` object:| Value | Description || ----- | ----------- || `expired_key` | The key that made the signature is expired. || `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. || `gpgverify_error` | There was an error communicating with the signature verification service. || `gpgverify_unavailable` | The signature verification service is currently unavailable. || `unsigned` | The object does not include a signature. || `unknown_signature_type` | A non-PGP signature was found in the commit. || `no_user` | No user was associated with the `committer` email address in the commit. || `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on their account. || `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. || `unknown_key` | The key that made the signature has not been registered with any user's account. || `malformed_signature` | There was an error parsing the signature. || `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. || `valid` | None of the above errors applied, so the signature is considered to be verified. | /// API method documentation /// /// A @@ -62,7 +62,7 @@ public WithBaseheadItemRequestBuilder(string rawUrl, IRequestAdapter requestAdap return await RequestAdapter.SendAsync(requestInfo, global::GitHub.Models.CommitComparison.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } /// - /// Compares two commits against one another. You can compare refs (branches or tags) and commit SHAs in the same repository, or you can compare refs and commit SHAs that exist in different repositories within the same repository network, including fork branches. For more information about how to view a repository's network, see "[Understanding connections between repositories](https://docs.github.com/enterprise-cloud@latest//repositories/viewing-activity-and-data-for-your-repository/understanding-connections-between-repositories)."This endpoint is equivalent to running the `git log BASE..HEAD` command, but it returns commits in a different order. The `git log BASE..HEAD` command returns commits in reverse chronological order, whereas the API returns commits in chronological order.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.diff`**: Returns the diff of the commit.- **`application/vnd.github.patch`**: Returns the patch of the commit. Diffs with binary data will have no `patch` property.The API response includes details about the files that were changed between the two commits. This includes the status of the change (if a file was added, removed, modified, or renamed), and details of the change itself. For example, files with a `renamed` status have a `previous_filename` field showing the previous filename of the file, and files with a `modified` status have a `patch` field showing the changes made to the file.When calling this endpoint without any paging parameter (`per_page` or `page`), the returned list is limited to 250 commits, and the last commit in the list is the most recent of the entire comparison.**Working with large comparisons**To process a response with a large number of commits, use a query parameter (`per_page` or `page`) to paginate the results. When using pagination:- The list of changed files is only shown on the first page of results, and it includes up to 300 changed files for the entire comparison.- The results are returned in chronological order, but the last commit in the returned list may not be the most recent one in the entire set if there are more pages of results.For more information on working with pagination, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/guides/using-pagination-in-the-rest-api)."**Signature verification object**The response will include a `verification` object that describes the result of verifying the commit's signature. The `verification` object includes the following fields:| Name | Type | Description || ---- | ---- | ----------- || `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. || `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. || `signature` | `string` | The signature that was extracted from the commit. || `payload` | `string` | The value that was signed. |These are the possible values for `reason` in the `verification` object:| Value | Description || ----- | ----------- || `expired_key` | The key that made the signature is expired. || `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. || `gpgverify_error` | There was an error communicating with the signature verification service. || `gpgverify_unavailable` | The signature verification service is currently unavailable. || `unsigned` | The object does not include a signature. || `unknown_signature_type` | A non-PGP signature was found in the commit. || `no_user` | No user was associated with the `committer` email address in the commit. || `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on their account. || `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. || `unknown_key` | The key that made the signature has not been registered with any user's account. || `malformed_signature` | There was an error parsing the signature. || `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. || `valid` | None of the above errors applied, so the signature is considered to be verified. | + /// Compares two commits against one another. You can compare refs (branches or tags) and commit SHAs in the same repository, or you can compare refs and commit SHAs that exist in different repositories within the same repository network, including fork branches. For more information about how to view a repository's network, see "[Understanding connections between repositories](https://docs.github.com/enterprise-cloud@latest//repositories/viewing-activity-and-data-for-your-repository/understanding-connections-between-repositories)."This endpoint is equivalent to running the `git log BASE..HEAD` command, but it returns commits in a different order. The `git log BASE..HEAD` command returns commits in reverse chronological order, whereas the API returns commits in chronological order.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.diff`**: Returns the diff of the commit.- **`application/vnd.github.patch`**: Returns the patch of the commit. Diffs with binary data will have no `patch` property.The API response includes details about the files that were changed between the two commits. This includes the status of the change (if a file was added, removed, modified, or renamed), and details of the change itself. For example, files with a `renamed` status have a `previous_filename` field showing the previous filename of the file, and files with a `modified` status have a `patch` field showing the changes made to the file.When calling this endpoint without any paging parameter (`per_page` or `page`), the returned list is limited to 250 commits, and the last commit in the list is the most recent of the entire comparison.**Working with large comparisons**To process a response with a large number of commits, use a query parameter (`per_page` or `page`) to paginate the results. When using pagination:- The list of changed files is only shown on the first page of results, and it includes up to 300 changed files for the entire comparison.- The results are returned in chronological order, but the last commit in the returned list may not be the most recent one in the entire set if there are more pages of results.For more information on working with pagination, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/guides/using-pagination-in-the-rest-api)."**Signature verification object**The response will include a `verification` object that describes the result of verifying the commit's signature. The `verification` object includes the following fields:| Name | Type | Description || ---- | ---- | ----------- || `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. || `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. || `signature` | `string` | The signature that was extracted from the commit. || `payload` | `string` | The value that was signed. || `verified_at` | `string` | The date the signature was verified by GitHub. |These are the possible values for `reason` in the `verification` object:| Value | Description || ----- | ----------- || `expired_key` | The key that made the signature is expired. || `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. || `gpgverify_error` | There was an error communicating with the signature verification service. || `gpgverify_unavailable` | The signature verification service is currently unavailable. || `unsigned` | The object does not include a signature. || `unknown_signature_type` | A non-PGP signature was found in the commit. || `no_user` | No user was associated with the `committer` email address in the commit. || `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on their account. || `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. || `unknown_key` | The key that made the signature has not been registered with any user's account. || `malformed_signature` | There was an error parsing the signature. || `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. || `valid` | None of the above errors applied, so the signature is considered to be verified. | /// /// A /// Configuration for the request such as headers, query parameters, and middleware options. @@ -90,7 +90,7 @@ public RequestInformation ToGetRequestInformation(Action - /// Compares two commits against one another. You can compare refs (branches or tags) and commit SHAs in the same repository, or you can compare refs and commit SHAs that exist in different repositories within the same repository network, including fork branches. For more information about how to view a repository's network, see "[Understanding connections between repositories](https://docs.github.com/enterprise-cloud@latest//repositories/viewing-activity-and-data-for-your-repository/understanding-connections-between-repositories)."This endpoint is equivalent to running the `git log BASE..HEAD` command, but it returns commits in a different order. The `git log BASE..HEAD` command returns commits in reverse chronological order, whereas the API returns commits in chronological order.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.diff`**: Returns the diff of the commit.- **`application/vnd.github.patch`**: Returns the patch of the commit. Diffs with binary data will have no `patch` property.The API response includes details about the files that were changed between the two commits. This includes the status of the change (if a file was added, removed, modified, or renamed), and details of the change itself. For example, files with a `renamed` status have a `previous_filename` field showing the previous filename of the file, and files with a `modified` status have a `patch` field showing the changes made to the file.When calling this endpoint without any paging parameter (`per_page` or `page`), the returned list is limited to 250 commits, and the last commit in the list is the most recent of the entire comparison.**Working with large comparisons**To process a response with a large number of commits, use a query parameter (`per_page` or `page`) to paginate the results. When using pagination:- The list of changed files is only shown on the first page of results, and it includes up to 300 changed files for the entire comparison.- The results are returned in chronological order, but the last commit in the returned list may not be the most recent one in the entire set if there are more pages of results.For more information on working with pagination, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/guides/using-pagination-in-the-rest-api)."**Signature verification object**The response will include a `verification` object that describes the result of verifying the commit's signature. The `verification` object includes the following fields:| Name | Type | Description || ---- | ---- | ----------- || `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. || `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. || `signature` | `string` | The signature that was extracted from the commit. || `payload` | `string` | The value that was signed. |These are the possible values for `reason` in the `verification` object:| Value | Description || ----- | ----------- || `expired_key` | The key that made the signature is expired. || `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. || `gpgverify_error` | There was an error communicating with the signature verification service. || `gpgverify_unavailable` | The signature verification service is currently unavailable. || `unsigned` | The object does not include a signature. || `unknown_signature_type` | A non-PGP signature was found in the commit. || `no_user` | No user was associated with the `committer` email address in the commit. || `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on their account. || `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. || `unknown_key` | The key that made the signature has not been registered with any user's account. || `malformed_signature` | There was an error parsing the signature. || `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. || `valid` | None of the above errors applied, so the signature is considered to be verified. | + /// Compares two commits against one another. You can compare refs (branches or tags) and commit SHAs in the same repository, or you can compare refs and commit SHAs that exist in different repositories within the same repository network, including fork branches. For more information about how to view a repository's network, see "[Understanding connections between repositories](https://docs.github.com/enterprise-cloud@latest//repositories/viewing-activity-and-data-for-your-repository/understanding-connections-between-repositories)."This endpoint is equivalent to running the `git log BASE..HEAD` command, but it returns commits in a different order. The `git log BASE..HEAD` command returns commits in reverse chronological order, whereas the API returns commits in chronological order.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.diff`**: Returns the diff of the commit.- **`application/vnd.github.patch`**: Returns the patch of the commit. Diffs with binary data will have no `patch` property.The API response includes details about the files that were changed between the two commits. This includes the status of the change (if a file was added, removed, modified, or renamed), and details of the change itself. For example, files with a `renamed` status have a `previous_filename` field showing the previous filename of the file, and files with a `modified` status have a `patch` field showing the changes made to the file.When calling this endpoint without any paging parameter (`per_page` or `page`), the returned list is limited to 250 commits, and the last commit in the list is the most recent of the entire comparison.**Working with large comparisons**To process a response with a large number of commits, use a query parameter (`per_page` or `page`) to paginate the results. When using pagination:- The list of changed files is only shown on the first page of results, and it includes up to 300 changed files for the entire comparison.- The results are returned in chronological order, but the last commit in the returned list may not be the most recent one in the entire set if there are more pages of results.For more information on working with pagination, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/guides/using-pagination-in-the-rest-api)."**Signature verification object**The response will include a `verification` object that describes the result of verifying the commit's signature. The `verification` object includes the following fields:| Name | Type | Description || ---- | ---- | ----------- || `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. || `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. || `signature` | `string` | The signature that was extracted from the commit. || `payload` | `string` | The value that was signed. || `verified_at` | `string` | The date the signature was verified by GitHub. |These are the possible values for `reason` in the `verification` object:| Value | Description || ----- | ----------- || `expired_key` | The key that made the signature is expired. || `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. || `gpgverify_error` | There was an error communicating with the signature verification service. || `gpgverify_unavailable` | The signature verification service is currently unavailable. || `unsigned` | The object does not include a signature. || `unknown_signature_type` | A non-PGP signature was found in the commit. || `no_user` | No user was associated with the `committer` email address in the commit. || `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on their account. || `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. || `unknown_key` | The key that made the signature has not been registered with any user's account. || `malformed_signature` | There was an error parsing the signature. || `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. || `valid` | None of the above errors applied, so the signature is considered to be verified. | /// [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.19.0")] public partial class WithBaseheadItemRequestBuilderGetQueryParameters diff --git a/src/GitHub/Repos/Item/Item/Git/Commits/CommitsRequestBuilder.cs b/src/GitHub/Repos/Item/Item/Git/Commits/CommitsRequestBuilder.cs index 7a4b75df..597ef4e0 100644 --- a/src/GitHub/Repos/Item/Item/Git/Commits/CommitsRequestBuilder.cs +++ b/src/GitHub/Repos/Item/Item/Git/Commits/CommitsRequestBuilder.cs @@ -47,7 +47,7 @@ public CommitsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba { } /// - /// Creates a new Git [commit object](https://git-scm.com/book/en/v2/Git-Internals-Git-Objects).**Signature verification object**The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object:| Name | Type | Description || ---- | ---- | ----------- || `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. || `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in the table below. || `signature` | `string` | The signature that was extracted from the commit. || `payload` | `string` | The value that was signed. |These are the possible values for `reason` in the `verification` object:| Value | Description || ----- | ----------- || `expired_key` | The key that made the signature is expired. || `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. || `gpgverify_error` | There was an error communicating with the signature verification service. || `gpgverify_unavailable` | The signature verification service is currently unavailable. || `unsigned` | The object does not include a signature. || `unknown_signature_type` | A non-PGP signature was found in the commit. || `no_user` | No user was associated with the `committer` email address in the commit. || `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on their account. || `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. || `unknown_key` | The key that made the signature has not been registered with any user's account. || `malformed_signature` | There was an error parsing the signature. || `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. || `valid` | None of the above errors applied, so the signature is considered to be verified. | + /// Creates a new Git [commit object](https://git-scm.com/book/en/v2/Git-Internals-Git-Objects).**Signature verification object**The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object:| Name | Type | Description || ---- | ---- | ----------- || `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. || `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in the table below. || `signature` | `string` | The signature that was extracted from the commit. || `payload` | `string` | The value that was signed. || `verified_at` | `string` | The date the signature was verified by GitHub. |These are the possible values for `reason` in the `verification` object:| Value | Description || ----- | ----------- || `expired_key` | The key that made the signature is expired. || `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. || `gpgverify_error` | There was an error communicating with the signature verification service. || `gpgverify_unavailable` | The signature verification service is currently unavailable. || `unsigned` | The object does not include a signature. || `unknown_signature_type` | A non-PGP signature was found in the commit. || `no_user` | No user was associated with the `committer` email address in the commit. || `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on their account. || `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. || `unknown_key` | The key that made the signature has not been registered with any user's account. || `malformed_signature` | There was an error parsing the signature. || `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. || `valid` | None of the above errors applied, so the signature is considered to be verified. | /// API method documentation /// /// A @@ -77,7 +77,7 @@ public CommitsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : ba return await RequestAdapter.SendAsync(requestInfo, global::GitHub.Models.GitCommit.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } /// - /// Creates a new Git [commit object](https://git-scm.com/book/en/v2/Git-Internals-Git-Objects).**Signature verification object**The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object:| Name | Type | Description || ---- | ---- | ----------- || `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. || `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in the table below. || `signature` | `string` | The signature that was extracted from the commit. || `payload` | `string` | The value that was signed. |These are the possible values for `reason` in the `verification` object:| Value | Description || ----- | ----------- || `expired_key` | The key that made the signature is expired. || `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. || `gpgverify_error` | There was an error communicating with the signature verification service. || `gpgverify_unavailable` | The signature verification service is currently unavailable. || `unsigned` | The object does not include a signature. || `unknown_signature_type` | A non-PGP signature was found in the commit. || `no_user` | No user was associated with the `committer` email address in the commit. || `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on their account. || `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. || `unknown_key` | The key that made the signature has not been registered with any user's account. || `malformed_signature` | There was an error parsing the signature. || `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. || `valid` | None of the above errors applied, so the signature is considered to be verified. | + /// Creates a new Git [commit object](https://git-scm.com/book/en/v2/Git-Internals-Git-Objects).**Signature verification object**The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object:| Name | Type | Description || ---- | ---- | ----------- || `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. || `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in the table below. || `signature` | `string` | The signature that was extracted from the commit. || `payload` | `string` | The value that was signed. || `verified_at` | `string` | The date the signature was verified by GitHub. |These are the possible values for `reason` in the `verification` object:| Value | Description || ----- | ----------- || `expired_key` | The key that made the signature is expired. || `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. || `gpgverify_error` | There was an error communicating with the signature verification service. || `gpgverify_unavailable` | The signature verification service is currently unavailable. || `unsigned` | The object does not include a signature. || `unknown_signature_type` | A non-PGP signature was found in the commit. || `no_user` | No user was associated with the `committer` email address in the commit. || `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on their account. || `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. || `unknown_key` | The key that made the signature has not been registered with any user's account. || `malformed_signature` | There was an error parsing the signature. || `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. || `valid` | None of the above errors applied, so the signature is considered to be verified. | /// /// A /// The request body diff --git a/src/GitHub/Repos/Item/Item/Git/Commits/Item/WithCommit_shaItemRequestBuilder.cs b/src/GitHub/Repos/Item/Item/Git/Commits/Item/WithCommit_shaItemRequestBuilder.cs index 0b2ee0dd..2b6723de 100644 --- a/src/GitHub/Repos/Item/Item/Git/Commits/Item/WithCommit_shaItemRequestBuilder.cs +++ b/src/GitHub/Repos/Item/Item/Git/Commits/Item/WithCommit_shaItemRequestBuilder.cs @@ -34,7 +34,7 @@ public WithCommit_shaItemRequestBuilder(string rawUrl, IRequestAdapter requestAd { } /// - /// Gets a Git [commit object](https://git-scm.com/book/en/v2/Git-Internals-Git-Objects).To get the contents of a commit, see "[Get a commit](/rest/commits/commits#get-a-commit)."**Signature verification object**The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object:| Name | Type | Description || ---- | ---- | ----------- || `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. || `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in the table below. || `signature` | `string` | The signature that was extracted from the commit. || `payload` | `string` | The value that was signed. |These are the possible values for `reason` in the `verification` object:| Value | Description || ----- | ----------- || `expired_key` | The key that made the signature is expired. || `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. || `gpgverify_error` | There was an error communicating with the signature verification service. || `gpgverify_unavailable` | The signature verification service is currently unavailable. || `unsigned` | The object does not include a signature. || `unknown_signature_type` | A non-PGP signature was found in the commit. || `no_user` | No user was associated with the `committer` email address in the commit. || `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on their account. || `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. || `unknown_key` | The key that made the signature has not been registered with any user's account. || `malformed_signature` | There was an error parsing the signature. || `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. || `valid` | None of the above errors applied, so the signature is considered to be verified. | + /// Gets a Git [commit object](https://git-scm.com/book/en/v2/Git-Internals-Git-Objects).To get the contents of a commit, see "[Get a commit](/rest/commits/commits#get-a-commit)."**Signature verification object**The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object:| Name | Type | Description || ---- | ---- | ----------- || `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. || `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in the table below. || `signature` | `string` | The signature that was extracted from the commit. || `payload` | `string` | The value that was signed. || `verified_at` | `string` | The date the signature was verified by GitHub. |These are the possible values for `reason` in the `verification` object:| Value | Description || ----- | ----------- || `expired_key` | The key that made the signature is expired. || `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. || `gpgverify_error` | There was an error communicating with the signature verification service. || `gpgverify_unavailable` | The signature verification service is currently unavailable. || `unsigned` | The object does not include a signature. || `unknown_signature_type` | A non-PGP signature was found in the commit. || `no_user` | No user was associated with the `committer` email address in the commit. || `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on their account. || `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. || `unknown_key` | The key that made the signature has not been registered with any user's account. || `malformed_signature` | There was an error parsing the signature. || `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. || `valid` | None of the above errors applied, so the signature is considered to be verified. | /// API method documentation /// /// A @@ -60,7 +60,7 @@ public WithCommit_shaItemRequestBuilder(string rawUrl, IRequestAdapter requestAd return await RequestAdapter.SendAsync(requestInfo, global::GitHub.Models.GitCommit.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } /// - /// Gets a Git [commit object](https://git-scm.com/book/en/v2/Git-Internals-Git-Objects).To get the contents of a commit, see "[Get a commit](/rest/commits/commits#get-a-commit)."**Signature verification object**The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object:| Name | Type | Description || ---- | ---- | ----------- || `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. || `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in the table below. || `signature` | `string` | The signature that was extracted from the commit. || `payload` | `string` | The value that was signed. |These are the possible values for `reason` in the `verification` object:| Value | Description || ----- | ----------- || `expired_key` | The key that made the signature is expired. || `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. || `gpgverify_error` | There was an error communicating with the signature verification service. || `gpgverify_unavailable` | The signature verification service is currently unavailable. || `unsigned` | The object does not include a signature. || `unknown_signature_type` | A non-PGP signature was found in the commit. || `no_user` | No user was associated with the `committer` email address in the commit. || `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on their account. || `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. || `unknown_key` | The key that made the signature has not been registered with any user's account. || `malformed_signature` | There was an error parsing the signature. || `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. || `valid` | None of the above errors applied, so the signature is considered to be verified. | + /// Gets a Git [commit object](https://git-scm.com/book/en/v2/Git-Internals-Git-Objects).To get the contents of a commit, see "[Get a commit](/rest/commits/commits#get-a-commit)."**Signature verification object**The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object:| Name | Type | Description || ---- | ---- | ----------- || `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. || `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in the table below. || `signature` | `string` | The signature that was extracted from the commit. || `payload` | `string` | The value that was signed. || `verified_at` | `string` | The date the signature was verified by GitHub. |These are the possible values for `reason` in the `verification` object:| Value | Description || ----- | ----------- || `expired_key` | The key that made the signature is expired. || `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. || `gpgverify_error` | There was an error communicating with the signature verification service. || `gpgverify_unavailable` | The signature verification service is currently unavailable. || `unsigned` | The object does not include a signature. || `unknown_signature_type` | A non-PGP signature was found in the commit. || `no_user` | No user was associated with the `committer` email address in the commit. || `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on their account. || `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. || `unknown_key` | The key that made the signature has not been registered with any user's account. || `malformed_signature` | There was an error parsing the signature. || `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. || `valid` | None of the above errors applied, so the signature is considered to be verified. | /// /// A /// Configuration for the request such as headers, query parameters, and middleware options. diff --git a/src/GitHub/Repos/Item/Item/Git/Tags/Item/WithTag_shaItemRequestBuilder.cs b/src/GitHub/Repos/Item/Item/Git/Tags/Item/WithTag_shaItemRequestBuilder.cs index 1866181e..7587289d 100644 --- a/src/GitHub/Repos/Item/Item/Git/Tags/Item/WithTag_shaItemRequestBuilder.cs +++ b/src/GitHub/Repos/Item/Item/Git/Tags/Item/WithTag_shaItemRequestBuilder.cs @@ -34,7 +34,7 @@ public WithTag_shaItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapt { } /// - /// **Signature verification object**The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object:| Name | Type | Description || ---- | ---- | ----------- || `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. || `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. || `signature` | `string` | The signature that was extracted from the commit. || `payload` | `string` | The value that was signed. |These are the possible values for `reason` in the `verification` object:| Value | Description || ----- | ----------- || `expired_key` | The key that made the signature is expired. || `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. || `gpgverify_error` | There was an error communicating with the signature verification service. || `gpgverify_unavailable` | The signature verification service is currently unavailable. || `unsigned` | The object does not include a signature. || `unknown_signature_type` | A non-PGP signature was found in the commit. || `no_user` | No user was associated with the `committer` email address in the commit. || `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on their account. || `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. || `unknown_key` | The key that made the signature has not been registered with any user's account. || `malformed_signature` | There was an error parsing the signature. || `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. || `valid` | None of the above errors applied, so the signature is considered to be verified. | + /// **Signature verification object**The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object:| Name | Type | Description || ---- | ---- | ----------- || `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. || `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. || `signature` | `string` | The signature that was extracted from the commit. || `payload` | `string` | The value that was signed. || `verified_at` | `string` | The date the signature was verified by GitHub. |These are the possible values for `reason` in the `verification` object:| Value | Description || ----- | ----------- || `expired_key` | The key that made the signature is expired. || `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. || `gpgverify_error` | There was an error communicating with the signature verification service. || `gpgverify_unavailable` | The signature verification service is currently unavailable. || `unsigned` | The object does not include a signature. || `unknown_signature_type` | A non-PGP signature was found in the commit. || `no_user` | No user was associated with the `committer` email address in the commit. || `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on their account. || `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. || `unknown_key` | The key that made the signature has not been registered with any user's account. || `malformed_signature` | There was an error parsing the signature. || `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. || `valid` | None of the above errors applied, so the signature is considered to be verified. | /// API method documentation /// /// A @@ -60,7 +60,7 @@ public WithTag_shaItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapt return await RequestAdapter.SendAsync(requestInfo, global::GitHub.Models.GitTag.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } /// - /// **Signature verification object**The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object:| Name | Type | Description || ---- | ---- | ----------- || `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. || `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. || `signature` | `string` | The signature that was extracted from the commit. || `payload` | `string` | The value that was signed. |These are the possible values for `reason` in the `verification` object:| Value | Description || ----- | ----------- || `expired_key` | The key that made the signature is expired. || `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. || `gpgverify_error` | There was an error communicating with the signature verification service. || `gpgverify_unavailable` | The signature verification service is currently unavailable. || `unsigned` | The object does not include a signature. || `unknown_signature_type` | A non-PGP signature was found in the commit. || `no_user` | No user was associated with the `committer` email address in the commit. || `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on their account. || `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. || `unknown_key` | The key that made the signature has not been registered with any user's account. || `malformed_signature` | There was an error parsing the signature. || `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. || `valid` | None of the above errors applied, so the signature is considered to be verified. | + /// **Signature verification object**The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object:| Name | Type | Description || ---- | ---- | ----------- || `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. || `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. || `signature` | `string` | The signature that was extracted from the commit. || `payload` | `string` | The value that was signed. || `verified_at` | `string` | The date the signature was verified by GitHub. |These are the possible values for `reason` in the `verification` object:| Value | Description || ----- | ----------- || `expired_key` | The key that made the signature is expired. || `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. || `gpgverify_error` | There was an error communicating with the signature verification service. || `gpgverify_unavailable` | The signature verification service is currently unavailable. || `unsigned` | The object does not include a signature. || `unknown_signature_type` | A non-PGP signature was found in the commit. || `no_user` | No user was associated with the `committer` email address in the commit. || `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on their account. || `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. || `unknown_key` | The key that made the signature has not been registered with any user's account. || `malformed_signature` | There was an error parsing the signature. || `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. || `valid` | None of the above errors applied, so the signature is considered to be verified. | /// /// A /// Configuration for the request such as headers, query parameters, and middleware options. diff --git a/src/GitHub/Repos/Item/Item/Git/Tags/TagsRequestBuilder.cs b/src/GitHub/Repos/Item/Item/Git/Tags/TagsRequestBuilder.cs index 9c380171..6fadb525 100644 --- a/src/GitHub/Repos/Item/Item/Git/Tags/TagsRequestBuilder.cs +++ b/src/GitHub/Repos/Item/Item/Git/Tags/TagsRequestBuilder.cs @@ -47,7 +47,7 @@ public TagsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base( { } /// - /// Note that creating a tag object does not create the reference that makes a tag in Git. If you want to create an annotated tag in Git, you have to do this call to create the tag object, and then [create](https://docs.github.com/enterprise-cloud@latest//rest/git/refs#create-a-reference) the `refs/tags/[tag]` reference. If you want to create a lightweight tag, you only have to [create](https://docs.github.com/enterprise-cloud@latest//rest/git/refs#create-a-reference) the tag reference - this call would be unnecessary.**Signature verification object**The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object:| Name | Type | Description || ---- | ---- | ----------- || `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. || `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. || `signature` | `string` | The signature that was extracted from the commit. || `payload` | `string` | The value that was signed. |These are the possible values for `reason` in the `verification` object:| Value | Description || ----- | ----------- || `expired_key` | The key that made the signature is expired. || `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. || `gpgverify_error` | There was an error communicating with the signature verification service. || `gpgverify_unavailable` | The signature verification service is currently unavailable. || `unsigned` | The object does not include a signature. || `unknown_signature_type` | A non-PGP signature was found in the commit. || `no_user` | No user was associated with the `committer` email address in the commit. || `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on their account. || `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. || `unknown_key` | The key that made the signature has not been registered with any user's account. || `malformed_signature` | There was an error parsing the signature. || `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. || `valid` | None of the above errors applied, so the signature is considered to be verified. | + /// Note that creating a tag object does not create the reference that makes a tag in Git. If you want to create an annotated tag in Git, you have to do this call to create the tag object, and then [create](https://docs.github.com/enterprise-cloud@latest//rest/git/refs#create-a-reference) the `refs/tags/[tag]` reference. If you want to create a lightweight tag, you only have to [create](https://docs.github.com/enterprise-cloud@latest//rest/git/refs#create-a-reference) the tag reference - this call would be unnecessary.**Signature verification object**The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object:| Name | Type | Description || ---- | ---- | ----------- || `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. || `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. || `signature` | `string` | The signature that was extracted from the commit. || `payload` | `string` | The value that was signed. || `verified_at` | `string` | The date the signature was verified by GitHub. |These are the possible values for `reason` in the `verification` object:| Value | Description || ----- | ----------- || `expired_key` | The key that made the signature is expired. || `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. || `gpgverify_error` | There was an error communicating with the signature verification service. || `gpgverify_unavailable` | The signature verification service is currently unavailable. || `unsigned` | The object does not include a signature. || `unknown_signature_type` | A non-PGP signature was found in the commit. || `no_user` | No user was associated with the `committer` email address in the commit. || `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on their account. || `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. || `unknown_key` | The key that made the signature has not been registered with any user's account. || `malformed_signature` | There was an error parsing the signature. || `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. || `valid` | None of the above errors applied, so the signature is considered to be verified. | /// API method documentation /// /// A @@ -75,7 +75,7 @@ public TagsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base( return await RequestAdapter.SendAsync(requestInfo, global::GitHub.Models.GitTag.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } /// - /// Note that creating a tag object does not create the reference that makes a tag in Git. If you want to create an annotated tag in Git, you have to do this call to create the tag object, and then [create](https://docs.github.com/enterprise-cloud@latest//rest/git/refs#create-a-reference) the `refs/tags/[tag]` reference. If you want to create a lightweight tag, you only have to [create](https://docs.github.com/enterprise-cloud@latest//rest/git/refs#create-a-reference) the tag reference - this call would be unnecessary.**Signature verification object**The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object:| Name | Type | Description || ---- | ---- | ----------- || `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. || `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. || `signature` | `string` | The signature that was extracted from the commit. || `payload` | `string` | The value that was signed. |These are the possible values for `reason` in the `verification` object:| Value | Description || ----- | ----------- || `expired_key` | The key that made the signature is expired. || `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. || `gpgverify_error` | There was an error communicating with the signature verification service. || `gpgverify_unavailable` | The signature verification service is currently unavailable. || `unsigned` | The object does not include a signature. || `unknown_signature_type` | A non-PGP signature was found in the commit. || `no_user` | No user was associated with the `committer` email address in the commit. || `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on their account. || `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. || `unknown_key` | The key that made the signature has not been registered with any user's account. || `malformed_signature` | There was an error parsing the signature. || `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. || `valid` | None of the above errors applied, so the signature is considered to be verified. | + /// Note that creating a tag object does not create the reference that makes a tag in Git. If you want to create an annotated tag in Git, you have to do this call to create the tag object, and then [create](https://docs.github.com/enterprise-cloud@latest//rest/git/refs#create-a-reference) the `refs/tags/[tag]` reference. If you want to create a lightweight tag, you only have to [create](https://docs.github.com/enterprise-cloud@latest//rest/git/refs#create-a-reference) the tag reference - this call would be unnecessary.**Signature verification object**The response will include a `verification` object that describes the result of verifying the commit's signature. The following fields are included in the `verification` object:| Name | Type | Description || ---- | ---- | ----------- || `verified` | `boolean` | Indicates whether GitHub considers the signature in this commit to be verified. || `reason` | `string` | The reason for verified value. Possible values and their meanings are enumerated in table below. || `signature` | `string` | The signature that was extracted from the commit. || `payload` | `string` | The value that was signed. || `verified_at` | `string` | The date the signature was verified by GitHub. |These are the possible values for `reason` in the `verification` object:| Value | Description || ----- | ----------- || `expired_key` | The key that made the signature is expired. || `not_signing_key` | The "signing" flag is not among the usage flags in the GPG key that made the signature. || `gpgverify_error` | There was an error communicating with the signature verification service. || `gpgverify_unavailable` | The signature verification service is currently unavailable. || `unsigned` | The object does not include a signature. || `unknown_signature_type` | A non-PGP signature was found in the commit. || `no_user` | No user was associated with the `committer` email address in the commit. || `unverified_email` | The `committer` email address in the commit was associated with a user, but the email address is not verified on their account. || `bad_email` | The `committer` email address in the commit is not included in the identities of the PGP key that made the signature. || `unknown_key` | The key that made the signature has not been registered with any user's account. || `malformed_signature` | There was an error parsing the signature. || `invalid` | The signature could not be cryptographically verified using the key whose key-id was found in the signature. || `valid` | None of the above errors applied, so the signature is considered to be verified. | /// /// A /// The request body diff --git a/src/GitHub/Repos/Item/Item/Hooks/Item/WithHook_ItemRequestBuilder.cs b/src/GitHub/Repos/Item/Item/Hooks/Item/WithHook_ItemRequestBuilder.cs index 97cdc5c4..1c7c9ad5 100644 --- a/src/GitHub/Repos/Item/Item/Hooks/Item/WithHook_ItemRequestBuilder.cs +++ b/src/GitHub/Repos/Item/Item/Hooks/Item/WithHook_ItemRequestBuilder.cs @@ -58,7 +58,7 @@ public WithHook_ItemRequestBuilder(string rawUrl, IRequestAdapter requestAdapter { } /// - /// Delete a repository webhook + /// Delete a webhook for an organization.The authenticated user must be a repository owner, or have admin access in the repository, to delete the webhook. /// API method documentation /// /// Cancellation token to use when cancelling requests @@ -132,6 +132,9 @@ public async Task DeleteAsync(Action(requestInfo, global::GitHub.Models.Hook.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } + /// + /// Delete a webhook for an organization.The authenticated user must be a repository owner, or have admin access in the repository, to delete the webhook. + /// /// A /// Configuration for the request such as headers, query parameters, and middleware options. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER diff --git a/src/GitHub/Repos/Item/Item/Issues/Item/Sub_issue/Sub_issueDeleteRequestBody.cs b/src/GitHub/Repos/Item/Item/Issues/Item/Sub_issue/Sub_issueDeleteRequestBody.cs new file mode 100644 index 00000000..11f5d2ed --- /dev/null +++ b/src/GitHub/Repos/Item/Item/Issues/Item/Sub_issue/Sub_issueDeleteRequestBody.cs @@ -0,0 +1,59 @@ +// +#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.Repos.Item.Item.Issues.Item.Sub_issue +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.19.0")] + #pragma warning disable CS1591 + public partial class Sub_issueDeleteRequestBody : 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 sub-issue to remove + public int? SubIssueId { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public Sub_issueDeleteRequestBody() + { + 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.Repos.Item.Item.Issues.Item.Sub_issue.Sub_issueDeleteRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::GitHub.Repos.Item.Item.Issues.Item.Sub_issue.Sub_issueDeleteRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "sub_issue_id", n => { SubIssueId = n.GetIntValue(); } }, + }; + } + /// + /// 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.WriteIntValue("sub_issue_id", SubIssueId); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/GitHub/Repos/Item/Item/Issues/Item/Sub_issue/Sub_issueRequestBuilder.cs b/src/GitHub/Repos/Item/Item/Issues/Item/Sub_issue/Sub_issueRequestBuilder.cs new file mode 100644 index 00000000..eba0cf36 --- /dev/null +++ b/src/GitHub/Repos/Item/Item/Issues/Item/Sub_issue/Sub_issueRequestBuilder.cs @@ -0,0 +1,97 @@ +// +#pragma warning disable CS0618 +using GitHub.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace GitHub.Repos.Item.Item.Issues.Item.Sub_issue +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\issues\{issue_number}\sub_issue + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.19.0")] + public partial class Sub_issueRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public Sub_issueRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/issues/{issue_number}/sub_issue", 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 Sub_issueRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/issues/{issue_number}/sub_issue", rawUrl) + { + } + /// + /// You can use the REST API to remove a sub-issue from an issue.Removing content too quickly using this endpoint may result in secondary rate limiting.For more information, see "[Rate limits for the API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/rate-limits-for-the-rest-api#about-secondary-rate-limits)"and "[Best practices for using the REST API](https://docs.github.com/enterprise-cloud@latest//rest/guides/best-practices-for-using-the-rest-api)."This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass a specific media type.- **`application/vnd.github.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.- **`application/vnd.github.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.- **`application/vnd.github.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 400 status code + /// When receiving a 404 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task DeleteAsync(global::GitHub.Repos.Item.Item.Issues.Item.Sub_issue.Sub_issueDeleteRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task DeleteAsync(global::GitHub.Repos.Item.Item.Issues.Item.Sub_issue.Sub_issueDeleteRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToDeleteRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "400", global::GitHub.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::GitHub.Models.BasicError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::GitHub.Models.Issue.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// You can use the REST API to remove a sub-issue from an issue.Removing content too quickly using this endpoint may result in secondary rate limiting.For more information, see "[Rate limits for the API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/rate-limits-for-the-rest-api#about-secondary-rate-limits)"and "[Best practices for using the REST API](https://docs.github.com/enterprise-cloud@latest//rest/guides/best-practices-for-using-the-rest-api)."This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass a specific media type.- **`application/vnd.github.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.- **`application/vnd.github.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.- **`application/vnd.github.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. + /// + /// A + /// The request body + /// 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.Issues.Item.Sub_issue.Sub_issueDeleteRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToDeleteRequestInformation(global::GitHub.Repos.Item.Item.Issues.Item.Sub_issue.Sub_issueDeleteRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.DELETE, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + 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 global::GitHub.Repos.Item.Item.Issues.Item.Sub_issue.Sub_issueRequestBuilder WithUrl(string rawUrl) + { + return new global::GitHub.Repos.Item.Item.Issues.Item.Sub_issue.Sub_issueRequestBuilder(rawUrl, RequestAdapter); + } + } +} +#pragma warning restore CS0618 diff --git a/src/GitHub/Repos/Item/Item/Issues/Item/Sub_issues/Priority/PriorityPatchRequestBody.cs b/src/GitHub/Repos/Item/Item/Issues/Item/Sub_issues/Priority/PriorityPatchRequestBody.cs new file mode 100644 index 00000000..498c053b --- /dev/null +++ b/src/GitHub/Repos/Item/Item/Issues/Item/Sub_issues/Priority/PriorityPatchRequestBody.cs @@ -0,0 +1,67 @@ +// +#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.Repos.Item.Item.Issues.Item.Sub_issues.Priority +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.19.0")] + #pragma warning disable CS1591 + public partial class PriorityPatchRequestBody : 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 id of the sub-issue to be prioritized after (either positional argument after OR before should be specified). + public int? AfterId { get; set; } + /// The id of the sub-issue to be prioritized before (either positional argument after OR before should be specified). + public int? BeforeId { get; set; } + /// The id of the sub-issue to reprioritize + public int? SubIssueId { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public PriorityPatchRequestBody() + { + 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.Repos.Item.Item.Issues.Item.Sub_issues.Priority.PriorityPatchRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::GitHub.Repos.Item.Item.Issues.Item.Sub_issues.Priority.PriorityPatchRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "after_id", n => { AfterId = n.GetIntValue(); } }, + { "before_id", n => { BeforeId = n.GetIntValue(); } }, + { "sub_issue_id", n => { SubIssueId = n.GetIntValue(); } }, + }; + } + /// + /// 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.WriteIntValue("after_id", AfterId); + writer.WriteIntValue("before_id", BeforeId); + writer.WriteIntValue("sub_issue_id", SubIssueId); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/GitHub/Repos/Item/Item/Issues/Item/Sub_issues/Priority/PriorityRequestBuilder.cs b/src/GitHub/Repos/Item/Item/Issues/Item/Sub_issues/Priority/PriorityRequestBuilder.cs new file mode 100644 index 00000000..edcfac80 --- /dev/null +++ b/src/GitHub/Repos/Item/Item/Issues/Item/Sub_issues/Priority/PriorityRequestBuilder.cs @@ -0,0 +1,101 @@ +// +#pragma warning disable CS0618 +using GitHub.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace GitHub.Repos.Item.Item.Issues.Item.Sub_issues.Priority +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\issues\{issue_number}\sub_issues\priority + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.19.0")] + public partial class PriorityRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public PriorityRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/issues/{issue_number}/sub_issues/priority", 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 PriorityRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/issues/{issue_number}/sub_issues/priority", rawUrl) + { + } + /// + /// You can use the REST API to reprioritize a sub-issue to a different position in the parent list. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 403 status code + /// When receiving a 404 status code + /// When receiving a 422 status code + /// When receiving a 503 status code +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public async Task PatchAsync(global::GitHub.Repos.Item.Item.Issues.Item.Sub_issues.Priority.PriorityPatchRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PatchAsync(global::GitHub.Repos.Item.Item.Issues.Item.Sub_issues.Priority.PriorityPatchRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPatchRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "403", global::GitHub.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::GitHub.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::GitHub.Models.ValidationErrorSimple.CreateFromDiscriminatorValue }, + { "503", global::GitHub.Models.Issue503Error.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::GitHub.Models.Issue.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// You can use the REST API to reprioritize a sub-issue to a different position in the parent list. + /// + /// A + /// The request body + /// 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 ToPatchRequestInformation(global::GitHub.Repos.Item.Item.Issues.Item.Sub_issues.Priority.PriorityPatchRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPatchRequestInformation(global::GitHub.Repos.Item.Item.Issues.Item.Sub_issues.Priority.PriorityPatchRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.PATCH, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + 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 global::GitHub.Repos.Item.Item.Issues.Item.Sub_issues.Priority.PriorityRequestBuilder WithUrl(string rawUrl) + { + return new global::GitHub.Repos.Item.Item.Issues.Item.Sub_issues.Priority.PriorityRequestBuilder(rawUrl, RequestAdapter); + } + } +} +#pragma warning restore CS0618 diff --git a/src/GitHub/Repos/Item/Item/Issues/Item/Sub_issues/Sub_issuesPostRequestBody.cs b/src/GitHub/Repos/Item/Item/Issues/Item/Sub_issues/Sub_issuesPostRequestBody.cs new file mode 100644 index 00000000..9bbb19d0 --- /dev/null +++ b/src/GitHub/Repos/Item/Item/Issues/Item/Sub_issues/Sub_issuesPostRequestBody.cs @@ -0,0 +1,63 @@ +// +#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.Repos.Item.Item.Issues.Item.Sub_issues +{ + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.19.0")] + #pragma warning disable CS1591 + public partial class Sub_issuesPostRequestBody : 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; } + /// Option that, when true, instructs the operation to replace the sub-issues current parent issue + public bool? ReplaceParent { get; set; } + /// The sub-issue to add + public int? SubIssueId { get; set; } + /// + /// Instantiates a new and sets the default values. + /// + public Sub_issuesPostRequestBody() + { + 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.Repos.Item.Item.Issues.Item.Sub_issues.Sub_issuesPostRequestBody CreateFromDiscriminatorValue(IParseNode parseNode) + { + _ = parseNode ?? throw new ArgumentNullException(nameof(parseNode)); + return new global::GitHub.Repos.Item.Item.Issues.Item.Sub_issues.Sub_issuesPostRequestBody(); + } + /// + /// The deserialization information for the current model + /// + /// A IDictionary<string, Action<IParseNode>> + public virtual IDictionary> GetFieldDeserializers() + { + return new Dictionary> + { + { "replace_parent", n => { ReplaceParent = n.GetBoolValue(); } }, + { "sub_issue_id", n => { SubIssueId = n.GetIntValue(); } }, + }; + } + /// + /// 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.WriteBoolValue("replace_parent", ReplaceParent); + writer.WriteIntValue("sub_issue_id", SubIssueId); + writer.WriteAdditionalData(AdditionalData); + } + } +} +#pragma warning restore CS0618 diff --git a/src/GitHub/Repos/Item/Item/Issues/Item/Sub_issues/Sub_issuesRequestBuilder.cs b/src/GitHub/Repos/Item/Item/Issues/Item/Sub_issues/Sub_issuesRequestBuilder.cs new file mode 100644 index 00000000..c368b9b1 --- /dev/null +++ b/src/GitHub/Repos/Item/Item/Issues/Item/Sub_issues/Sub_issuesRequestBuilder.cs @@ -0,0 +1,166 @@ +// +#pragma warning disable CS0618 +using GitHub.Models; +using GitHub.Repos.Item.Item.Issues.Item.Sub_issues.Priority; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace GitHub.Repos.Item.Item.Issues.Item.Sub_issues +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\issues\{issue_number}\sub_issues + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.19.0")] + public partial class Sub_issuesRequestBuilder : BaseRequestBuilder + { + /// The priority property + public global::GitHub.Repos.Item.Item.Issues.Item.Sub_issues.Priority.PriorityRequestBuilder Priority + { + get => new global::GitHub.Repos.Item.Item.Issues.Item.Sub_issues.Priority.PriorityRequestBuilder(PathParameters, RequestAdapter); + } + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public Sub_issuesRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/issues/{issue_number}/sub_issues{?page*,per_page*}", 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 Sub_issuesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/issues/{issue_number}/sub_issues{?page*,per_page*}", rawUrl) + { + } + /// + /// You can use the REST API to list the sub-issues on an issue.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.- **`application/vnd.github.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.- **`application/vnd.github.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. + /// API method documentation + /// + /// A List<global::GitHub.Models.Issue> + /// 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 + /// When receiving a 410 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", global::GitHub.Models.BasicError.CreateFromDiscriminatorValue }, + { "410", global::GitHub.Models.BasicError.CreateFromDiscriminatorValue }, + }; + var collectionResult = await RequestAdapter.SendCollectionAsync(requestInfo, global::GitHub.Models.Issue.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + return collectionResult?.AsList(); + } + /// + /// You can use the REST API to add sub-issues to issues.Creating content too quickly using this endpoint may result in secondary rate limiting.For more information, see "[Rate limits for the API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/rate-limits-for-the-rest-api#about-secondary-rate-limits)"and "[Best practices for using the REST API](https://docs.github.com/enterprise-cloud@latest//rest/guides/best-practices-for-using-the-rest-api)."This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.- **`application/vnd.github.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.- **`application/vnd.github.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. + /// API method documentation + /// + /// A + /// The request body + /// Cancellation token to use when cancelling requests + /// Configuration for the request such as headers, query parameters, and middleware options. + /// When receiving a 403 status code + /// When receiving a 404 status code + /// When receiving a 410 status code + /// 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.Issues.Item.Sub_issues.Sub_issuesPostRequestBody body, Action>? requestConfiguration = default, CancellationToken cancellationToken = default) + { +#nullable restore +#else + public async Task PostAsync(global::GitHub.Repos.Item.Item.Issues.Item.Sub_issues.Sub_issuesPostRequestBody body, Action> requestConfiguration = default, CancellationToken cancellationToken = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = ToPostRequestInformation(body, requestConfiguration); + var errorMapping = new Dictionary> + { + { "403", global::GitHub.Models.BasicError.CreateFromDiscriminatorValue }, + { "404", global::GitHub.Models.BasicError.CreateFromDiscriminatorValue }, + { "410", global::GitHub.Models.BasicError.CreateFromDiscriminatorValue }, + { "422", global::GitHub.Models.ValidationError.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::GitHub.Models.Issue.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// You can use the REST API to list the sub-issues on an issue.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.- **`application/vnd.github.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.- **`application/vnd.github.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. + /// + /// 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; + } + /// + /// You can use the REST API to add sub-issues to issues.Creating content too quickly using this endpoint may result in secondary rate limiting.For more information, see "[Rate limits for the API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/rate-limits-for-the-rest-api#about-secondary-rate-limits)"and "[Best practices for using the REST API](https://docs.github.com/enterprise-cloud@latest//rest/guides/best-practices-for-using-the-rest-api)."This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.- **`application/vnd.github.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.- **`application/vnd.github.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. + /// + /// A + /// The request body + /// 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 ToPostRequestInformation(global::GitHub.Repos.Item.Item.Issues.Item.Sub_issues.Sub_issuesPostRequestBody body, Action>? requestConfiguration = default) + { +#nullable restore +#else + public RequestInformation ToPostRequestInformation(global::GitHub.Repos.Item.Item.Issues.Item.Sub_issues.Sub_issuesPostRequestBody body, Action> requestConfiguration = default) + { +#endif + _ = body ?? throw new ArgumentNullException(nameof(body)); + var requestInfo = new RequestInformation(Method.POST, UrlTemplate, PathParameters); + requestInfo.Configure(requestConfiguration); + requestInfo.Headers.TryAdd("Accept", "application/json"); + requestInfo.SetContentFromParsable(RequestAdapter, "application/json", body); + 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 global::GitHub.Repos.Item.Item.Issues.Item.Sub_issues.Sub_issuesRequestBuilder WithUrl(string rawUrl) + { + return new global::GitHub.Repos.Item.Item.Issues.Item.Sub_issues.Sub_issuesRequestBuilder(rawUrl, RequestAdapter); + } + /// + /// You can use the REST API to list the sub-issues on an issue.This endpoint supports the following custom media types. For more information, see "[Media types](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/getting-started-with-the-rest-api#media-types)."- **`application/vnd.github.raw+json`**: Returns the raw markdown body. Response will include `body`. This is the default if you do not pass any specific media type.- **`application/vnd.github.text+json`**: Returns a text only representation of the markdown body. Response will include `body_text`.- **`application/vnd.github.html+json`**: Returns HTML rendered from the body's markdown. Response will include `body_html`.- **`application/vnd.github.full+json`**: Returns raw, text, and HTML representations. Response will include `body`, `body_text`, and `body_html`. + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.19.0")] + public partial class Sub_issuesRequestBuilderGetQueryParameters + { + /// The page number of the results to fetch. For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("page")] + public int? Page { get; set; } + /// The number of results per page (max 100). For more information, see "[Using pagination in the REST API](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/using-pagination-in-the-rest-api)." + [QueryParameter("per_page")] + public int? PerPage { get; set; } + } + } +} +#pragma warning restore CS0618 diff --git a/src/GitHub/Repos/Item/Item/Issues/Item/WithIssue_numberItemRequestBuilder.cs b/src/GitHub/Repos/Item/Item/Issues/Item/WithIssue_numberItemRequestBuilder.cs index 695bb81f..02a4cad6 100644 --- a/src/GitHub/Repos/Item/Item/Issues/Item/WithIssue_numberItemRequestBuilder.cs +++ b/src/GitHub/Repos/Item/Item/Issues/Item/WithIssue_numberItemRequestBuilder.cs @@ -7,6 +7,8 @@ using GitHub.Repos.Item.Item.Issues.Item.Labels; using GitHub.Repos.Item.Item.Issues.Item.Lock; using GitHub.Repos.Item.Item.Issues.Item.Reactions; +using GitHub.Repos.Item.Item.Issues.Item.Sub_issue; +using GitHub.Repos.Item.Item.Issues.Item.Sub_issues; using GitHub.Repos.Item.Item.Issues.Item.Timeline; using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions.Serialization; @@ -54,6 +56,16 @@ public partial class WithIssue_numberItemRequestBuilder : BaseRequestBuilder { get => new global::GitHub.Repos.Item.Item.Issues.Item.Reactions.ReactionsRequestBuilder(PathParameters, RequestAdapter); } + /// The sub_issue property + public global::GitHub.Repos.Item.Item.Issues.Item.Sub_issue.Sub_issueRequestBuilder Sub_issue + { + get => new global::GitHub.Repos.Item.Item.Issues.Item.Sub_issue.Sub_issueRequestBuilder(PathParameters, RequestAdapter); + } + /// The sub_issues property + public global::GitHub.Repos.Item.Item.Issues.Item.Sub_issues.Sub_issuesRequestBuilder Sub_issues + { + get => new global::GitHub.Repos.Item.Item.Issues.Item.Sub_issues.Sub_issuesRequestBuilder(PathParameters, RequestAdapter); + } /// The timeline property public global::GitHub.Repos.Item.Item.Issues.Item.Timeline.TimelineRequestBuilder Timeline { diff --git a/src/GitHub/Repos/Item/Item/Releases/Assets/Item/WithAsset_ItemRequestBuilder.cs b/src/GitHub/Repos/Item/Item/Releases/Assets/Item/WithAsset_ItemRequestBuilder.cs index 1d47ef7d..dd2983a3 100644 --- a/src/GitHub/Repos/Item/Item/Releases/Assets/Item/WithAsset_ItemRequestBuilder.cs +++ b/src/GitHub/Repos/Item/Item/Releases/Assets/Item/WithAsset_ItemRequestBuilder.cs @@ -52,7 +52,7 @@ public async Task DeleteAsync(Action - /// To download the asset's binary content, set the `Accept` header of the request to [`application/octet-stream`](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/getting-started-with-the-rest-api#media-types). The API will either redirect the client to the location, or stream it directly if possible. API clients should handle both a `200` or `302` response. + /// To download the asset's binary content:- If within a browser, fetch the location specified in the `browser_download_url` key provided in the response.- Alternatively, set the `Accept` header of the request to [`application/octet-stream`](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/getting-started-with-the-rest-api#media-types). The API will either redirect the client to the location, or stream it directly if possible. API clients should handle both a `200` or `302` response. /// API method documentation /// /// A @@ -112,7 +112,7 @@ public RequestInformation ToDeleteRequestInformation(Action - /// To download the asset's binary content, set the `Accept` header of the request to [`application/octet-stream`](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/getting-started-with-the-rest-api#media-types). The API will either redirect the client to the location, or stream it directly if possible. API clients should handle both a `200` or `302` response. + /// To download the asset's binary content:- If within a browser, fetch the location specified in the `browser_download_url` key provided in the response.- Alternatively, set the `Accept` header of the request to [`application/octet-stream`](https://docs.github.com/enterprise-cloud@latest//rest/using-the-rest-api/getting-started-with-the-rest-api#media-types). The API will either redirect the client to the location, or stream it directly if possible. API clients should handle both a `200` or `302` response. /// /// A /// Configuration for the request such as headers, query parameters, and middleware options. diff --git a/src/GitHub/Repos/Item/Item/RepoItemRequestBuilder.cs b/src/GitHub/Repos/Item/Item/RepoItemRequestBuilder.cs index f5be3865..d581b986 100644 --- a/src/GitHub/Repos/Item/Item/RepoItemRequestBuilder.cs +++ b/src/GitHub/Repos/Item/Item/RepoItemRequestBuilder.cs @@ -8,6 +8,7 @@ using GitHub.Repos.Item.Item.Autolinks; using GitHub.Repos.Item.Item.AutomatedSecurityFixes; using GitHub.Repos.Item.Item.Branches; +using GitHub.Repos.Item.Item.BypassRequests; using GitHub.Repos.Item.Item.CheckRuns; using GitHub.Repos.Item.Item.CheckSuites; using GitHub.Repos.Item.Item.CodeScanning; @@ -120,6 +121,11 @@ public partial class RepoItemRequestBuilder : BaseRequestBuilder { get => new global::GitHub.Repos.Item.Item.Branches.BranchesRequestBuilder(PathParameters, RequestAdapter); } + /// The bypassRequests property + public global::GitHub.Repos.Item.Item.BypassRequests.BypassRequestsRequestBuilder BypassRequests + { + get => new global::GitHub.Repos.Item.Item.BypassRequests.BypassRequestsRequestBuilder(PathParameters, RequestAdapter); + } /// The checkRuns property public global::GitHub.Repos.Item.Item.CheckRuns.CheckRunsRequestBuilder CheckRuns { diff --git a/src/GitHub/Repos/Item/Item/Rulesets/Item/WithRuleset_PutRequestBody.cs b/src/GitHub/Repos/Item/Item/Rulesets/Item/WithRuleset_PutRequestBody.cs index 4b17d85b..9a6f39fd 100644 --- a/src/GitHub/Repos/Item/Item/Rulesets/Item/WithRuleset_PutRequestBody.cs +++ b/src/GitHub/Repos/Item/Item/Rulesets/Item/WithRuleset_PutRequestBody.cs @@ -31,7 +31,7 @@ public partial class WithRuleset_PutRequestBody : IAdditionalDataHolder, IParsab #else public global::GitHub.Models.RepositoryRulesetConditions Conditions { get; set; } #endif - /// The enforcement level of the ruleset. `evaluate` allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page. + /// The enforcement level of the ruleset. `evaluate` allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page. `evaluate` is not available for the `repository` target. public global::GitHub.Models.RepositoryRuleEnforcement? Enforcement { get; set; } /// The name of the ruleset. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER diff --git a/src/GitHub/Repos/Item/Item/Rulesets/RulesetsPostRequestBody.cs b/src/GitHub/Repos/Item/Item/Rulesets/RulesetsPostRequestBody.cs index c7b64276..04f513fb 100644 --- a/src/GitHub/Repos/Item/Item/Rulesets/RulesetsPostRequestBody.cs +++ b/src/GitHub/Repos/Item/Item/Rulesets/RulesetsPostRequestBody.cs @@ -31,7 +31,7 @@ public partial class RulesetsPostRequestBody : IAdditionalDataHolder, IParsable #else public global::GitHub.Models.RepositoryRulesetConditions Conditions { get; set; } #endif - /// The enforcement level of the ruleset. `evaluate` allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page. + /// The enforcement level of the ruleset. `evaluate` allows admins to test rules before enforcing them. Admins can view insights on the Rule Insights page. `evaluate` is not available for the `repository` target. public global::GitHub.Models.RepositoryRuleEnforcement? Enforcement { get; set; } /// The name of the ruleset. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER diff --git a/src/GitHub/Repos/Item/Item/SecretScanning/Alerts/AlertsRequestBuilder.cs b/src/GitHub/Repos/Item/Item/SecretScanning/Alerts/AlertsRequestBuilder.cs index cbc8fc64..153d725b 100644 --- a/src/GitHub/Repos/Item/Item/SecretScanning/Alerts/AlertsRequestBuilder.cs +++ b/src/GitHub/Repos/Item/Item/SecretScanning/Alerts/AlertsRequestBuilder.cs @@ -150,7 +150,7 @@ public partial class AlertsRequestBuilderGetQueryParameters [QueryParameter("resolution")] public string Resolution { get; set; } #endif - /// A comma-separated list of secret types to return. By default all secret types are returned.See "[Supported secret scanning patterns](https://docs.github.com/enterprise-cloud@latest//code-security/secret-scanning/introduction/supported-secret-scanning-patterns#supported-secrets)"for a complete list of secret types. + /// A comma-separated list of secret types to return. All default secret patterns are returned. To return experimental patterns, pass the token name(s) in the parameter. See "[Supported secret scanning patterns](https://docs.github.com/enterprise-cloud@latest//enterprise-cloud@latest/code-security/secret-scanning/introduction/supported-secret-scanning-patterns#supported-secrets)" for a complete list of secret types. #if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER #nullable enable [QueryParameter("secret_type")] diff --git a/src/GitHub/Repos/Item/Item/SecretScanning/ScanHistory/ScanHistoryRequestBuilder.cs b/src/GitHub/Repos/Item/Item/SecretScanning/ScanHistory/ScanHistoryRequestBuilder.cs new file mode 100644 index 00000000..23e0a29f --- /dev/null +++ b/src/GitHub/Repos/Item/Item/SecretScanning/ScanHistory/ScanHistoryRequestBuilder.cs @@ -0,0 +1,90 @@ +// +#pragma warning disable CS0618 +using GitHub.Models; +using Microsoft.Kiota.Abstractions.Extensions; +using Microsoft.Kiota.Abstractions.Serialization; +using Microsoft.Kiota.Abstractions; +using System.Collections.Generic; +using System.IO; +using System.Threading.Tasks; +using System.Threading; +using System; +namespace GitHub.Repos.Item.Item.SecretScanning.ScanHistory +{ + /// + /// Builds and executes requests for operations under \repos\{owner-id}\{repo-id}\secret-scanning\scan-history + /// + [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.19.0")] + public partial class ScanHistoryRequestBuilder : BaseRequestBuilder + { + /// + /// Instantiates a new and sets the default values. + /// + /// Path parameters for the request + /// The request adapter to use to execute the requests. + public ScanHistoryRequestBuilder(Dictionary pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/secret-scanning/scan-history", 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 ScanHistoryRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/repos/{owner%2Did}/{repo%2Did}/secret-scanning/scan-history", rawUrl) + { + } + /// + /// Lists the latest incremental and backfill scans by type for a repository.OAuth app tokens and personal access tokens (classic) need the `repo` or `security_events` scope to use this endpoint. If this endpoint is only used with public repositories, the token can use the `public_repo` scope instead. + /// 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 503 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> + { + { "503", global::GitHub.Models.SecretScanningScanHistory503Error.CreateFromDiscriminatorValue }, + }; + return await RequestAdapter.SendAsync(requestInfo, global::GitHub.Models.SecretScanningScanHistory.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); + } + /// + /// Lists the latest incremental and backfill scans by type for a repository.OAuth app tokens and personal access tokens (classic) need the `repo` or `security_events` scope to use this endpoint. If this endpoint is only used with public repositories, the token can use the `public_repo` scope instead. + /// + /// 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 global::GitHub.Repos.Item.Item.SecretScanning.ScanHistory.ScanHistoryRequestBuilder WithUrl(string rawUrl) + { + return new global::GitHub.Repos.Item.Item.SecretScanning.ScanHistory.ScanHistoryRequestBuilder(rawUrl, RequestAdapter); + } + } +} +#pragma warning restore CS0618 diff --git a/src/GitHub/Repos/Item/Item/SecretScanning/SecretScanningRequestBuilder.cs b/src/GitHub/Repos/Item/Item/SecretScanning/SecretScanningRequestBuilder.cs index b1a5e6ce..f2f05b52 100644 --- a/src/GitHub/Repos/Item/Item/SecretScanning/SecretScanningRequestBuilder.cs +++ b/src/GitHub/Repos/Item/Item/SecretScanning/SecretScanningRequestBuilder.cs @@ -2,6 +2,7 @@ #pragma warning disable CS0618 using GitHub.Repos.Item.Item.SecretScanning.Alerts; using GitHub.Repos.Item.Item.SecretScanning.PushProtectionBypasses; +using GitHub.Repos.Item.Item.SecretScanning.ScanHistory; using Microsoft.Kiota.Abstractions.Extensions; using Microsoft.Kiota.Abstractions; using System.Collections.Generic; @@ -26,6 +27,11 @@ public partial class SecretScanningRequestBuilder : BaseRequestBuilder { get => new global::GitHub.Repos.Item.Item.SecretScanning.PushProtectionBypasses.PushProtectionBypassesRequestBuilder(PathParameters, RequestAdapter); } + /// The scanHistory property + public global::GitHub.Repos.Item.Item.SecretScanning.ScanHistory.ScanHistoryRequestBuilder ScanHistory + { + get => new global::GitHub.Repos.Item.Item.SecretScanning.ScanHistory.ScanHistoryRequestBuilder(PathParameters, RequestAdapter); + } /// /// Instantiates a new and sets the default values. /// diff --git a/src/GitHub/Scim/V2/Enterprises/Item/Groups/GroupsRequestBuilder.cs b/src/GitHub/Scim/V2/Enterprises/Item/Groups/GroupsRequestBuilder.cs index 0c908523..6c0ff6d7 100644 --- a/src/GitHub/Scim/V2/Enterprises/Item/Groups/GroupsRequestBuilder.cs +++ b/src/GitHub/Scim/V2/Enterprises/Item/Groups/GroupsRequestBuilder.cs @@ -47,7 +47,7 @@ public GroupsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas { } /// - /// > [!NOTE]> SCIM provisioning for users and groups using the REST API is in public preview and subject to change.Lists provisioned SCIM groups in an enterprise.You can improve query search time by using the `excludedAttributes` query parameter with a value of `members` to exclude members from the response. + /// Lists provisioned SCIM groups in an enterprise.You can improve query search time by using the `excludedAttributes` query parameter with a value of `members` to exclude members from the response. /// API method documentation /// /// A @@ -75,7 +75,7 @@ public GroupsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas return await RequestAdapter.SendAsync(requestInfo, global::GitHub.Models.ScimEnterpriseGroupList.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } /// - /// > [!NOTE]> SCIM provisioning for users and groups using the REST API is in public preview and subject to change.Creates a SCIM group for an enterprise.When members are part of the group provisioning payload, they're designated as external group members. Providers are responsible for maintaining a mapping between the `externalId` and `id` for each user. + /// Creates a SCIM group for an enterprise.When members are part of the group provisioning payload, they're designated as external group members. Providers are responsible for maintaining a mapping between the `externalId` and `id` for each user. /// API method documentation /// /// A @@ -105,7 +105,7 @@ public GroupsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : bas return await RequestAdapter.SendAsync(requestInfo, global::GitHub.Models.ScimEnterpriseGroupResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } /// - /// > [!NOTE]> SCIM provisioning for users and groups using the REST API is in public preview and subject to change.Lists provisioned SCIM groups in an enterprise.You can improve query search time by using the `excludedAttributes` query parameter with a value of `members` to exclude members from the response. + /// Lists provisioned SCIM groups in an enterprise.You can improve query search time by using the `excludedAttributes` query parameter with a value of `members` to exclude members from the response. /// /// A /// Configuration for the request such as headers, query parameters, and middleware options. @@ -124,7 +124,7 @@ public RequestInformation ToGetRequestInformation(Action - /// > [!NOTE]> SCIM provisioning for users and groups using the REST API is in public preview and subject to change.Creates a SCIM group for an enterprise.When members are part of the group provisioning payload, they're designated as external group members. Providers are responsible for maintaining a mapping between the `externalId` and `id` for each user. + /// Creates a SCIM group for an enterprise.When members are part of the group provisioning payload, they're designated as external group members. Providers are responsible for maintaining a mapping between the `externalId` and `id` for each user. /// /// A /// The request body @@ -155,7 +155,7 @@ public RequestInformation ToPostRequestInformation(global::GitHub.Models.Group b return new global::GitHub.Scim.V2.Enterprises.Item.Groups.GroupsRequestBuilder(rawUrl, RequestAdapter); } /// - /// > [!NOTE]> SCIM provisioning for users and groups using the REST API is in public preview and subject to change.Lists provisioned SCIM groups in an enterprise.You can improve query search time by using the `excludedAttributes` query parameter with a value of `members` to exclude members from the response. + /// Lists provisioned SCIM groups in an enterprise.You can improve query search time by using the `excludedAttributes` query parameter with a value of `members` to exclude members from the response. /// [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.19.0")] public partial class GroupsRequestBuilderGetQueryParameters diff --git a/src/GitHub/Scim/V2/Enterprises/Item/Groups/Item/WithScim_group_ItemRequestBuilder.cs b/src/GitHub/Scim/V2/Enterprises/Item/Groups/Item/WithScim_group_ItemRequestBuilder.cs index ce119c3e..296ed44a 100644 --- a/src/GitHub/Scim/V2/Enterprises/Item/Groups/Item/WithScim_group_ItemRequestBuilder.cs +++ b/src/GitHub/Scim/V2/Enterprises/Item/Groups/Item/WithScim_group_ItemRequestBuilder.cs @@ -34,7 +34,7 @@ public WithScim_group_ItemRequestBuilder(string rawUrl, IRequestAdapter requestA { } /// - /// > [!NOTE]> SCIM provisioning using the REST API is in public preview and subject to change.Deletes a SCIM group from an enterprise. + /// Deletes a SCIM group from an enterprise. /// API method documentation /// /// Cancellation token to use when cancelling requests @@ -63,7 +63,7 @@ public async Task DeleteAsync(Action - /// > [!NOTE]> SCIM provisioning for users and groups using the REST API is in public preview and subject to change.Gets information about a SCIM group. + /// Gets information about a SCIM group. /// API method documentation /// /// A @@ -93,7 +93,7 @@ public async Task DeleteAsync(Action(requestInfo, global::GitHub.Models.ScimEnterpriseGroupResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } /// - /// > [!NOTE]> SCIM provisioning for users and groups using the REST API is in public preview and subject to change.Update a provisioned group’s individual attributes.To modify a group's values, you'll need to use a specific Operations JSON format which must include at least one of the following operations: add, remove, or replace. For examples and more information on this SCIM format, consult the [SCIM specification](https://tools.ietf.org/html/rfc7644#section-3.5.2). The update function can also be used to add group memberships.You can submit group memberships individually or in batches for improved efficiency.> [!NOTE]> Memberships are referenced via a local user id. Ensure users are created before referencing them here. + /// Update a provisioned group’s individual attributes.To modify a group's values, you'll need to use a specific Operations JSON format which must include at least one of the following operations: add, remove, or replace. For examples and more information on this SCIM format, consult the [SCIM specification](https://tools.ietf.org/html/rfc7644#section-3.5.2). The update function can also be used to add group memberships.You can submit group memberships individually or in batches for improved efficiency.> [!NOTE]> Memberships are referenced via a local user id. Ensure users are created before referencing them here. /// API method documentation /// /// A @@ -125,7 +125,7 @@ public async Task DeleteAsync(Action(requestInfo, global::GitHub.Models.ScimEnterpriseGroupResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } /// - /// > [!NOTE]> SCIM provisioning for users and groups using the REST API is in public preview and subject to change.Replaces an existing provisioned group’s information.You must provide all the information required for the group as if you were provisioning it for the first time. Any existing group information that you don't provide will be removed, including group membership. If you want to only update a specific attribute, use the [Update an attribute for a SCIM enterprise group](#update-an-attribute-for-a-scim-enterprise-group) endpoint instead. + /// Replaces an existing provisioned group’s information.You must provide all the information required for the group as if you were provisioning it for the first time. Any existing group information that you don't provide will be removed, including group membership. If you want to only update a specific attribute, use the [Update an attribute for a SCIM enterprise group](#update-an-attribute-for-a-scim-enterprise-group) endpoint instead. /// API method documentation /// /// A @@ -157,7 +157,7 @@ public async Task DeleteAsync(Action(requestInfo, global::GitHub.Models.ScimEnterpriseGroupResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } /// - /// > [!NOTE]> SCIM provisioning using the REST API is in public preview and subject to change.Deletes a SCIM group from an enterprise. + /// Deletes a SCIM group from an enterprise. /// /// A /// Configuration for the request such as headers, query parameters, and middleware options. @@ -176,7 +176,7 @@ public RequestInformation ToDeleteRequestInformation(Action - /// > [!NOTE]> SCIM provisioning for users and groups using the REST API is in public preview and subject to change.Gets information about a SCIM group. + /// Gets information about a SCIM group. /// /// A /// Configuration for the request such as headers, query parameters, and middleware options. @@ -195,7 +195,7 @@ public RequestInformation ToGetRequestInformation(Action - /// > [!NOTE]> SCIM provisioning for users and groups using the REST API is in public preview and subject to change.Update a provisioned group’s individual attributes.To modify a group's values, you'll need to use a specific Operations JSON format which must include at least one of the following operations: add, remove, or replace. For examples and more information on this SCIM format, consult the [SCIM specification](https://tools.ietf.org/html/rfc7644#section-3.5.2). The update function can also be used to add group memberships.You can submit group memberships individually or in batches for improved efficiency.> [!NOTE]> Memberships are referenced via a local user id. Ensure users are created before referencing them here. + /// Update a provisioned group’s individual attributes.To modify a group's values, you'll need to use a specific Operations JSON format which must include at least one of the following operations: add, remove, or replace. For examples and more information on this SCIM format, consult the [SCIM specification](https://tools.ietf.org/html/rfc7644#section-3.5.2). The update function can also be used to add group memberships.You can submit group memberships individually or in batches for improved efficiency.> [!NOTE]> Memberships are referenced via a local user id. Ensure users are created before referencing them here. /// /// A /// The request body @@ -217,7 +217,7 @@ public RequestInformation ToPatchRequestInformation(global::GitHub.Models.PatchS return requestInfo; } /// - /// > [!NOTE]> SCIM provisioning for users and groups using the REST API is in public preview and subject to change.Replaces an existing provisioned group’s information.You must provide all the information required for the group as if you were provisioning it for the first time. Any existing group information that you don't provide will be removed, including group membership. If you want to only update a specific attribute, use the [Update an attribute for a SCIM enterprise group](#update-an-attribute-for-a-scim-enterprise-group) endpoint instead. + /// Replaces an existing provisioned group’s information.You must provide all the information required for the group as if you were provisioning it for the first time. Any existing group information that you don't provide will be removed, including group membership. If you want to only update a specific attribute, use the [Update an attribute for a SCIM enterprise group](#update-an-attribute-for-a-scim-enterprise-group) endpoint instead. /// /// A /// The request body @@ -248,7 +248,7 @@ public RequestInformation ToPutRequestInformation(global::GitHub.Models.Group bo return new global::GitHub.Scim.V2.Enterprises.Item.Groups.Item.WithScim_group_ItemRequestBuilder(rawUrl, RequestAdapter); } /// - /// > [!NOTE]> SCIM provisioning for users and groups using the REST API is in public preview and subject to change.Gets information about a SCIM group. + /// Gets information about a SCIM group. /// [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.19.0")] public partial class WithScim_group_ItemRequestBuilderGetQueryParameters diff --git a/src/GitHub/Scim/V2/Enterprises/Item/Users/Item/WithScim_user_ItemRequestBuilder.cs b/src/GitHub/Scim/V2/Enterprises/Item/Users/Item/WithScim_user_ItemRequestBuilder.cs index e7cec7ca..ca15d31a 100644 --- a/src/GitHub/Scim/V2/Enterprises/Item/Users/Item/WithScim_user_ItemRequestBuilder.cs +++ b/src/GitHub/Scim/V2/Enterprises/Item/Users/Item/WithScim_user_ItemRequestBuilder.cs @@ -34,7 +34,7 @@ public WithScim_user_ItemRequestBuilder(string rawUrl, IRequestAdapter requestAd { } /// - /// > [!NOTE]> SCIM provisioning using the REST API is in public preview and subject to change.Suspends a SCIM user permanently from an enterprise. This action will: remove all the user's data, anonymize their login, email, and display name, erase all external identity SCIM attributes, delete the user's emails, avatar, PATs, SSH keys, OAuth authorizations, GPG keys, and SAML mappings. This action is irreversible. + /// Suspends a SCIM user permanently from an enterprise. This action will: remove all the user's data, anonymize their login, email, and display name, erase all external identity SCIM attributes, delete the user's emails, avatar, PATs, SSH keys, OAuth authorizations, GPG keys, and SAML mappings. This action is irreversible. /// API method documentation /// /// Cancellation token to use when cancelling requests @@ -63,7 +63,7 @@ public async Task DeleteAsync(Action - /// > [!NOTE]> SCIM provisioning for users and groups using the REST API is in public preview and subject to change.Gets information about a SCIM user. + /// Gets information about a SCIM user. /// API method documentation /// /// A @@ -93,7 +93,7 @@ public async Task DeleteAsync(Action(requestInfo, global::GitHub.Models.ScimEnterpriseUserResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } /// - /// > [!NOTE]> SCIM provisioning for users and groups using the REST API is in public preview and subject to change.Update a provisioned user's individual attributes.To modify a user's attributes, you'll need to provide a `Operations` JSON formatted request that includes at least one of the following actions: add, remove, or replace. For specific examples and more information on the SCIM operations format, please refer to the [SCIM specification](https://tools.ietf.org/html/rfc7644#section-3.5.2).> [!NOTE]> Complex SCIM `path` selectors that include filters are not supported. For example, a `path` selector defined as `"path": "emails[type eq \"work\"]"` will be ineffective.> [!WARNING]> Setting `active: false` will suspend a user, and their handle and email will be obfuscated.> ```> {> "Operations":[{> "op":"replace",> "value":{> "active":false> }> }]> }> ``` + /// Update a provisioned user's individual attributes.To modify a user's attributes, you'll need to provide a `Operations` JSON formatted request that includes at least one of the following actions: add, remove, or replace. For specific examples and more information on the SCIM operations format, please refer to the [SCIM specification](https://tools.ietf.org/html/rfc7644#section-3.5.2).> [!NOTE]> Complex SCIM `path` selectors that include filters are not supported. For example, a `path` selector defined as `"path": "emails[type eq \"work\"]"` will be ineffective.> [!WARNING]> Setting `active: false` will suspend a user, and their handle and email will be obfuscated.> ```> {> "Operations":[{> "op":"replace",> "value":{> "active":false> }> }]> }> ``` /// API method documentation /// /// A @@ -125,7 +125,7 @@ public async Task DeleteAsync(Action(requestInfo, global::GitHub.Models.ScimEnterpriseUserResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } /// - /// > [!NOTE]> SCIM provisioning for users and groups using the REST API is in public preview and subject to change.Replaces an existing provisioned user's information.You must supply complete user information, just as you would when provisioning them initially. Any previously existing data not provided will be deleted. To update only a specific attribute, refer to the [Update an attribute for a SCIM user](#update-an-attribute-for-a-scim-enterprise-user) endpoint.> [!WARNING]> Setting `active: false` will suspend a user, and their handle and email will be obfuscated. + /// Replaces an existing provisioned user's information.You must supply complete user information, just as you would when provisioning them initially. Any previously existing data not provided will be deleted. To update only a specific attribute, refer to the [Update an attribute for a SCIM user](#update-an-attribute-for-a-scim-enterprise-user) endpoint.> [!WARNING]> Setting `active: false` will suspend a user, and their handle and email will be obfuscated. /// API method documentation /// /// A @@ -157,7 +157,7 @@ public async Task DeleteAsync(Action(requestInfo, global::GitHub.Models.ScimEnterpriseUserResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } /// - /// > [!NOTE]> SCIM provisioning using the REST API is in public preview and subject to change.Suspends a SCIM user permanently from an enterprise. This action will: remove all the user's data, anonymize their login, email, and display name, erase all external identity SCIM attributes, delete the user's emails, avatar, PATs, SSH keys, OAuth authorizations, GPG keys, and SAML mappings. This action is irreversible. + /// Suspends a SCIM user permanently from an enterprise. This action will: remove all the user's data, anonymize their login, email, and display name, erase all external identity SCIM attributes, delete the user's emails, avatar, PATs, SSH keys, OAuth authorizations, GPG keys, and SAML mappings. This action is irreversible. /// /// A /// Configuration for the request such as headers, query parameters, and middleware options. @@ -176,7 +176,7 @@ public RequestInformation ToDeleteRequestInformation(Action - /// > [!NOTE]> SCIM provisioning for users and groups using the REST API is in public preview and subject to change.Gets information about a SCIM user. + /// Gets information about a SCIM user. /// /// A /// Configuration for the request such as headers, query parameters, and middleware options. @@ -195,7 +195,7 @@ public RequestInformation ToGetRequestInformation(Action - /// > [!NOTE]> SCIM provisioning for users and groups using the REST API is in public preview and subject to change.Update a provisioned user's individual attributes.To modify a user's attributes, you'll need to provide a `Operations` JSON formatted request that includes at least one of the following actions: add, remove, or replace. For specific examples and more information on the SCIM operations format, please refer to the [SCIM specification](https://tools.ietf.org/html/rfc7644#section-3.5.2).> [!NOTE]> Complex SCIM `path` selectors that include filters are not supported. For example, a `path` selector defined as `"path": "emails[type eq \"work\"]"` will be ineffective.> [!WARNING]> Setting `active: false` will suspend a user, and their handle and email will be obfuscated.> ```> {> "Operations":[{> "op":"replace",> "value":{> "active":false> }> }]> }> ``` + /// Update a provisioned user's individual attributes.To modify a user's attributes, you'll need to provide a `Operations` JSON formatted request that includes at least one of the following actions: add, remove, or replace. For specific examples and more information on the SCIM operations format, please refer to the [SCIM specification](https://tools.ietf.org/html/rfc7644#section-3.5.2).> [!NOTE]> Complex SCIM `path` selectors that include filters are not supported. For example, a `path` selector defined as `"path": "emails[type eq \"work\"]"` will be ineffective.> [!WARNING]> Setting `active: false` will suspend a user, and their handle and email will be obfuscated.> ```> {> "Operations":[{> "op":"replace",> "value":{> "active":false> }> }]> }> ``` /// /// A /// The request body @@ -217,7 +217,7 @@ public RequestInformation ToPatchRequestInformation(global::GitHub.Models.PatchS return requestInfo; } /// - /// > [!NOTE]> SCIM provisioning for users and groups using the REST API is in public preview and subject to change.Replaces an existing provisioned user's information.You must supply complete user information, just as you would when provisioning them initially. Any previously existing data not provided will be deleted. To update only a specific attribute, refer to the [Update an attribute for a SCIM user](#update-an-attribute-for-a-scim-enterprise-user) endpoint.> [!WARNING]> Setting `active: false` will suspend a user, and their handle and email will be obfuscated. + /// Replaces an existing provisioned user's information.You must supply complete user information, just as you would when provisioning them initially. Any previously existing data not provided will be deleted. To update only a specific attribute, refer to the [Update an attribute for a SCIM user](#update-an-attribute-for-a-scim-enterprise-user) endpoint.> [!WARNING]> Setting `active: false` will suspend a user, and their handle and email will be obfuscated. /// /// A /// The request body diff --git a/src/GitHub/Scim/V2/Enterprises/Item/Users/UsersRequestBuilder.cs b/src/GitHub/Scim/V2/Enterprises/Item/Users/UsersRequestBuilder.cs index f2041c68..94de6de2 100644 --- a/src/GitHub/Scim/V2/Enterprises/Item/Users/UsersRequestBuilder.cs +++ b/src/GitHub/Scim/V2/Enterprises/Item/Users/UsersRequestBuilder.cs @@ -47,7 +47,7 @@ public UsersRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base { } /// - /// > [!NOTE]> SCIM provisioning for users and groups using the REST API is in public preview and subject to change.Lists provisioned SCIM enterprise members.When you remove a user with a SCIM-provisioned external identity from an enterprise using a `patch` with `active` flag to `false`, the user's metadata remains intact. This means they can potentially re-join the enterprise later. Although, while suspended, the user can't sign in. If you want to ensure the user can't re-join in the future, use the delete request. Only users who weren't permanently deleted will appear in the result list. + /// Lists provisioned SCIM enterprise members.When you remove a user with a SCIM-provisioned external identity from an enterprise using a `patch` with `active` flag to `false`, the user's metadata remains intact. This means they can potentially re-join the enterprise later. Although, while suspended, the user can't sign in. If you want to ensure the user can't re-join in the future, use the delete request. Only users who weren't permanently deleted will appear in the result list. /// API method documentation /// /// A @@ -75,7 +75,7 @@ public UsersRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base return await RequestAdapter.SendAsync(requestInfo, global::GitHub.Models.ScimEnterpriseUserList.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } /// - /// > [!NOTE]> SCIM provisioning for users and groups using the REST API is in public preview and subject to change.Creates an external identity for a new SCIM enterprise user.SCIM is responsible for user provisioning, not authentication. The actual user authentication is handled by SAML. However, with SCIM enabled, users must first be provisioned via SCIM before they can sign in through SAML. + /// Creates an external identity for a new SCIM enterprise user.SCIM is responsible for user provisioning, not authentication. The actual user authentication is handled by SAML. However, with SCIM enabled, users must first be provisioned via SCIM before they can sign in through SAML. /// API method documentation /// /// A @@ -105,7 +105,7 @@ public UsersRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base return await RequestAdapter.SendAsync(requestInfo, global::GitHub.Models.ScimEnterpriseUserResponse.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false); } /// - /// > [!NOTE]> SCIM provisioning for users and groups using the REST API is in public preview and subject to change.Lists provisioned SCIM enterprise members.When you remove a user with a SCIM-provisioned external identity from an enterprise using a `patch` with `active` flag to `false`, the user's metadata remains intact. This means they can potentially re-join the enterprise later. Although, while suspended, the user can't sign in. If you want to ensure the user can't re-join in the future, use the delete request. Only users who weren't permanently deleted will appear in the result list. + /// Lists provisioned SCIM enterprise members.When you remove a user with a SCIM-provisioned external identity from an enterprise using a `patch` with `active` flag to `false`, the user's metadata remains intact. This means they can potentially re-join the enterprise later. Although, while suspended, the user can't sign in. If you want to ensure the user can't re-join in the future, use the delete request. Only users who weren't permanently deleted will appear in the result list. /// /// A /// Configuration for the request such as headers, query parameters, and middleware options. @@ -124,7 +124,7 @@ public RequestInformation ToGetRequestInformation(Action - /// > [!NOTE]> SCIM provisioning for users and groups using the REST API is in public preview and subject to change.Creates an external identity for a new SCIM enterprise user.SCIM is responsible for user provisioning, not authentication. The actual user authentication is handled by SAML. However, with SCIM enabled, users must first be provisioned via SCIM before they can sign in through SAML. + /// Creates an external identity for a new SCIM enterprise user.SCIM is responsible for user provisioning, not authentication. The actual user authentication is handled by SAML. However, with SCIM enabled, users must first be provisioned via SCIM before they can sign in through SAML. /// /// A /// The request body @@ -155,7 +155,7 @@ public RequestInformation ToPostRequestInformation(global::GitHub.Models.User bo return new global::GitHub.Scim.V2.Enterprises.Item.Users.UsersRequestBuilder(rawUrl, RequestAdapter); } /// - /// > [!NOTE]> SCIM provisioning for users and groups using the REST API is in public preview and subject to change.Lists provisioned SCIM enterprise members.When you remove a user with a SCIM-provisioned external identity from an enterprise using a `patch` with `active` flag to `false`, the user's metadata remains intact. This means they can potentially re-join the enterprise later. Although, while suspended, the user can't sign in. If you want to ensure the user can't re-join in the future, use the delete request. Only users who weren't permanently deleted will appear in the result list. + /// Lists provisioned SCIM enterprise members.When you remove a user with a SCIM-provisioned external identity from an enterprise using a `patch` with `active` flag to `false`, the user's metadata remains intact. This means they can potentially re-join the enterprise later. Although, while suspended, the user can't sign in. If you want to ensure the user can't re-join in the future, use the delete request. Only users who weren't permanently deleted will appear in the result list. /// [global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.19.0")] public partial class UsersRequestBuilderGetQueryParameters diff --git a/src/GitHub/Users/Item/Attestations/Item/WithSubject_digestGetResponse_attestations.cs b/src/GitHub/Users/Item/Attestations/Item/WithSubject_digestGetResponse_attestations.cs index 48569835..f49a89e7 100644 --- a/src/GitHub/Users/Item/Attestations/Item/WithSubject_digestGetResponse_attestations.cs +++ b/src/GitHub/Users/Item/Attestations/Item/WithSubject_digestGetResponse_attestations.cs @@ -22,6 +22,14 @@ public partial class WithSubject_digestGetResponse_attestations : IAdditionalDat #nullable restore #else public global::GitHub.Models.SigstoreBundle0 Bundle { get; set; } +#endif + /// The bundle_url property +#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER +#nullable enable + public string? BundleUrl { get; set; } +#nullable restore +#else + public string BundleUrl { get; set; } #endif /// The repository_id property public int? RepositoryId { get; set; } @@ -51,6 +59,7 @@ public virtual IDictionary> GetFieldDeserializers() return new Dictionary> { { "bundle", n => { Bundle = n.GetObjectValue(global::GitHub.Models.SigstoreBundle0.CreateFromDiscriminatorValue); } }, + { "bundle_url", n => { BundleUrl = n.GetStringValue(); } }, { "repository_id", n => { RepositoryId = n.GetIntValue(); } }, }; } @@ -62,6 +71,7 @@ public virtual void Serialize(ISerializationWriter writer) { _ = writer ?? throw new ArgumentNullException(nameof(writer)); writer.WriteObjectValue("bundle", Bundle); + writer.WriteStringValue("bundle_url", BundleUrl); writer.WriteIntValue("repository_id", RepositoryId); writer.WriteAdditionalData(AdditionalData); } diff --git a/src/GitHub/kiota-lock.json b/src/GitHub/kiota-lock.json index a79b75ce..278d76e7 100644 --- a/src/GitHub/kiota-lock.json +++ b/src/GitHub/kiota-lock.json @@ -1,5 +1,5 @@ { - "descriptionHash": "EF8BEA66D388CF62ABAEAD00A5990F7AFF7571DDA8EE682649A0FBAE6CCF3DB620F1D97153B14C4A4B48E1726AE161C66098D84DFD66DFAB334D63DEBCC5D6BC", + "descriptionHash": "F94BFB679AB485E50D630C793DF9DD71FCDED74ABEE8669F15904A391A069694B7A82A114CE9EEE6C825CC35F342C3175223C4D4D37837F8E4DAC3CCF6FC8005", "descriptionLocation": "../../../../../schemas/ghec.json", "lockFileVersion": "1.0.0", "kiotaVersion": "1.19.0",