Skip to content

Commit 4c038f1

Browse files
authored
Changes in generated code (#135)
* New updates to generated code * New updates to generated code * New updates to generated code * New updates to generated code
1 parent 0a54b04 commit 4c038f1

File tree

82 files changed

+4125
-78
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

82 files changed

+4125
-78
lines changed

src/GitHub/App/Hook/Deliveries/DeliveriesRequestBuilder.cs

+2-4
Original file line numberDiff line numberDiff line change
@@ -35,15 +35,15 @@ public partial class DeliveriesRequestBuilder : BaseRequestBuilder
3535
/// </summary>
3636
/// <param name="pathParameters">Path parameters for the request</param>
3737
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
38-
public DeliveriesRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/app/hook/deliveries{?cursor*,per_page*,redelivery*}", pathParameters)
38+
public DeliveriesRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/app/hook/deliveries{?cursor*,per_page*}", pathParameters)
3939
{
4040
}
4141
/// <summary>
4242
/// Instantiates a new <see cref="global::GitHub.App.Hook.Deliveries.DeliveriesRequestBuilder"/> and sets the default values.
4343
/// </summary>
4444
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
4545
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
46-
public DeliveriesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/app/hook/deliveries{?cursor*,per_page*,redelivery*}", rawUrl)
46+
public DeliveriesRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/app/hook/deliveries{?cursor*,per_page*}", rawUrl)
4747
{
4848
}
4949
/// <summary>
@@ -120,8 +120,6 @@ public partial class DeliveriesRequestBuilderGetQueryParameters
120120
/// <summary>The number of results per page (max 100). For more information, see &quot;[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api).&quot;</summary>
121121
[QueryParameter("per_page")]
122122
public int? PerPage { get; set; }
123-
[QueryParameter("redelivery")]
124-
public bool? Redelivery { get; set; }
125123
}
126124
}
127125
}

src/GitHub/Enterprises/Item/Copilot/CopilotRequestBuilder.cs

+6
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// <auto-generated/>
22
#pragma warning disable CS0618
33
using GitHub.Enterprises.Item.Copilot.Billing;
4+
using GitHub.Enterprises.Item.Copilot.Metrics;
45
using GitHub.Enterprises.Item.Copilot.Usage;
56
using Microsoft.Kiota.Abstractions.Extensions;
67
using Microsoft.Kiota.Abstractions;
@@ -21,6 +22,11 @@ public partial class CopilotRequestBuilder : BaseRequestBuilder
2122
{
2223
get => new global::GitHub.Enterprises.Item.Copilot.Billing.BillingRequestBuilder(PathParameters, RequestAdapter);
2324
}
25+
/// <summary>The metrics property</summary>
26+
public global::GitHub.Enterprises.Item.Copilot.Metrics.MetricsRequestBuilder Metrics
27+
{
28+
get => new global::GitHub.Enterprises.Item.Copilot.Metrics.MetricsRequestBuilder(PathParameters, RequestAdapter);
29+
}
2430
/// <summary>The usage property</summary>
2531
public global::GitHub.Enterprises.Item.Copilot.Usage.UsageRequestBuilder Usage
2632
{
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,130 @@
1+
// <auto-generated/>
2+
#pragma warning disable CS0618
3+
using GitHub.Models;
4+
using Microsoft.Kiota.Abstractions.Extensions;
5+
using Microsoft.Kiota.Abstractions.Serialization;
6+
using Microsoft.Kiota.Abstractions;
7+
using System.Collections.Generic;
8+
using System.IO;
9+
using System.Threading.Tasks;
10+
using System.Threading;
11+
using System;
12+
namespace GitHub.Enterprises.Item.Copilot.Metrics
13+
{
14+
/// <summary>
15+
/// Builds and executes requests for operations under \enterprises\{enterprise}\copilot\metrics
16+
/// </summary>
17+
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.19.0")]
18+
public partial class MetricsRequestBuilder : BaseRequestBuilder
19+
{
20+
/// <summary>
21+
/// Instantiates a new <see cref="global::GitHub.Enterprises.Item.Copilot.Metrics.MetricsRequestBuilder"/> and sets the default values.
22+
/// </summary>
23+
/// <param name="pathParameters">Path parameters for the request</param>
24+
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
25+
public MetricsRequestBuilder(Dictionary<string, object> pathParameters, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/enterprises/{enterprise}/copilot/metrics{?page*,per_page*,since*,until*}", pathParameters)
26+
{
27+
}
28+
/// <summary>
29+
/// Instantiates a new <see cref="global::GitHub.Enterprises.Item.Copilot.Metrics.MetricsRequestBuilder"/> and sets the default values.
30+
/// </summary>
31+
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
32+
/// <param name="requestAdapter">The request adapter to use to execute the requests.</param>
33+
public MetricsRequestBuilder(string rawUrl, IRequestAdapter requestAdapter) : base(requestAdapter, "{+baseurl}/enterprises/{enterprise}/copilot/metrics{?page*,per_page*,since*,until*}", rawUrl)
34+
{
35+
}
36+
/// <summary>
37+
/// 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.To access this endpoint, the Copilot Metrics API access policy must be enabled or set to &quot;no policy&quot; for the enterprise within GitHub settings.Only enterprise owners and billing managers can view Copilot 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.
38+
/// API method documentation <see href="https://docs.github.com/rest/copilot/copilot-metrics#get-copilot-metrics-for-an-enterprise" />
39+
/// </summary>
40+
/// <returns>A List&lt;global::GitHub.Models.CopilotUsageMetricsDay&gt;</returns>
41+
/// <param name="cancellationToken">Cancellation token to use when cancelling requests</param>
42+
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
43+
/// <exception cref="global::GitHub.Models.BasicError">When receiving a 403 status code</exception>
44+
/// <exception cref="global::GitHub.Models.BasicError">When receiving a 404 status code</exception>
45+
/// <exception cref="global::GitHub.Models.BasicError">When receiving a 422 status code</exception>
46+
/// <exception cref="global::GitHub.Models.BasicError">When receiving a 500 status code</exception>
47+
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
48+
#nullable enable
49+
public async Task<List<global::GitHub.Models.CopilotUsageMetricsDay>?> GetAsync(Action<RequestConfiguration<global::GitHub.Enterprises.Item.Copilot.Metrics.MetricsRequestBuilder.MetricsRequestBuilderGetQueryParameters>>? requestConfiguration = default, CancellationToken cancellationToken = default)
50+
{
51+
#nullable restore
52+
#else
53+
public async Task<List<global::GitHub.Models.CopilotUsageMetricsDay>> GetAsync(Action<RequestConfiguration<global::GitHub.Enterprises.Item.Copilot.Metrics.MetricsRequestBuilder.MetricsRequestBuilderGetQueryParameters>> requestConfiguration = default, CancellationToken cancellationToken = default)
54+
{
55+
#endif
56+
var requestInfo = ToGetRequestInformation(requestConfiguration);
57+
var errorMapping = new Dictionary<string, ParsableFactory<IParsable>>
58+
{
59+
{ "403", global::GitHub.Models.BasicError.CreateFromDiscriminatorValue },
60+
{ "404", global::GitHub.Models.BasicError.CreateFromDiscriminatorValue },
61+
{ "422", global::GitHub.Models.BasicError.CreateFromDiscriminatorValue },
62+
{ "500", global::GitHub.Models.BasicError.CreateFromDiscriminatorValue },
63+
};
64+
var collectionResult = await RequestAdapter.SendCollectionAsync<global::GitHub.Models.CopilotUsageMetricsDay>(requestInfo, global::GitHub.Models.CopilotUsageMetricsDay.CreateFromDiscriminatorValue, errorMapping, cancellationToken).ConfigureAwait(false);
65+
return collectionResult?.AsList();
66+
}
67+
/// <summary>
68+
/// 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.To access this endpoint, the Copilot Metrics API access policy must be enabled or set to &quot;no policy&quot; for the enterprise within GitHub settings.Only enterprise owners and billing managers can view Copilot 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.
69+
/// </summary>
70+
/// <returns>A <see cref="RequestInformation"/></returns>
71+
/// <param name="requestConfiguration">Configuration for the request such as headers, query parameters, and middleware options.</param>
72+
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
73+
#nullable enable
74+
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<global::GitHub.Enterprises.Item.Copilot.Metrics.MetricsRequestBuilder.MetricsRequestBuilderGetQueryParameters>>? requestConfiguration = default)
75+
{
76+
#nullable restore
77+
#else
78+
public RequestInformation ToGetRequestInformation(Action<RequestConfiguration<global::GitHub.Enterprises.Item.Copilot.Metrics.MetricsRequestBuilder.MetricsRequestBuilderGetQueryParameters>> requestConfiguration = default)
79+
{
80+
#endif
81+
var requestInfo = new RequestInformation(Method.GET, UrlTemplate, PathParameters);
82+
requestInfo.Configure(requestConfiguration);
83+
requestInfo.Headers.TryAdd("Accept", "application/json");
84+
return requestInfo;
85+
}
86+
/// <summary>
87+
/// Returns a request builder with the provided arbitrary URL. Using this method means any other path or query parameters are ignored.
88+
/// </summary>
89+
/// <returns>A <see cref="global::GitHub.Enterprises.Item.Copilot.Metrics.MetricsRequestBuilder"/></returns>
90+
/// <param name="rawUrl">The raw URL to use for the request builder.</param>
91+
public global::GitHub.Enterprises.Item.Copilot.Metrics.MetricsRequestBuilder WithUrl(string rawUrl)
92+
{
93+
return new global::GitHub.Enterprises.Item.Copilot.Metrics.MetricsRequestBuilder(rawUrl, RequestAdapter);
94+
}
95+
/// <summary>
96+
/// 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.To access this endpoint, the Copilot Metrics API access policy must be enabled or set to &quot;no policy&quot; for the enterprise within GitHub settings.Only enterprise owners and billing managers can view Copilot 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.
97+
/// </summary>
98+
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.19.0")]
99+
public partial class MetricsRequestBuilderGetQueryParameters
100+
{
101+
/// <summary>The page number of the results to fetch. For more information, see &quot;[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api).&quot;</summary>
102+
[QueryParameter("page")]
103+
public int? Page { get; set; }
104+
/// <summary>The number of days of metrics to display per page (max 28). For more information, see &quot;[Using pagination in the REST API](https://docs.github.com/rest/using-the-rest-api/using-pagination-in-the-rest-api).&quot;</summary>
105+
[QueryParameter("per_page")]
106+
public int? PerPage { get; set; }
107+
/// <summary>Show usage metrics since this date. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format (`YYYY-MM-DDTHH:MM:SSZ`). Maximum value is 28 days ago.</summary>
108+
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
109+
#nullable enable
110+
[QueryParameter("since")]
111+
public string? Since { get; set; }
112+
#nullable restore
113+
#else
114+
[QueryParameter("since")]
115+
public string Since { get; set; }
116+
#endif
117+
/// <summary>Show usage metrics until this date. This is a timestamp in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format (`YYYY-MM-DDTHH:MM:SSZ`) and should not preceed the `since` date if it is passed.</summary>
118+
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
119+
#nullable enable
120+
[QueryParameter("until")]
121+
public string? Until { get; set; }
122+
#nullable restore
123+
#else
124+
[QueryParameter("until")]
125+
public string Until { get; set; }
126+
#endif
127+
}
128+
}
129+
}
130+
#pragma warning restore CS0618

src/GitHub/Enterprises/Item/Team/Item/Copilot/CopilotRequestBuilder.cs

+6
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
// <auto-generated/>
22
#pragma warning disable CS0618
3+
using GitHub.Enterprises.Item.Team.Item.Copilot.Metrics;
34
using GitHub.Enterprises.Item.Team.Item.Copilot.Usage;
45
using Microsoft.Kiota.Abstractions.Extensions;
56
using Microsoft.Kiota.Abstractions;
@@ -15,6 +16,11 @@ namespace GitHub.Enterprises.Item.Team.Item.Copilot
1516
[global::System.CodeDom.Compiler.GeneratedCode("Kiota", "1.19.0")]
1617
public partial class CopilotRequestBuilder : BaseRequestBuilder
1718
{
19+
/// <summary>The metrics property</summary>
20+
public global::GitHub.Enterprises.Item.Team.Item.Copilot.Metrics.MetricsRequestBuilder Metrics
21+
{
22+
get => new global::GitHub.Enterprises.Item.Team.Item.Copilot.Metrics.MetricsRequestBuilder(PathParameters, RequestAdapter);
23+
}
1824
/// <summary>The usage property</summary>
1925
public global::GitHub.Enterprises.Item.Team.Item.Copilot.Usage.UsageRequestBuilder Usage
2026
{

0 commit comments

Comments
 (0)